refactor:优化日志打印方式

This commit is contained in:
Mmx
2021-05-03 14:30:15 +08:00
parent fb562f92c9
commit 7ceb7169e5
6 changed files with 36 additions and 32 deletions

View File

@@ -1,15 +1,15 @@
package Util
import (
"fmt"
"log"
"os"
)
func getbyte(a byte) int {
x := int(a)
if x > 255 {
fmt.Println("INVALID_CHARACTER_ERR: DOM Exception 5")
os.Exit(3)
log.Println("INVALID_CHARACTER_ERR: DOM Exception 5")
os.Exit(1)
}
return x
}