Skip to content

Instantly share code, notes, and snippets.

@mamaz
Created November 9, 2018 16:15
Show Gist options
  • Save mamaz/999006e4ec7a1611baff9e7bfaa77193 to your computer and use it in GitHub Desktop.
Save mamaz/999006e4ec7a1611baff9e7bfaa77193 to your computer and use it in GitHub Desktop.
Simple print task
package printTask
import (
"fmt"
"sync"
)
// PrintM - Just print M a hundre times
func PrintM(waitgroup *sync.WaitGroup) {
defer waitgroup.Done()
const a = 'M'
for num := 0; num < 100; num++ {
fmt.Printf("%c ", a)
}
}
// PrintNumbers - print number
func PrintNumbers(waitgroup *sync.WaitGroup) {
defer waitgroup.Done()
for num := 0; num < 100; num++ {
fmt.Printf("%d ", num)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment