diff --git a/README.md b/README.md index 9ec43e7..f49575b 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ A curated collection of idiomatic design & application patterns for Go language. -#### a fork of [tmrts/go-patterns](https://github.com/tmrts/go-patterns) but merged in with other awesome forks. can go with [patterns-in-examples](https://github.com/crazybber/go-fucking-patterns) +#### a fork of [tmrts/go-patterns](https://github.com/tmrts/go-patterns) but merged in with other awesome forks. can go with [patterns-in-examples](https://github.com/crazybber/go-pattern-examples) ## Merged Repos @@ -123,4 +123,4 @@ A curated collection of idiomatic design & application patterns for Go language. ## A pattern implementation -[go-patterns-in-examples](https://github.com/crazybber/go-fucking-patterns) +[go-patterns-in-examples](https://github.com/crazybber/go-pattern-examples) diff --git a/playground/singleton/internal/singleton.go b/creational/singleton/singleton/internal/singleton.go similarity index 100% rename from playground/singleton/internal/singleton.go rename to creational/singleton/singleton/internal/singleton.go diff --git a/playground/singleton/main.go b/creational/singleton/singleton/main.go similarity index 100% rename from playground/singleton/main.go rename to creational/singleton/singleton/main.go diff --git a/profiling/profile.go b/profiling/profile.go index 7b615c6..d0ad946 100644 --- a/profiling/profile.go +++ b/profiling/profile.go @@ -18,8 +18,8 @@ func BigIntFactorial(x big.Int) *big.Int { defer Duration(time.Now(), "IntFactorial") y := big.NewInt(1) - for one := big.NewInt(1); x.Sign() > 0; x.Sub(x, one) { - y.Mul(y, x) + for one := big.NewInt(1); x.Sign() > 0; x.Sub(&x, one) { + y.Mul(y, &x) } return x.Set(y)