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

Function humanize

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

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

Callers 1

initDefaultTitleBodyFunction · 0.85

Calls 1

MapMethod · 0.80

Tested by

no test coverage detected