File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,14 +57,26 @@ result, _ := columnize.SimpleFormat(output)
5757fmt.Println (result)
5858```
5959
60- You can fine-tune the format of the output by calling the ` Format ` method. This
61- lets you set spacing and delimiter selection.
60+ # Configuration
61+
62+ Columnize is configured using a ` Config ` , which can be obtained by calling the
63+ ` DefaultConfig() ` method. You can then tweak the settings in the resulting
64+ ` Config ` :
65+
66+ ```
67+ config := columnize.DefaultConfig()
68+ config.Delim = "|"
69+ config.Glue = " "
70+ ```
71+
72+ You can then pass the ` Config ` in using the ` Format ` method (signature below) to
73+ have text formatted to your liking.
6274
6375Usage
6476=====
6577
6678``` go
6779SimpleFormat (intput interface {}) (string , error )
6880
69- Format (input interface {}, delim string , space string ) (string , error )
81+ Format (input interface {}, config *Config ) (string , error )
7082```
You can’t perform that action at this time.
0 commit comments