Skip to content
This repository has been archived by the owner on May 2, 2020. It is now read-only.

Commit

Permalink
Pass vars to new instances
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerb committed Jul 10, 2015
1 parent 8174517 commit af644dc
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions is.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ func (is *Is) Msg(format string, args ...interface{}) *Is {
TB: is.TB,
failFormat: format,
failArgs: args,
strict: is.strict,
}
}

Expand All @@ -44,8 +45,10 @@ func (is *Is) Msg(format string, args ...interface{}) *Is {
// at once.
func (is *Is) Lax() *Is {
return &Is{
TB: is.TB,
strict: false,
TB: is.TB,
strict: false,
failFormat: is.failFormat,
failArgs: is.failArgs,
}
}

Expand All @@ -54,8 +57,10 @@ func (is *Is) Lax() *Is {
// effect unless it is used to reverse a previous call to Lax.
func (is *Is) Strict() *Is {
return &Is{
TB: is.TB,
strict: true,
TB: is.TB,
strict: true,
failFormat: is.failFormat,
failArgs: is.failArgs,
}
}

Expand Down

0 comments on commit af644dc

Please sign in to comment.