utils

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2017 License: Apache-2.0 Imports: 7 Imported by: 5

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 CheckError

func CheckError(err error)

CheckError will check if the err is nil, and exit the whole program

func ConfigDir

func ConfigDir() string

ConfigDir returns the current user's XDG config dir

func FetchAppDetail

func FetchAppDetail()

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

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