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

Function humanize

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

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

Callers 1

initDefaultTitleBodyFunction · 0.85

Calls 1

MapMethod · 0.80

Tested by

no test coverage detected