Commit c502cd7f authored by Jeromy's avatar Jeromy

rm panic

License: MIT
Signed-off-by: default avatarJeromy <jeromyj@gmail.com>
parent c40e6b58
......@@ -77,7 +77,7 @@ func WrapData(b []byte) []byte {
return out
}
func SymlinkData(path string) []byte {
func SymlinkData(path string) ([]byte, error) {
pbdata := new(pb.Data)
typ := pb.Data_Symlink
pbdata.Data = []byte(path)
......@@ -85,10 +85,10 @@ func SymlinkData(path string) []byte {
out, err := proto.Marshal(pbdata)
if err != nil {
panic(err)
return nil, err
}
return out
return out, nil
}
func UnwrapData(data []byte) ([]byte, error) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment