gofmt wat u know about it

This commit is contained in:
Mark McGranaghan
2012-09-23 18:31:33 -07:00
parent f93bdba75c
commit 89f95f2ac5
66 changed files with 729 additions and 678 deletions

View File

@@ -2,25 +2,24 @@
// Use `os.Args` to access command-line arguments and
// the name of the program.
package main
package main
import "os"
import "fmt"
func main() {
// `os.Args` includes the program name as the first
// value.
argsWithProg := os.Args
argsWithoutProg := os.Args[1:]
argsWithProg := os.Args
argsWithoutProg := os.Args[1:]
// `Args` are a slice, you can get individual args
// with normal indexing.
arg := os.Args[3]
arg := os.Args[3]
fmt.Println(argsWithProg)
fmt.Println(argsWithoutProg)
fmt.Println(arg)
fmt.Println(argsWithProg)
fmt.Println(argsWithoutProg)
fmt.Println(arg)
}
// todo: discuss building before here