Documentation ¶
Index ¶
- Constants
- Variables
- func B2S(b []byte) string
- func BsToHex(s string) string
- func CheckSQLTextValue(s string) bool
- func CompressFiles(dest string, src ...string) (err error)
- func CompressZip(dest, srcDir string) (err error)
- func ContainsAll(group, sub []string) bool
- func ContainsAny(group, sub []string) bool
- func GbkStrToUtf8(s string) (d string, e error)
- func GbkToUtf8(s []byte) (d []byte, e error)
- func GetBasicBandIdx(bandOrder string) (idx [3]string, invalid bool)
- func GetDateSubDir(parentPath, date string) (path string, err error)
- func GetDistrictInShpName(shp string) (district string)
- func GetFilenameWithoutExt(path string) (name string)
- func GetNowTimeTag() string
- func GetShpInZip(zipFile, dstDir string) (path string, utf8 bool, err error)
- func GetUniqSubDir(parentPath string) (path string, err error)
- func Int64sToStr(ids []int64, sep byte) string
- func IsZip(fp string) bool
- func PurifyForUtf8(s string) string
- func ReplaceUnderline(s string) string
- func S2B(s string) []byte
- func StrArrToInts(ss []string) []int
- func StrToInt(s string) int
- func StrToInt32(s string) int32
- func StrToInt64(s string) int64
- func StrToInts(s, sep string) []int
- func StrToUint32(s string) uint32
- func StrToUint64(s string) uint64
- func TrimTailCommas(s string) string
- func UInt64sToStr(ids []uint64, sep byte) string
- func Unzip(archive, dstDir string) (files []string, err error)
- func Utf8StrToGbk(s string) (d string, e error)
- func Utf8ToGbk(s []byte) (d []byte, e error)
Constants ¶
View Source
const ( FILE_EXT_SHP = ".shp" FILE_EXT_CPG = ".cpg" FILE_EXT_TXT = ".txt" UTF8 = "UTF8" UTF_8 = "UTF-8" )
View Source
const (
ZIP_EXT = ".zip"
)
Variables ¶
View Source
var (
ErrAbsoluteZipPath = errors.New("absolute zip path")
)
View Source
var (
ErrNoShpInZip = errors.New("no shp in zip")
)
Functions ¶
func CompressFiles ¶
CompressFiles 打包任意个文件 src 输入的文件路径列表 dest zip文件存放路径
func CompressZip ¶
CompressZip 打包任意文件夹 srcDir 输入的文件夹相对路径 dest zip文件存放路径
func ContainsAll ¶
func ContainsAny ¶
func GetBasicBandIdx ¶
func GetDateSubDir ¶
func GetDistrictInShpName ¶
func GetFilenameWithoutExt ¶
func GetNowTimeTag ¶
func GetNowTimeTag() string
func GetUniqSubDir ¶
func Int64sToStr ¶
func PurifyForUtf8 ¶
func ReplaceUnderline ¶
func StrArrToInts ¶
func StrToInt32 ¶
func StrToInt64 ¶
func StrToUint32 ¶
func StrToUint64 ¶
func TrimTailCommas ¶
func UInt64sToStr ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.