1
This commit is contained in:
parent
d40b258a47
commit
ba4b733a80
17
sysutils.go
17
sysutils.go
@ -1,18 +1,18 @@
|
||||
package q5
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"hash/crc32"
|
||||
"io/ioutil"
|
||||
"net"
|
||||
"net/http"
|
||||
"os"
|
||||
"reflect"
|
||||
"time"
|
||||
"sync"
|
||||
"runtime"
|
||||
"hash/crc32"
|
||||
"bufio"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
func GetDaySeconds(seconds int64, timeZone int64) int64 {
|
||||
@ -358,6 +358,15 @@ func ExcUntilOk(cb func()bool) {
|
||||
}
|
||||
}
|
||||
|
||||
func ReadTextFile(fileName string) (string, error) {
|
||||
if f, err := os.Open(fileName); err == nil {
|
||||
data, err := ioutil.ReadAll(bufio.NewReader(f))
|
||||
return string(data), err
|
||||
} else {
|
||||
return "", err
|
||||
}
|
||||
}
|
||||
|
||||
func IsDebug() bool {
|
||||
return true
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user