Improving logs and cleaning un-referenced code (#295)

This commit is contained in:
Igor Gov
2021-09-22 11:14:20 +03:00
committed by GitHub
parent 02bd7883cb
commit 7f837fe947
3 changed files with 6 additions and 32 deletions

View File

@@ -54,15 +54,14 @@ func ReverseSlice(data interface{}) {
func CheckErr(e error) {
if e != nil {
rlog.Infof("%v", e)
//panic(e)
rlog.Errorf("%v", e)
}
}
func SetHostname(address, newHostname string) string {
replacedUrl, err := url.Parse(address)
if err != nil {
rlog.Infof("error replacing hostname to %s in address %s, returning original %v", newHostname, address, err)
rlog.Errorf("error replacing hostname to %s in address %s, returning original %v", newHostname, address, err)
return address
}
replacedUrl.Host = newHostname