MCPcopy Create free account
hub / github.com/cli/cli / humanize

Function humanize

pkg/cmd/pr/create/create.go:1376–1385  ·  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

1374
1375// Humanize returns a copy of the string s that replaces all instance of '-' and '_' with spaces.
1376func humanize(s string) string {
1377 replace := "_-"
1378 h := func(r rune) rune {
1379 if strings.ContainsRune(replace, r) {
1380 return ' '
1381 }
1382 return r
1383 }
1384 return strings.Map(h, s)
1385}
1386
1387func requestableReviewersForCompletion(opts *CreateOptions) ([]string, error) {
1388 httpClient, err := opts.HttpClient()

Callers 1

initDefaultTitleBodyFunction · 0.85

Calls 1

MapMethod · 0.80

Tested by

no test coverage detected