github.com/EngineerKamesh/gofullstack@v0.0.0-20180609171605-d41341d7d4ee/volume1/section2/personalgreetings/personalgreetings.go (about)

     1  // An example of using a command line flag.
     2  package main
     3  
     4  import (
     5  	"flag"
     6  	"fmt"
     7  )
     8  
     9  func main() {
    10  
    11  	var gopherName string
    12  	flag.StringVar(&gopherName, "gophername", "Gopher", "The name of the Gopher")
    13  	flag.Parse()
    14  	fmt.Println("Hello " + gopherName + "!")
    15  }