remove glog to avoid fatal
@@ -23,10 +23,10 @@ import (
"os"
"path/filepath"
- kruntime "k8s.io/apimachinery/pkg/runtime"
-
- "github.com/golang/glog"
flag "github.com/spf13/pflag"
+
+ kruntime "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/klog"
)
var (
@@ -39,7 +39,7 @@ func main() {
flag.Parse()
if *typeSrc == "" {
- glog.Fatalf("Please define -s flag as it is the source file")
+ klog.Fatalf("Please define -s flag as it is the source file")
}
var funcOut io.Writer
@@ -48,7 +48,7 @@ func main() {
} else {
file, err := os.Create(*functionDest)
if err != nil {
- glog.Fatalf("Couldn't open %v: %v", *functionDest, err)
+ klog.Fatalf("Couldn't open %v: %v", *functionDest, err)
}
defer file.Close()
funcOut = file
@@ -58,14 +58,14 @@ func main() {
if fi, err := os.Stat(*typeSrc); err == nil && !fi.IsDir() {
docsForTypes = kruntime.ParseDocumentationFrom(*typeSrc)
} else if err == nil && fi.IsDir() {
- glog.Fatalf("-s must be a valid file or file glob pattern, not a directory")
+ klog.Fatalf("-s must be a valid file or file glob pattern, not a directory")
} else {
m, err := filepath.Glob(*typeSrc)
if err != nil {
- glog.Fatalf("Couldn't search for files matching -s: %v", err)
+ klog.Fatalf("Couldn't search for files matching -s: %v", err)
}
if len(m) == 0 {
- glog.Fatalf("-s must be a valid file or file glob pattern")
+ klog.Fatalf("-s must be a valid file or file glob pattern")
}
for _, file := range m {
docsForTypes = append(docsForTypes, kruntime.ParseDocumentationFrom(file)...)
