Browse Source

docs(bezero): fix subject

- upgrade instructions
- add missing import 'piscine'
- fix indentation
DEV-3202-new-go-exercicse-be-zero-fix
Tiago Collot 2 years ago
parent
commit
9864691922
  1. 9
      subjects/bezero/README.md

9
subjects/bezero/README.md

@ -2,7 +2,7 @@
### Instructions ### Instructions
- Write a function that takes a slice of integers and returns the same slice by initializing all the elements to 0. Write a function that takes a slice of integers as an argument and returns the same slice by initializing all the elements to 0.
- If the slice is empty, return an empty slice. - If the slice is empty, return an empty slice.
### Expected function ### Expected function
@ -22,12 +22,14 @@ package main
import ( import (
"fmt" "fmt"
"piscine"
) )
func main() { func main() {
fmt.Println(BeZero([]int{1,2,3,4,5,6})) fmt.Println(piscine.BeZero([]int{1, 2, 3, 4, 5, 6}))
fmt.Println(BeZero([]int{})) fmt.Println(piscine.BeZero([]int{}))
} }
``` ```
And its output: And its output:
@ -37,4 +39,3 @@ $ go run .
[0 0 0 0 0 0] [0 0 0 0 0 0]
[] []
``` ```

Loading…
Cancel
Save