fix the unknown flag: --logtostderr error

This commit is contained in:
tinatingyu
2025-10-26 03:48:43 +00:00
parent fb10a29954
commit cff8bc8686
2 changed files with 0 additions and 8 deletions

View File

@@ -22,7 +22,6 @@ import (
"crypto/tls"
"crypto/x509"
"encoding/pem"
"flag"
"fmt"
"io"
"log"
@@ -58,9 +57,6 @@ func init() {
func main(cmd *cobra.Command, args []string) error {
logs.InitLogs()
defer logs.FlushLogs()
if err := flag.Set("logtostderr", "true"); err != nil {
return fmt.Errorf("failed to set flags: %w", err)
}
if fetchURL == "" || serverTrustBundleFile == "" || clientCredBundleFile == "" {
return fmt.Errorf("missing required flags")

View File

@@ -21,7 +21,6 @@ package mtlsserver
import (
"crypto/tls"
"crypto/x509"
"flag"
"fmt"
"log"
"net/http"
@@ -54,9 +53,6 @@ func init() {
func main(cmd *cobra.Command, args []string) error {
logs.InitLogs()
defer logs.FlushLogs()
if err := flag.Set("logtostderr", "true"); err != nil {
return fmt.Errorf("failed to set flags: %w", err)
}
if listen == "" || serverCredsFile == "" || spiffeTrustBundleFile == "" {
return fmt.Errorf("missing required flags")