This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// GetSelfMD5 get md5 of current program | |
func GetSelfMD5() string { | |
path, e := exec.LookPath(os.Args[0]) | |
if e != nil { | |
log.Println(`Self md5sum error: look path fail:`, e) | |
return "" | |
} | |
bs, e := ioutil.ReadFile(path) | |
if e != nil { | |
log.Println(`SelfMd5sum error: read file fail:`, e) |
OlderNewer