A FAIRE
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
883 B

/*
------------------------------------------------------------------------------------------------------------------------
####### util ####### Copyright (c) 2021 mls-361 #################################################### MIT License #######
------------------------------------------------------------------------------------------------------------------------
*/
package util
import "os"
// CopyKV AFAIRE.
func CopyKV(s, d map[string]interface{}) {
if d == nil {
d = make(map[string]interface{})
}
for k, v := range s {
d[k] = v
}
}
// PathExists AFAIRE.
func PathExists(path string) (bool, error) {
_, err := os.Stat(path)
if err == nil {
return true, nil
}
if os.IsNotExist(err) {
return false, nil
}
return false, err
}
/*
######################################################################################################## @(°_°)@ #######
*/