Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. package function
  2.  
  3. import (
  4. "crypto/sha256"
  5. "fmt"
  6. "time"
  7. )
  8.  
  9. // Handle a serverless request
  10. func Handle(req []byte) string {
  11. s := sha256.Sum256(req)
  12. now := time.Now().Format("2006-01-02T15:04:05")
  13. return fmt.Sprintf("[%s] Hello, Go. You said: %x", now, s)
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement