DEV Community

indiewebdev
indiewebdev

Posted on

Golang Notes - 3

Comments

// your one-line comment

age := 18 // inline comment
Enter fullscreen mode Exit fullscreen mode

comment out a line of code in Go using
//
/* */

/*
  multiline
*/
Enter fullscreen mode Exit fullscreen mode

Naming Conventions

go language specification

names start with a letter or underscore _

go keywords can not be used

The idiomatic way is to use camelCase with acronyms in all caps.
accessDB:=false

Top comments (0)