Sha256: 66682d5b947b3a9e0b2c06297ccf77fc05864084f4a2ebcb32a9a318d3e2f6ec
Contents?: true
Size: 642 Bytes
Versions: 5
Compression:
Stored size: 642 Bytes
Contents
<%- user_editable -%> <%- package 'goonstore' -%> <%- import "golang.org/x/net/context" import "github.com/mjibson/goon" -%> // // Use the following code if you want to change kind name from model struct name. // var ModelNameToKindMap = map[string]string{ // "Person": "People", // "Book": "Books", // } func FromContext(c context.Context) *goon.Goon { r := goon.FromContext(c) // baseResolver := r.KindNameResolver // r.KindNameResolver = func(src interface{}) string { // base := baseResolver(src) // mapped := ModelNameToKindMap[base] // if mapped != "" { // return mapped // } // return base // } return r }
Version data entries
5 entries across 5 versions & 1 rubygems