Last active
December 16, 2015 02:32
-
-
Save 178inaba/11523503f29f46a137c1 to your computer and use it in GitHub Desktop.
it is a different type, but content to cast the same type. (ex. gin.H -> pongo2.Context)
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 main | |
| import "fmt" | |
| type H map[string]interface{} | |
| type Context map[string]interface{} | |
| func main() { | |
| var h H | |
| h = H{"message": "hello", "status": 200} | |
| var context Context | |
| context = Context(h) | |
| fmt.Println(h, context) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment