I want to be able to switch between hash algorithms depending on caller input, for example, implement a function:
func GenericHash(dat []byte, hash unint) (string, error) { ... }
where hash is the algorithm type as specified by crypto.Hash.
I'm not sure how to write this function, in particular, where the import statements should go. If I include all the import statements for algorithms that I will use at the top, go complains that they're imported and not used. Is there anyway to import on demand?