func main() {
fs := pflag.NewFlagSet("", pflag.ExitOnError)
c := Config{}
fs.StringVar(&c.TLSCertFile, "tls-cert-file", c.TLSCertFile,
"File containing x509 Certificate used for serving HTTPS (with intermediate certs, if any, concatenated after server cert).")
fs.StringVar(&c.TLSPrivateKeyFile, "tls-private-key-file", c.TLSPrivateKeyFile, "File containing x509 private key matching --tls-cert-file.")
klog.InitFlags(nil)
flag.Set("logtostderr", "true")
pflag.CommandLine.AddFlagSet(fs)
pflag.CommandLine.AddGoFlagSet(flag.CommandLine)
pflag.Parse()
}
這時候不知怎的突然想起某 YouTube 好像介紹用 ChatGPT 某些情況下比 Google 好,機會難得總之先試試看吧?