fix: crash
This commit is contained in:
@@ -29,7 +29,7 @@ func ParseConfig(path string, debug bool) ([]byte, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return ParseConfigContent(string(content), debug, nil, false)
|
return ParseConfigContent(string(content), debug, DefaultConfigOptions(), false)
|
||||||
}
|
}
|
||||||
func ParseConfigContent(contentstr string, debug bool, configOpt *ConfigOptions, fullConfig bool) ([]byte, error) {
|
func ParseConfigContent(contentstr string, debug bool, configOpt *ConfigOptions, fullConfig bool) ([]byte, error) {
|
||||||
content := []byte(contentstr)
|
content := []byte(contentstr)
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ func Parse(in *pb.ParseRequest) (*pb.ParseResponse, error) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
config, err := config.ParseConfigContent(content, true, nil, false)
|
config, err := config.ParseConfigContent(content, true, config.DefaultConfigOptions(), false)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return &pb.ParseResponse{
|
return &pb.ParseResponse{
|
||||||
ResponseCode: pb.ResponseCode_FAILED,
|
ResponseCode: pb.ResponseCode_FAILED,
|
||||||
|
|||||||
Reference in New Issue
Block a user