utils

package
v1.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArchiveFiles

func ArchiveFiles(targetPath string, files []struct{ Name, Path string }) error

ArchiveFiles will make a zip file archive to targetPath

func ConfigDir

func ConfigDir() string

ConfigDir returns the current user's XDG config dir

func FormatServerErrorResult

func FormatServerErrorResult(body string) string

FormatServerErrorResult format LeanCloud Server

func HomeDir

func HomeDir() string

HomeDir returns the system current user home directory

func IsFileExists

func IsFileExists(path string) bool

IsFileExists returns whether the file exists

func StripUTF8BOM added in v0.7.4

func StripUTF8BOM(stream []byte) []byte

StripUTF8BOM try to remove a file byte stream's UTF8 BOM header.

Types

type ErrorResult

type ErrorResult struct {
	Code  int    `json:"code"`
	Error string `json:"error"`
}

ErrorResult is the LeanCloud API Server API common error format

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL