MCPcopy
hub / github.com/cli/cli / humanize

Function humanize

pkg/cmd/pr/create/create.go:1295–1304  ·  view source on GitHub ↗

Humanize returns a copy of the string s that replaces all instance of '-' and '_' with spaces.

(s string)

Source from the content-addressed store, hash-verified

1293
1294// Humanize returns a copy of the string s that replaces all instance of '-' and '_' with spaces.
1295func humanize(s string) string {
1296 replace := "_-"
1297 h := func(r rune) rune {
1298 if strings.ContainsRune(replace, r) {
1299 return ' '
1300 }
1301 return r
1302 }
1303 return strings.Map(h, s)
1304}
1305
1306func requestableReviewersForCompletion(opts *CreateOptions) ([]string, error) {
1307 httpClient, err := opts.HttpClient()

Callers 1

initDefaultTitleBodyFunction · 0.85

Calls 1

MapMethod · 0.80

Tested by

no test coverage detected