Last active
August 8, 2019 11:01
-
-
Save rberrelleza/a71a467d909ce714c083143e7283d450 to your computer and use it in GitHub Desktop.
openfaas + okteto blog post
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
| package function | |
| import ( | |
| "crypto/sha256" | |
| "fmt" | |
| "time" | |
| ) | |
| // Handle a serverless request | |
| func Handle(req []byte) string { | |
| s := sha256.Sum256(req) | |
| now := time.Now().Format("2006-01-02T15:04:05") | |
| return fmt.Sprintf("[%s] Hello, Go. You said: %x", now, s) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment