github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/config/base_flags.go (about)

     1  package config
     2  
     3  import (
     4  	"github.com/spf13/pflag"
     5  
     6  	"github.com/onflow/flow-go/network/netconf"
     7  )
     8  
     9  const (
    10  	configFileFlagName = "config-file"
    11  )
    12  
    13  // InitializePFlagSet initializes all CLI flags for the Flow node base configuration on the provided pflag set.
    14  // Args:
    15  //
    16  //	*pflag.FlagSet: the pflag set of the Flow node.
    17  //	*FlowConfig: the config used to set default values on the flags
    18  //
    19  // Note: in subsequent PR's all flag initialization for Flow node should be moved to this func.
    20  func InitializePFlagSet(flags *pflag.FlagSet, config *FlowConfig) {
    21  	flags.String(configFileFlagName, "", "provide a path to a Flow configuration file that will be used to set configuration values")
    22  	netconf.InitializeNetworkFlags(flags, config.NetworkConfig)
    23  }