Created
September 7, 2017 08:23
-
-
Save browny/c2d9bf9f5bec269fdf7d3798de584c9b to your computer and use it in GitHub Desktop.
diig_run_01.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func (e *Encryptor) Run(src, dst string) error { | |
| dat, err := ioutil.ReadFile(src) | |
| if err != nil { | |
| return nil | |
| } | |
| result := e.encrypt(dat) | |
| return ioutil.WriteFile(dst, result, 0644) | |
| } | |
| func (e *Encryptor) encrypt(dat []byte) []byte { | |
| return []byte("awesome encrypt") | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment