go(funcmap): add sha384,sha512 funcs
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
31ab083f8a
commit
852cc60a9e
@ -32,6 +32,26 @@ func FuncMap() template.FuncMap {
|
||||
return ""
|
||||
}
|
||||
|
||||
return *r
|
||||
},
|
||||
"sha384": func(path string) string {
|
||||
t := New("sha384")
|
||||
|
||||
r, err := t.Integrity(path, isLive)
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return *r
|
||||
},
|
||||
"sha512": func(path string) string {
|
||||
t := New("sha512")
|
||||
|
||||
r, err := t.Integrity(path, isLive)
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return *r
|
||||
},
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user