修正代码中的若干拼写错误

This commit is contained in:
Tnze
2019-07-16 23:28:02 +08:00
parent ce9ce6c6f2
commit a7858a2459
8 changed files with 32 additions and 32 deletions

View File

@ -53,9 +53,9 @@ func main() {
}
func getAddr() (string, int) {
const useage = "Useage: mcping <hostname>[:port]"
const usage = "Usage: mcping <hostname>[:port]"
if len(os.Args) < 2 {
fmt.Println("no host name.", useage)
fmt.Println("no host name.", usage)
os.Exit(1)
}
@ -68,7 +68,7 @@ func getAddr() (string, int) {
var err error
port, err = strconv.Atoi(addr[1])
if err != nil {
fmt.Println(err, useage)
fmt.Println(err, usage)
os.Exit(1)
}
}