Skip to content

Commit

Permalink
remove failing test, not too useful as an example and then it allows …
Browse files Browse the repository at this point in the history
…us to set up some automated builds in travis later
  • Loading branch information
quii committed Mar 14, 2018
1 parent c5a4afb commit c2c6406
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 26 deletions.
2 changes: 2 additions & 0 deletions contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ If you don't feel confident to submit your own guide, submitting an issue for so

- Try and minimise the surface area of required knowledge. Thinking of examples that showcase what you're trying to teach without confusing the reader with lots of other features is important.
- Follow the [Code Review Comments style guide](https://github.com/golang/go/wiki/CodeReviewComments). It's important for a consistent style across all the sections.
- Your section should have a runnable application at the end (e.g `package main` with a `main` func) so users can see it in action and play with it
- All tests should pass
- `go fmt` the code.
7 changes: 5 additions & 2 deletions for/v1/repeat.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package main

func Repeat(character string) (repeated string) {
func Repeat(character string) (repeated string) {
for i := 0; i < 5; i++ {
repeated = repeated + character
}
return
}
}
6 changes: 4 additions & 2 deletions for/v2/repeat.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package main

const repeatCount = 5

func Repeat(character string) (repeated string) {
for i := 0; i < 5; i++ {
repeated = repeated + character
for i := 0; i < repeatCount; i++ {
repeated += character
}
return
}
10 changes: 0 additions & 10 deletions for/v3/repeat.go

This file was deleted.

12 changes: 0 additions & 12 deletions for/v3/repeat_test.go

This file was deleted.

0 comments on commit c2c6406

Please sign in to comment.