github.com/likebike/go--@v0.0.0-20190911215757-0bd925d16e96/README.txt (about)

     1  Welcome to Go-- , a fork of Go that exports all symbols, so you can access EVERYTHING, like Python!
     2  Remember, with great power comes great responsibility.  Please don't complain if you're using a private API and it changes without notice.
     3  
     4  Go-- just consists of several single-line edits to the Go src/ tree.
     5  Here is how you can easily see the diff:
     6  
     7      git diff go1.10.2 go--1.10.2 go/
     8  
     9  
    10  Here is a quick summary of how to build Go--.  It's exactly the same process as building normal Go:
    11  
    12      # Note that, since Go is written in Go, you need to already have Go to build Go or Go--.
    13      # So you might find it convenient to download one of the binary distributions from https://golang.org/dl/
    14      # Use the GOROOT of your already-installed Go for the GOROOT_BOOTSTRAP value.  You can use "go env GOROOT" to find this value:
    15      export GOROOT_BOOTSTRAP="$(go env GOROOT)"
    16      export PATH="$GOROOT_BOOTSTRAP/bin:$PATH"
    17      which go   # Make sure we're using the bootstrap version of go.
    18  
    19      git clone https://github.com/likebike/go--
    20      cd go--
    21      git checkout go--1.10.2
    22      cd go/src
    23      ./make.bash
    24  
    25      # That's it!  The result will be located at ./go/bin/go .  Note that it's still called 'go' even though it's go-- .
    26      # I don't suggest that you re-name it to 'go--' because most tools expect it to be called 'go'.  Just set your PATH instead.
    27  
    28      # Here is the standard method to install the amazing monkey patch library:
    29      GOPATH=/path/to/your/GoPathDir go--/bin/go get github.com/bouk/monkey
    30  
    31  
    32  Here is how we upgrade when new versions of Go are released:
    33  
    34      OLD_VERSION=1.10
    35      NEW_VERSION=1.10.2
    36  
    37      # First, generate the current Go-- diff:
    38      git checkout go--
    39      git diff upstream go/ >diffs/v$OLD_VERSION
    40      git add diffs/v$OLD_VERSION
    41      git commit -m"Generate diff of v$OLD_VERSION before upgrade to v$NEW_VERSION"
    42  
    43      # Next, upgrade the 'upstream' branch:
    44      git checkout upstream
    45      rm -r go
    46      curl "https://dl.google.com/go/go${NEW_VERSION}.src.tar.gz" | tar x     # Creates the new 'go' directory.
    47      git diff                            # Review changes briefly, just to get an idea of their scope.
    48      git add go                          # Add new files.
    49      git status                          # Make sure nothing is forgotten.
    50      git commit -m"Upgrade to v$NEW_VERSION"
    51  
    52      # Re-apply Go-- edits.  You need to re-think each one while applying it:
    53      git checkout go--
    54      git merge upstream
    55      vim diff/v$OLD_VERSION   # Use a vsplit and Manually review/re-apply edits from diff.
    56      git diff                 # Review
    57      git diff upstream        # Review
    58      git diff upstream go/ >diffs/v$NEW_VERSION
    59      git add diffs/v$NEW_VERSION
    60      git commit -a -m"Upgrade to v$NEW_VERSION"
    61      git push --all
    62      git tag go--$NEW_VERSION
    63      git push --tags
    64  
    65  
    66  Other Notes:
    67      # I'm in China, so I often need to proxy my connections:
    68      ALL_PROXY='socks5h://127.0.0.1:1080' curl -O 'https://dl.google.com/go/go1.10.2.src.tar.gz'
    69