Make megacheck happier
This commit is contained in:
parent
0a63975d48
commit
7e86477a7d
|
@ -105,15 +105,15 @@ func NewSource(url string, minisignKeyStr string, cacheFile string, formatStr st
|
||||||
return source, err
|
return source, err
|
||||||
}
|
}
|
||||||
res, err := minisignKey.Verify([]byte(in), signature)
|
res, err := minisignKey.Verify([]byte(in), signature)
|
||||||
if err != nil || res != true {
|
if err != nil || !res {
|
||||||
return source, err
|
return source, err
|
||||||
}
|
}
|
||||||
if cached == false {
|
if !cached {
|
||||||
if err = AtomicFileWrite(cacheFile, []byte(in)); err != nil {
|
if err = AtomicFileWrite(cacheFile, []byte(in)); err != nil {
|
||||||
return source, err
|
return source, err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if sigCached == false {
|
if !sigCached {
|
||||||
if err = AtomicFileWrite(sigCacheFile, []byte(sigStr)); err != nil {
|
if err = AtomicFileWrite(sigCacheFile, []byte(sigStr)); err != nil {
|
||||||
return source, err
|
return source, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue