Code Monkey home page Code Monkey logo

docker-go2go's Introduction

Docker Cloud Build Status Docker Image Size (tag) Docker Image Version (latest by date) GitHub

docker-go2go

This docker image contains prebuilt set of go2go utils with aim to test and run your early go2 applications. The image serves as a nightly build of go's dev.go2go branch containing the implementation of the generics draft, specifically.

How to use the image?

You can you go2 utility to build, test and run you go2 files like this:

go2 run main.go2

The other option is to use this image as base of your own, like the following:

FROM virtyaluk/go2go:latest

WORKDIR /go/src
COPY ./src /go/src

CMD ["go2 run main.go2"]

You may also want to pass the source folder in and run the container directly like so:

docker run --rm -it --name test-go2go -v "$PWD":/go/src -w /go/src virtyaluk/go2go:latest go2 run main.go2

The dev.go2go branch

This branch contains a type checker and a translation tool for experimentation with generics in Go. This implements the generics design draft.

You can build this branch as usual. You can then use the new go2go tool. Write your generic code in a file with the extension .go2 instead of .go. Run it using go tool go2go run x.go2. There are some sample packages in cmd/go2go/testdata/go2path/src. You can see the full documentation for the tool by running go doc cmd/go2go.

The go2go tool will look for .go2 files using the environment variable GO2PATH. You can find some useful packages that you might want to experiment with by setting GO2PATH=$GOROOT/src/cmd/go2go/testdata/go2path.

If you find bugs in the updated type checker or in the translation tool, they should be filed in the standard Go issue tracker. Please start the issue title with cmd/go2go. Note that the issue tracker should only be used for reporting bugs in the tools, not for discussion of changes to the language.

Unlike typical dev branches, we do not intend any eventual merge of this code into the master branch. We will update it for bug fixes and change to the generic design draft. If a generics language proposal is accepted, it will be implemented in the standard compiler, not via a translation tool. The necessary changes to the go/* packages (go/ast, go/parser, and so forth) may re-use code from this prototype but will follow the usual code review process.

📗 License

Copyright (c) 2020 Bohdan Shtepan


modern-dev.com  ·  GitHub @virtyaluk  ·  Twitter @virtyaluk

docker-go2go's People

Contributors

virtyaluk avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.