mirror of
https://github.com/gonum/gonum.git
synced 2025-10-13 02:43:59 +08:00
wrong name of examples.go
This commit is contained in:
@@ -13,6 +13,6 @@ func ExampleAdd() {
|
|||||||
fmt.Println("s1 = ", s1)
|
fmt.Println("s1 = ", s1)
|
||||||
fmt.Println("s2 = ", s2)
|
fmt.Println("s2 = ", s2)
|
||||||
// Output:
|
// Output:
|
||||||
// s1 = [6,8,10,12]
|
// s1 = [6 8 10 12]
|
||||||
// s2 = [6,8,10,12]
|
// s2 = [5 6 7 8]
|
||||||
}
|
}
|
||||||
|
18
examples_test.go
Normal file
18
examples_test.go
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
package sliceops
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Set of examples for all the functions
|
||||||
|
|
||||||
|
func ExampleAdd() {
|
||||||
|
s1 := []float64{1, 2, 3, 4}
|
||||||
|
s2 := []float64{5, 6, 7, 8}
|
||||||
|
Add(s1, s2)
|
||||||
|
fmt.Println("s1 = ", s1)
|
||||||
|
fmt.Println("s2 = ", s2)
|
||||||
|
// Output:
|
||||||
|
// s1 = [6, 8, 10, 12]
|
||||||
|
// s2 = [5, 6, 7, 8]
|
||||||
|
}
|
Reference in New Issue
Block a user