deb-simple/deb/release/release_file.go

21 lines
294 B
Go
Raw Normal View History

2017-09-11 02:58:50 +00:00
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 ""
}