Skip to content

Commit

Permalink
Merge pull request #8 from achiku/master
Browse files Browse the repository at this point in the history
Add TestSetParamContext to sets ParamHolder for testing
  • Loading branch information
rs committed May 27, 2016
2 parents 6ccb3ce + 00bd70f commit 447ce20
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions testing.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package xmux

import "golang.org/x/net/context"

// TestSetParamContext sets ParamHolder to context.Context for testing
func TestSetParamContext(ctx context.Context, p ParamHolder) context.Context {
return context.WithValue(ctx, paramsKey, p)
}

0 comments on commit 447ce20

Please sign in to comment.