Commit 24869ddf authored by yuzhiquan's avatar yuzhiquan

remove []byte trans, handle func error

parent 7cc01100
......@@ -197,7 +197,7 @@ func getPrivateRegistries(ctx context.Context, cfg *config.Node) (*templates.Reg
return nil, err
}
logrus.Infof("Using registry config file at %s", cfg.AgentConfig.PrivateRegistry)
if err := yaml.Unmarshal([]byte(privRegistryFile), &privRegistries); err != nil {
if err := yaml.Unmarshal(privRegistryFile, &privRegistries); err != nil {
return nil, err
}
return privRegistries, nil
......
......@@ -246,8 +246,8 @@ func (entry *Entry) Del() error {
if err != nil {
return err
}
entry.Set.Parent.Save()
return nil
return entry.Set.Parent.Save()
}
// Test wether an entry is in a set or not. Exit status number is zero if the
......
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