88
99type Config struct {
1010 ConfigFilePath bool `name:"file-path" help:"Prints the path to your config file"`
11+ lib.NoStyleArgs
1112}
1213
1314func (opt * Config ) Help () string {
@@ -19,18 +20,21 @@ You may use the output as template for setting up your config file, as its forma
1920}
2021
2122func (opt * Config ) Run (ctx app.Context ) app.Error {
23+ opt .NoStyleArgs .Apply (& ctx )
2224 if opt .ConfigFilePath {
2325 ctx .Print (app .Join (ctx .KlogConfigFolder (), app .CONFIG_FILE_NAME ).Path () + "\n " )
2426 return nil
2527 }
2628 for i , e := range app .CONFIG_FILE_ENTRIES {
27- ctx .Print (lib . Subdued .Format (lib .Reflower .Reflow (e .Help .Summary , []string {"# " })))
29+ ctx .Print (ctx . Serialiser () .Format (lib . Subdued , lib .Reflower .Reflow (e .Help .Summary , []string {"# " })))
2830 ctx .Print ("\n " )
29- ctx .Print (lib . Subdued .Format (lib .Reflower .Reflow ("Value: " + e .Help .Value , []string {"# - " , "# " })))
31+ ctx .Print (ctx . Serialiser () .Format (lib . Subdued , lib .Reflower .Reflow ("Value: " + e .Help .Value , []string {"# - " , "# " })))
3032 ctx .Print ("\n " )
31- ctx .Print (lib . Subdued .Format (lib .Reflower .Reflow ("Default: " + e .Help .Default , []string {"# - " , "# " })))
33+ ctx .Print (ctx . Serialiser () .Format (lib . Subdued , lib .Reflower .Reflow ("Default: " + e .Help .Default , []string {"# - " , "# " })))
3234 ctx .Print ("\n " )
33- ctx .Print (lib .Red .Format (e .Name ) + ` = ` + terminalformat.Style {Color : "227" }.Format (e .Value (ctx .Config ())))
35+ ctx .Print (ctx .Serialiser ().Format (lib .Red , e .Name ))
36+ ctx .Print (" = " )
37+ ctx .Print (ctx .Serialiser ().Format (terminalformat.Style {Color : "227" }, e .Value (ctx .Config ())))
3438 if i < len (app .CONFIG_FILE_ENTRIES )- 1 {
3539 ctx .Print ("\n \n " )
3640 }
0 commit comments