mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 01:55:35 +08:00
fix: coding style and file format for all example.
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
// os_args.go
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func main() {
|
||||
who := "Alice "
|
||||
if len(os.Args) > 1 {
|
||||
who += strings.Join(os.Args[1:], " ")
|
||||
}
|
||||
fmt.Println("Good Morning", who)
|
||||
}
|
||||
// os_args.go
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func main() {
|
||||
who := "Alice "
|
||||
if len(os.Args) > 1 {
|
||||
who += strings.Join(os.Args[1:], " ")
|
||||
}
|
||||
fmt.Println("Good Morning", who)
|
||||
}
|
||||
|
Reference in New Issue
Block a user