@@ -100,7 +100,7 @@ func init() {
100100 exitOnError (bindRootFlags (viper .GetViper ()), "bind root command flags" )
101101}
102102
103- // bindRootFlags binds flags on rootCmd to the given viper instance
103+ // bindRootFlags binds flags on rootCmd to the given viper instance.
104104func bindRootFlags (v * viper.Viper ) error {
105105 if err := v .BindPFlags (rootCmd .Flags ()); err != nil {
106106 return err
@@ -133,7 +133,7 @@ func exitOnError(err error, msg string) {
133133 }
134134}
135135
136- // Execute runs dfdaemon
136+ // Execute runs dfdaemon.
137137func Execute () {
138138 if err := rootCmd .Execute (); err != nil {
139139 logrus .Errorf ("dfdaemon failed: %v" , err )
@@ -145,7 +145,7 @@ func Execute() {
145145 }
146146}
147147
148- // getConfigFromViper returns dfdaemon config from the given viper instance
148+ // getConfigFromViper returns dfdaemon config from the given viper instance.
149149func getConfigFromViper (v * viper.Viper ) (* config.Properties , error ) {
150150 var cfg config.Properties
151151 if err := v .Unmarshal (& cfg , func (dc * mapstructure.DecoderConfig ) {
@@ -164,7 +164,7 @@ func getConfigFromViper(v *viper.Viper) (*config.Properties, error) {
164164}
165165
166166// decodeWithYAML returns a mapstructure.DecodeHookFunc to decode the given
167- // types by unmarshalling from yaml text
167+ // types by unmarshalling from yaml text.
168168func decodeWithYAML (types ... reflect.Type ) mapstructure.DecodeHookFunc {
169169 return func (f , t reflect.Type , data interface {}) (interface {}, error ) {
170170 for _ , typ := range types {
0 commit comments