File: split.go

package info (click to toggle)
golang-gopkg-h2non-filetype.v1 1.0.5%2Bds1-2.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, bullseye-backports
  • size: 172 kB
  • sloc: makefile: 4
file content (11 lines) | stat: -rw-r--r-- 164 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
package types

import "strings"

func splitMime(s string) (string, string) {
	x := strings.Split(s, "/")
	if len(x) > 1 {
		return x[0], x[1]
	}
	return x[0], ""
}