コード例 #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
ファイル: payload.go プロジェクト: vinhhrv/go-libsass
func NewPayload() Payloader {
	return payload{
		s: spritewell.NewImageMap(),
		i: spritewell.NewImageMap(),
	}
}