This commit is contained in:
azw 2024-08-03 16:17:36 +08:00
parent d40b258a47
commit ba4b733a80

View File

@ -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
} }