MCPcopy
hub / github.com/cli/cli / Filename

Method Filename

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

Source from the content-addressed store, hash-verified

43}
44
45func (g Gist) Filename() string {
46 filenames := make([]string, 0, len(g.Files))
47 for fn := range g.Files {
48 filenames = append(filenames, fn)
49 }
50 if len(filenames) == 0 {
51 return ""
52 }
53 sort.Strings(filenames)
54 return filenames[0]
55}
56
57func (g Gist) TruncDescription() string {
58 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