448 B
448 B
Golang basics
Initialize project
$ go mod init <project-name> #usually folder name
Insert package
package main
import "fmt"
func main() {
// your code here
}
Running code
$ go run main.go
Pointer in Go
var userName string
var userTickets int
fmt.Scan(&userName)
// &userName point to the memory of the var
Import package
go get github.com/gin-gonic/gin