Skip to content

Instantly share code, notes, and snippets.

@rberrelleza
Last active August 8, 2019 11:01
Show Gist options
  • Select an option

  • Save rberrelleza/a71a467d909ce714c083143e7283d450 to your computer and use it in GitHub Desktop.

Select an option

Save rberrelleza/a71a467d909ce714c083143e7283d450 to your computer and use it in GitHub Desktop.
openfaas + okteto blog post
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