diff --git a/cmd/cheat/cmd_directories.go b/cmd/cheat/cmd_directories.go index 7b20e4c..eeadd36 100644 --- a/cmd/cheat/cmd_directories.go +++ b/cmd/cheat/cmd_directories.go @@ -27,5 +27,5 @@ func cmdDirectories(opts map[string]interface{}, conf config.Config) { // write columnized output to stdout w.Flush() - display.Display(out.String(), conf) + display.Write(out.String(), conf) } diff --git a/cmd/cheat/cmd_list.go b/cmd/cheat/cmd_list.go index 9907603..a66b7f2 100644 --- a/cmd/cheat/cmd_list.go +++ b/cmd/cheat/cmd_list.go @@ -105,5 +105,5 @@ func cmdList(opts map[string]interface{}, conf config.Config) { // write columnized output to stdout w.Flush() - display.Display(out.String(), conf) + display.Write(out.String(), conf) } diff --git a/cmd/cheat/cmd_search.go b/cmd/cheat/cmd_search.go index 9fb28c4..2219d4e 100644 --- a/cmd/cheat/cmd_search.go +++ b/cmd/cheat/cmd_search.go @@ -91,5 +91,5 @@ func cmdSearch(opts map[string]interface{}, conf config.Config) { // display the output // NB: resist the temptation to call `display.Display` multiple times in // the loop above. That will not play nicely with the paginator. - display.Display(out, conf) + display.Write(out, conf) } diff --git a/cmd/cheat/cmd_tags.go b/cmd/cheat/cmd_tags.go index 3358bdd..6187d88 100644 --- a/cmd/cheat/cmd_tags.go +++ b/cmd/cheat/cmd_tags.go @@ -26,5 +26,5 @@ func cmdTags(opts map[string]interface{}, conf config.Config) { } // display the output - display.Display(out, conf) + display.Write(out, conf) } diff --git a/cmd/cheat/cmd_view.go b/cmd/cheat/cmd_view.go index 42a61f9..643950a 100644 --- a/cmd/cheat/cmd_view.go +++ b/cmd/cheat/cmd_view.go @@ -50,7 +50,7 @@ func cmdView(opts map[string]interface{}, conf config.Config) { } // display the cheatsheet - display.Display(display.Indent(sheet.Text), conf) + display.Write(display.Indent(sheet.Text), conf) } } @@ -76,5 +76,5 @@ func cmdView(opts map[string]interface{}, conf config.Config) { } // display the cheatsheet - display.Display(sheet.Text, conf) + display.Write(sheet.Text, conf) } diff --git a/internal/display/display.go b/internal/display/display.go index d0930cd..c1bd2b4 100644 --- a/internal/display/display.go +++ b/internal/display/display.go @@ -9,9 +9,9 @@ import ( "github.com/cheat/cheat/internal/config" ) -// Display writes output either directly to stdout, or through a pager, +// Write writes output either directly to stdout, or through a pager, // depending upon configuration. -func Display(out string, conf config.Config) { +func Write(out string, conf config.Config) { // if no pager was configured, print the output to stdout and exit if conf.Pager == "" { fmt.Print(out)