Git Product home page Git Product logo

Comments (4)

tianon avatar tianon commented on August 28, 2024 1

.godir is a great hack, but Go 1.4 added Custom Import Paths that we now prefer instead: https://golang.org/s/go14customimport

from docs.

yosifkit avatar yosifkit commented on August 28, 2024

ping @Moghedrin

from docs.

tianon avatar tianon commented on August 28, 2024

Just for reference, here's the current usage text:

$ docker run -it --rm golang go-wrapper

usage: go-wrapper command [args]

This script assumes that is is run from the root of your Go package (for
example, "/go/src/app" if your GOPATH is set to "/go").

The main feature of this wrapper over the native "go" tool is that it supports
the addition of a ".godir" file in your package directory which is a plain text
file that is the import path your application expects (ie, it would be something
like "github.com/jsmith/my-cool-app").  If this file is found, the current
package is then symlinked to /go/src/<.gopath> and the commands then use that
full import path to act on it.  This allows for applications to be universally
cloned into a path like "/go/src/app" and then automatically built properly so
that inter-package imports use the existing source instead of downloading it a
second time.  This also makes the final binary have the correct name (ie,
instead of being "/go/bin/app", it can be "/go/bin/my-cool-app"), which is why
the "run" command exists here.

Available Commands:

  go-wrapper download
  go-wrapper download -u
    (equivalent to "go get -d [args] [godir]")

  go-wrapper install
  go-wrapper install -race
    (equivalent to "go install [args] [godir]")

  go-wrapper run
  go-wrapper run -app -specific -arguments
    (assumes "GOPATH/bin" is in "PATH")

from docs.

yosifkit avatar yosifkit commented on August 28, 2024

We don't support golang versions older than 1.4 now, so we can remove the "undocumented .godir". 😈

from docs.

Related Issues (20)

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.