utils

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2016 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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

func MatchFiles

func MatchFiles(dir string, includes []string, excludes []string) ([]string, error)

MatchFiles will return all files matches the given pattern TODO: not elegent

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