func (u *Update) getPath() (string, error) { if u.TargetPath == "" { return osext.Executable() } else { return u.TargetPath, nil } }
func defaultChecksum() string { path, err := osext.Executable() if err != nil { return "" } checksum, err := update.ChecksumForFile(path) if err != nil { return "" } return hex.EncodeToString(checksum) }