Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

Commit

Permalink
Command flags consistent with the SecretHub CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
florisvdg committed Feb 26, 2019
1 parent 35a8042 commit 42305ed
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ import (
var (
credential string
credentialPassphrase string
address string
port int
client secrethub.Client
)

func init() {
flag.StringVar(&credential, "c", "", "(Required) SecretHub credential")
flag.StringVar(&credentialPassphrase, "p", "", "Passphrase to unlock SecretHub credential")
flag.StringVar(&address, "a", ":8080", "HTTP server address")
flag.StringVar(&credential, "C", "", "(Required) SecretHub credential")
flag.StringVar(&credentialPassphrase, "P", "", "Passphrase to unlock SecretHub credential")
flag.IntVar(&port, "p", 8080, "HTTP port to listen on")
flag.Parse()

if credential == "" {
Expand Down Expand Up @@ -56,7 +56,7 @@ func startHTTPServer() error {
)

fmt.Println("SecretHub Clientd started, press ^C to exit")
return http.ListenAndServe(address, mux)
return http.ListenAndServe(fmt.Sprintf(":%v", port), mux)
}

func handleSecret(w http.ResponseWriter, r *http.Request) {
Expand Down

0 comments on commit 42305ed

Please sign in to comment.