mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-24 21:56:05 +02:00
commands: Remove flagChanged from commandeer
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
eb27c47fc5
commit
c7535b9c25
@@ -461,13 +461,13 @@ func (c *commandeer) initializeFlags(cmd *cobra.Command) {
|
||||
}
|
||||
|
||||
func (c *commandeer) setValueFromFlag(flags *flag.FlagSet, key string) {
|
||||
if c.flagChanged(flags, key) {
|
||||
if flagChanged(flags, key) {
|
||||
f := flags.Lookup(key)
|
||||
c.Set(key, f.Value.String())
|
||||
}
|
||||
}
|
||||
|
||||
func (c *commandeer) flagChanged(flags *flag.FlagSet, key string) bool {
|
||||
func flagChanged(flags *flag.FlagSet, key string) bool {
|
||||
flag := flags.Lookup(key)
|
||||
if flag == nil {
|
||||
return false
|
||||
|
Reference in New Issue
Block a user