示例#1
0
// New returns a Context with an attached payload for Sprites and Images
func New() context.Context {
	ctx := context.WithValue(context.TODO(),
		spriteKey, spritewell.NewImageMap())
	ctx = context.WithValue(ctx,
		imageKey, spritewell.NewImageMap())

	return ctx
}
示例#2
0
func NewPayload() Payloader {
	return payload{
		s: spritewell.NewImageMap(),
		i: spritewell.NewImageMap(),
	}
}