Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * xm program. written by go.
- *
- * @build go build xm.go
- * @example ./xm --> Output: xm
- * @example ./xm gg --> Output: xmgg
- * @example ./xm [all|-all|--all]
- */
- package main
- import (
- "fmt"
- "os"
- )
- func main() {
- // no cl args
- if len(os.Args) == 1 {
- fmt.Println("xm")
- return;
- }
- // has cl args
- obj := os.Args[1]
- if obj == "--all" || obj == "-all" || obj == "all" {
- fmt.Println("xmht")
- fmt.Println("xmgg")
- fmt.Println("xgxd")
- } else {
- fmt.Println("xm" + obj)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement