common.go

 1package jsons
 2
 3import (
 4	"path/filepath"
 5	"strings"
 6)
 7
 8func must(errs ...error) {
 9	for _, err := range errs {
10		if err != nil {
11			panic(err)
12		}
13	}
14}
15
16func getExtension(filename string) string {
17	ext := filepath.Ext(filename)
18	return strings.ToLower(ext)
19}