1
This commit is contained in:
parent
d40b258a47
commit
ba4b733a80
17
sysutils.go
17
sysutils.go
@ -1,18 +1,18 @@
|
|||||||
package q5
|
package q5
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bufio"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"hash/crc32"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"reflect"
|
"reflect"
|
||||||
"time"
|
|
||||||
"sync"
|
|
||||||
"runtime"
|
"runtime"
|
||||||
"hash/crc32"
|
"sync"
|
||||||
"bufio"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetDaySeconds(seconds int64, timeZone int64) int64 {
|
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 {
|
func IsDebug() bool {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user