example01-hello-world

command
v0.0.0-...-2a31844 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2024 License: MIT Imports: 1 Imported by: 0

README

Hello World

gofmt

Try to fix main.go file using gofmt command and show diff data from gofmt -d example01 command.

        fmt.Printf(HelloWorld("appleboy"))
        fmt.Println("一天就學會 Go 語言")

-       if (a >= 1) { fmt.Println("a >= 1") }
+       if a >= 1 {
+               fmt.Println("a >= 1")
+       }

Fix and save automatically using -w flag: gofmt -w example01

golint

Try to improve code quailty using golint command.

example01/main.go:13:1: exported function HelloWorld should have comment or be unexported
example01/main.go:13:17: don't use underscores in Go names; func parameter user_name should be userName

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL