Skip to content

Instantly share code, notes, and snippets.

@browny
Created September 8, 2017 04:13
Show Gist options
  • Save browny/b04a6e5a6768d85659c5e93ea232f2bf to your computer and use it in GitHub Desktop.
Save browny/b04a6e5a6768d85659c5e93ea232f2bf to your computer and use it in GitHub Desktop.
func (e *Encryptor) Run(srcType, dstType string) error {
var src []byte
switch srcType {
case "file":
src = e.readFromFile(x, y, z)
case "database":
src = e.readFromDatabase(i, j)
}
// encrypt
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment