mirror of
https://github.com/onyx-and-iris/q3rcon-proxy.git
synced 2025-05-16 01:00:22 +01:00
remove redundant function getEnvInt
This commit is contained in:
parent
0d85129d31
commit
af0a72eb67
@ -1,18 +0,0 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
func getEnvInt(key string) (int, error) {
|
||||
s := os.Getenv(key)
|
||||
if s == "" {
|
||||
return 0, nil
|
||||
}
|
||||
v, err := strconv.Atoi(s)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
return v, nil
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user