Skip to content

Commit

Permalink
klog.InitFlags in mains
Browse files Browse the repository at this point in the history
  • Loading branch information
AlCutter committed Aug 19, 2022
1 parent c2dcaa5 commit 900194f
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 1 deletion.
6 changes: 5 additions & 1 deletion client/ctclient/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@
// ctclient is a command-line utility for interacting with CT logs.
package main

import "github.com/google/certificate-transparency-go/client/ctclient/cmd"
import (
"github.com/google/certificate-transparency-go/client/ctclient/cmd"
"k8s.io/klog/v2"
)

func main() {
klog.InitFlags(nil)
cmd.Execute()
}
1 change: 1 addition & 0 deletions ctutil/sctcheck/sctcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ var (
type logInfoFactory func(*loglist.Log, *http.Client) (*ctutil.LogInfo, error)

func main() {
klog.InitFlags(nil)
flag.Parse()
ctx := context.Background()
hc := &http.Client{Timeout: *deadline}
Expand Down
1 change: 1 addition & 0 deletions ctutil/sctscan/sctscan.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ var (
)

func main() {
klog.InitFlags(nil)
flag.Parse()
ctx := context.Background()
klog.CopyStandardLogTo("WARNING")
Expand Down
1 change: 1 addition & 0 deletions internal/witness/cmd/client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ type ctLog struct {
}

func main() {
klog.InitFlags(nil)
flag.Parse()
if *witness == "" {
klog.Exit("--witness_url must not be empty")
Expand Down
1 change: 1 addition & 0 deletions internal/witness/cmd/feeder/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ func createLogClient(key []byte, url string) (*client.LogClient, error) {
}

func main() {
klog.InitFlags(nil)
flag.Parse()
if *witness == "" {
klog.Exit("--witness_url must not be empty")
Expand Down
1 change: 1 addition & 0 deletions internal/witness/cmd/witness/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ var (
)

func main() {
klog.InitFlags(nil)
flag.Parse()

if *witnessSK == "" {
Expand Down
1 change: 1 addition & 0 deletions submission/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ func parsePolicyType() submission.CTPolicyType {
}

func main() {
klog.InitFlags(nil)
flag.Parse()

plc := parsePolicyType()
Expand Down
1 change: 1 addition & 0 deletions trillian/ctfe/ct_server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ const unknownRemoteUser = "UNKNOWN_REMOTE"

// nolint:staticcheck
func main() {
klog.InitFlags(nil)
flag.Parse()
ctx := context.Background()

Expand Down
1 change: 1 addition & 0 deletions trillian/migrillian/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ var (
)

func main() {
klog.InitFlags(nil)
flag.Parse()
klog.CopyStandardLogTo("WARNING")
defer klog.Flush()
Expand Down
1 change: 1 addition & 0 deletions x509util/certcheck/certcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ func addCerts(filename string, pool *x509.CertPool) {
}

func main() {
klog.InitFlags(nil)
flag.Parse()

failed := false
Expand Down
1 change: 1 addition & 0 deletions x509util/crlcheck/crlcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ var (
)

func main() {
klog.InitFlags(nil)
flag.Parse()

// Build a list of possible CA certs from command line arguments.
Expand Down

0 comments on commit 900194f

Please sign in to comment.