Code clean up

This commit is contained in:
NI
2022-04-15 18:42:16 +08:00
parent 0c3c4952fc
commit f884d7cf76
19 changed files with 46 additions and 66 deletions

View File

@@ -51,7 +51,7 @@ func (s String) Parse() (string, error) {
f, e := os.Open(fPath)
if e != nil {
return "", fmt.Errorf("Unable to open %s: %s", fPath, e)
return "", fmt.Errorf("unable to open %s: %s", fPath, e)
}
defer f.Close()
@@ -59,7 +59,7 @@ func (s String) Parse() (string, error) {
fData, e := ioutil.ReadAll(f)
if e != nil {
return "", fmt.Errorf("Unable to read from %s: %s", fPath, e)
return "", fmt.Errorf("unable to read from %s: %s", fPath, e)
}
return string(fData), nil
@@ -74,6 +74,6 @@ func (s String) Parse() (string, error) {
default:
return "", fmt.Errorf(
"Scheme \"%s\" was unsupported", ss[:sSchemeLeadIdx])
"scheme \"%s\" was unsupported", ss[:sSchemeLeadIdx])
}
}