Skip to content

Commit

Permalink
支持镜像配置文件指定 (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
caoyingjunz authored Dec 31, 2024
1 parent 890816c commit a197fe9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions practise/image-practise/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ var (
user = flag.String("user", "", "docker register user")
password = flag.String("password", "", "docker register password")

filePath = flag.String("file-path", "", "image file path")
filePath = flag.String("configFile", "./config.yaml", "config file")
)

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

c := config.New()
c.SetConfigFile("./config.yaml")
c.SetConfigFile(*filePath)
c.SetConfigType("yaml")

var cfg image.Config
Expand Down

0 comments on commit a197fe9

Please sign in to comment.