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

Method Filename

pkg/cmd/gist/shared/shared.go:46–56  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

44}
45
46func (g Gist) Filename() string {
47 filenames := make([]string, 0, len(g.Files))
48 for fn := range g.Files {
49 filenames = append(filenames, fn)
50 }
51 if len(filenames) == 0 {
52 return ""
53 }
54 sort.Strings(filenames)
55 return filenames[0]
56}
57
58func (g Gist) TruncDescription() string {
59 return text.Truncate(100, text.RemoveExcessiveWhitespace(g.Description))

Callers 2

deleteRunFunction · 0.95
PromptGistsFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected