()
| 43 | } |
| 44 | |
| 45 | func (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 | |
| 57 | func (g Gist) TruncDescription() string { |
| 58 | return text.Truncate(100, text.RemoveExcessiveWhitespace(g.Description)) |
no outgoing calls
no test coverage detected