Hash SHA1 func for Go

Hi.
How create alternative function php for Go?

base64_encode(pack(‘H*’, SHA-1(“qwerty”)))

Here’s an example for sha1

https://golang.org/pkg/crypto/sha1/#example_Sum

How realization function - pack. -> http://php.net/manual/ru/function.pack.php
pack — Pack data into binary string

The pack('H*', ...) thing looks like hex encoding from what I can see in the manual. Check out https://golang.org/pkg/encoding/hex/ or just fmt.Sprintf("%x", ...).

BTW, you know SHA-1 is insecure, right?