]> git.0d.be Git - barnard.git/commitdiff
added server password support as command line arguement (#13)
authorScott Register <sreg@sreg.us>
Mon, 30 May 2016 18:35:30 +0000 (11:35 -0700)
committerTim Cooper <tim.cooper@layeh.com>
Mon, 30 May 2016 18:35:30 +0000 (15:35 -0300)
cmd/barnard/main.go

index c23c2d620af92ccabe72c7476edfdb647a8e0e88..767269f30262f2dba80578b7be3b50cd6305c4e3 100644 (file)
@@ -16,6 +16,7 @@ func main() {
        // Command line flags
        server := flag.String("server", "localhost:64738", "the server to connect to")
        username := flag.String("username", "", "the username of the client")
        // Command line flags
        server := flag.String("server", "localhost:64738", "the server to connect to")
        username := flag.String("username", "", "the username of the client")
+       password := flag.String("password", "", "the password of the server")
        insecure := flag.Bool("insecure", false, "skip server certificate verification")
        certificate := flag.String("certificate", "", "PEM encoded certificate and private key")
 
        insecure := flag.Bool("insecure", false, "skip server certificate verification")
        certificate := flag.String("certificate", "", "PEM encoded certificate and private key")
 
@@ -28,6 +29,7 @@ func main() {
        }
 
        b.Config.Username = *username
        }
 
        b.Config.Username = *username
+       b.Config.Password = *password
 
        if *insecure {
                b.TLSConfig.InsecureSkipVerify = true
 
        if *insecure {
                b.TLSConfig.InsecureSkipVerify = true