(contents []byte)
| 211 | } |
| 212 | |
| 213 | func IsBinaryContents(contents []byte) bool { |
| 214 | isBinary := true |
| 215 | for mime := mimetype.Detect(contents); mime != nil; mime = mime.Parent() { |
| 216 | if mime.Is("text/plain") { |
| 217 | isBinary = false |
| 218 | break |
| 219 | } |
| 220 | } |
| 221 | return isBinary |
| 222 | } |
| 223 | |
| 224 | func PromptGists(prompter prompter.Prompter, client *http.Client, host string, cs *iostreams.ColorScheme) (gist *Gist, err error) { |
| 225 | gists, err := ListGists(client, host, 10, nil, false, "all") |
no outgoing calls