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

Function humanize

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

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

Callers 1

initDefaultTitleBodyFunction · 0.85

Calls 1

MapMethod · 0.80

Tested by

no test coverage detected