diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-12-06 19:47:06 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-12-06 19:47:06 -0800 |
| commit | 5931a2f53f576207f23997bdd209888972ed51b5 (patch) | |
| tree | f93b5ad2895c2475e22fd1570afcdd2fd4115987 | |
| parent | 4c72482536292a4ec1db3a1f7778240bfde846ad (diff) | |
| download | seaweedfs-5931a2f53f576207f23997bdd209888972ed51b5.tar.xz seaweedfs-5931a2f53f576207f23997bdd209888972ed51b5.zip | |
filer conf: support json conf only
| -rw-r--r-- | weed/filer/filer_conf.go | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/weed/filer/filer_conf.go b/weed/filer/filer_conf.go index 0328fdbff..d56db3b8e 100644 --- a/weed/filer/filer_conf.go +++ b/weed/filer/filer_conf.go @@ -9,7 +9,6 @@ import ( "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" "github.com/chrislusf/seaweedfs/weed/util" "github.com/golang/protobuf/jsonpb" - "github.com/golang/protobuf/proto" "github.com/viant/ptrie" ) @@ -61,15 +60,7 @@ func (fc *FilerConf) LoadFromBytes(data []byte) (err error) { conf := &filer_pb.FilerConf{} if err := jsonpb.Unmarshal(bytes.NewReader(data), conf); err != nil { - - err = proto.UnmarshalText(string(data), conf) - if err != nil { - glog.Errorf("unable to parse filer conf: %v", err) - // this is not recoverable - return nil - } - - return nil + return err } return fc.doLoadConf(conf) |
