go tool go2go translate ./**/*.go2 && go tool go2go run main.go2
- Clone go2go:
git clone git@github.com:golang/go.git $HOME/go2
git checkout dev.go2go
- Update
go
command to point to go2go
export GOROOT="$HOME/go2"
export PATH="$PATH:$GOROOT/bin"
alias go='$HOME/go2/bin/go'
- Clone pneumatic
git clone git@github.com:achannarasappa/pneumatic.git
- Symlink the working repo into the GOPATH
mkdir -p $GOROOT/src/github.com/achannarasappa
ln -s ./pneumatic $GOROOT/src/github.com/achannarasappa
go2go setup instructions
find . -maxdepth 1 -type d \( ! -name .\* \) -exec bash -c "cd '{}' && go tool go2go test" \;
pneumatic
is for experimental purposes only since the go2go
toolchain is experimental itself and many features found in the latest stable version of go are not implemented or do not work as expected.
- Standard recursive test command (
go test ./...
) does not work with go2go
pneumatic
will be updated to use the expected beta release of go 1.18 when available sometime in 2021.
The idea is that this library can be evolved as the generics implementation is developed in go 1.18.
pneumatic
uses an experimental compiler go2go
which implements the features and contract defined in the proposal for go generics. Generics are expected to released as part of go 1.18 in early 2022. go2go
may fall behind changes in the proposal but the expectation is that major aspects of the proposal will be retained in the final implementation.