You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ mkdir teststream &&cd teststream && go mod init github.com/voidint/teststream && touch main.go
step2
package main
import (
"fmt""strings""github.com/jucardi/go-streams/streams/v2"
)
funcmain() {
varfruitArray= []string{"peach", "apple", "pear", "plum", "pineapple", "banana", "kiwi", "orange"}
fmt.Println(streams.
// Creates a stream from the given arrayFrom[string](fruitArray).
// Adds a filter for strings that start with 'p'Filter(func(vstring) bool {
returnstrings.HasPrefix(v, "p")
}).
// Sorts alphabeticallySort(strings.Compare).
// Converts back to an arrayToArray(),
)
}
step3
$ go get github.com/jucardi/go-streams/streams/v2@latest
$ go mod tidy
go: finding module for package github.com/jucardi/go-streams/streams/v2
github.com/voidint/teststream imports
github.com/jucardi/go-streams/streams/v2: module github.com/jucardi/go-streams@latest found (v1.0.3), but does not contain package github.com/jucardi/go-streams/streams/v2
$ cat go.mod
module github.com/voidint/teststream
go 1.20
require github.com/jucardi/go-streams/v2 v2.0.1 // indirect
The text was updated successfully, but these errors were encountered:
$ go get github.com/jucardi/go-streams/streams/v2@latest $ go mod tidy go: finding module for package github.com/jucardi/go-streams/streams/v2 github.com/voidint/teststream imports github.com/jucardi/go-streams/streams/v2: module github.com/jucardi/go-streams@latest found (v1.0.3), but does not contain package github.com/jucardi/go-streams/streams/v2 $ cat go.mod module github.com/voidint/teststream go 1.20 require github.com/jucardi/go-streams/v2 v2.0.1 // indirect
The text was updated successfully, but these errors were encountered: