golang-examples/example-flag/flag.go

27 lines
475 B
Go
Raw Normal View History

package main
import (
"flag"
"fmt"
"time"
"github.com/google/goterm/term"
)
const (
timeout = 10 * time.Minute
)
var (
addr = flag.String("address", "", "address of telnet server")
user = flag.String("user", "user", "username to use")
pass1 = flag.String("pass1", "pass1", "password to use")
pass2 = flag.String("pass2", "pass2", "alternate password to use")
)
func main() {
flag.Parse()
fmt.Println(term.Bluef("flag Example"))
fmt.Println("addr=",addr)
}