summaryrefslogtreecommitdiff
path: root/panic.go
blob: 8ed4df799e973fab453126c969aad474d1ca252b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package config

import "google.golang.org/protobuf/proto"

// should this be a function?
func LoadPanicPB(pb proto.Message) error {
	fullname, err := GetFilename(pb)
	if err != nil {
		panic("config.LoadPB() err")
	}
	if fullname == "" {
		panic("config.LoadPB() got blank filename = ''")
	}
	return LoadPB(pb)
}