Skip to content

Instantly share code, notes, and snippets.

@nileshsimaria
Created July 23, 2019 23:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nileshsimaria/0dc94681a6b50d69fbd6ef1eea73ba50 to your computer and use it in GitHub Desktop.
Save nileshsimaria/0dc94681a6b50d69fbd6ef1eea73ba50 to your computer and use it in GitHub Desktop.
package main
import (
"flag"
"fmt"
)
var (
file = flag.String("file", "", "file-name")
count = flag.Int("count", 2, "count params")
repeat = flag.Bool("repeat", false, "Repeat execution")
)
func main() {
flag.Parse()
fmt.Println("file name: ", *file)
fmt.Println("count: ", *count)
fmt.Println("repeat: ", *repeat)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment