mirror of
https://github.com/Li4n0/revsuit.git
synced 2026-09-26 08:31:52 +08:00
Use golint to normalize the code (#1)
This commit is contained in:
@@ -35,7 +35,7 @@ func get(url string) (b []byte, err error) {
|
||||
defer resp.Body.Close()
|
||||
|
||||
b, err = ioutil.ReadAll(resp.Body)
|
||||
return
|
||||
return b, err
|
||||
}
|
||||
|
||||
func getKey(b []byte) (key uint32, err error) {
|
||||
@@ -43,7 +43,7 @@ func getKey(b []byte) (key uint32, err error) {
|
||||
return 0, errors.New("copywrite.rar is corrupt")
|
||||
}
|
||||
key = binary.LittleEndian.Uint32(b[20:])
|
||||
return
|
||||
return key, err
|
||||
}
|
||||
|
||||
func decrypt(b []byte, key uint32) (_ []byte, err error) {
|
||||
|
||||
@@ -21,7 +21,7 @@ func init() {
|
||||
log.Error("Download qqwry.dat failed, caused by:%v, recommend to download it by yourself otherwise the `IpArea` will be null", err.Error())
|
||||
}
|
||||
}
|
||||
} else if info.ModTime().Sub(time.Now()) > 5*24*time.Hour {
|
||||
} else if time.Until(info.ModTime()) > 5*24*time.Hour {
|
||||
log.Info("Updating qqwry.dat...")
|
||||
err := download()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user