Getting started · Section 02 / 02
Install fp-go.
One go get and you're ready. v2 is the active line; v1 remains supported for Go 1.18–1.23.
// Go required
1.24+v2
v1 still supports Go 1.18+.
// Install command
go get github.com/IBM/fp-go/v2@latest// Versioning
Follows SemVer.
01
Difficulty · BeginnerRequirements
Go version.
fp-go v2 requires Go 1.24 or later for the latest generics features and improvements.
02
Install fp-go.
Latest version (v2.2.82)
shelltested
go get github.com/IBM/fp-go/v2@latest
Pin a specific version
shelltested
go get github.com/IBM/fp-go/v2@v2.2.82
The library follows semantic versioning.
Check the installed version
shell
go list -m github.com/IBM/fp-go/v2
03
Verify the install.
main.gotested
package main
import (
"fmt"
"github.com/IBM/fp-go/v2/option"
)
func main() {
some := option.Some(42)
fmt.Println(option.IsSome(some)) // true
}You're set.
Next, head to the quickstart to build your first fp-go program, or jump to Option to learn a core data type.