Documentation
¶
Index ¶
- func Age(unixTime int64) string
- func Clear(v interface{})
- func DownloadFile(url string, filepath string) error
- func ExistDir(dirname string) bool
- func FileExists(filePath string) (bool, error)
- func GenerateTmpFile() (string, error)
- func GetJiraKeys(title string) (keys []string)
- func GetJsonData(jsonValues map[string]interface{}) map[string]string
- func GetRequestBody(body interface{}) io.Reader
- func GetURLHostName(urlAddr string) string
- func GetUrl(URL string) (string, error)
- func JsonToYaml(json map[string]interface{}) (string, error)
- func RecursionGetKeyAndValue(jsonValues map[string]interface{}, mapKey string)
- func RecursionReplaceValue(jsonValues map[string]interface{}, replaceKeyArr []string, ...)
- func ReplaceMapValue(jsonValues map[string]interface{}, replaceMap map[string]interface{}) map[string]interface{}
- func ReplaceRepo(origin, addr, namespace string) string
- func ReplaceWrapLine(script string) string
- func SendRequest(url, method string, header http.Header, body []byte) ([]byte, error)
- func Tar(src, dst string) (err error)
- func UnTar(dst, src string) (err error)
- func ValidateObjectId(id string) (oid bson.ObjectId, err error)
- func WriteFile(filename string, data []byte, perm os.FileMode) error
- func YamlToJson(valuesYaml string) (map[string]interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Age ¶
Age returns a string representing the time elapsed since unixTime in the form "1d", "2h", "3m", or "4s".
func DownloadFile ¶
func FileExists ¶
func GenerateTmpFile ¶
func GetJiraKeys ¶
func GetJsonData ¶
func GetRequestBody ¶
func JsonToYaml ¶
func RecursionGetKeyAndValue ¶
RecursionGetKeyAndValue 递归获取map中的key和value
func RecursionReplaceValue ¶
func RecursionReplaceValue(jsonValues map[string]interface{}, replaceKeyArr []string, replaceValue interface{})
RecursionReplaceValue 递归替换map中的value
func ReplaceMapValue ¶
func ReplaceMapValue(jsonValues map[string]interface{}, replaceMap map[string]interface{}) map[string]interface{}
ReplaceMapValue 拿匹配到的key和value去替换原始的map中的key和value
func ReplaceRepo ¶
func ReplaceWrapLine ¶
func SendRequest ¶
func YamlToJson ¶
Types ¶
This section is empty.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.