Welcome to tutorial number 8 of our Golang tutorial series. if statement has a condition and it executes a block of code if that condition evaluates to true. It executes an alternate else block if the condition evaluates to false. In this tutorial we will look at the various syntaxes for using a if statement. If statement syntax The syntax of the if statement is provided below if condition { } If the condition evaluates to true, the block of code between the braces { and } is executed.