21 lines
294 B
Go
21 lines
294 B
Go
package release
|
|
|
|
type File struct {
|
|
Name string
|
|
Size int64
|
|
MD5Sum string
|
|
SHA1 string
|
|
SHA256 string
|
|
}
|
|
|
|
func (f *File) Hash(key string) string {
|
|
if key == "MD5Sum" {
|
|
return f.MD5Sum
|
|
} else if key == "SHA1" {
|
|
return f.SHA1
|
|
} else if key == "SHA256" {
|
|
return f.SHA256
|
|
}
|
|
return ""
|
|
}
|