Documentation
¶
Overview ¶
Gonew starts a new Go module by cloning a template repository.
Usage:
gonew src repo[@version] [dstmod [dir]]
Gonew clones the src repo, changing its module path to dstmod. It writes that new module to a new directory named by dir. If dir already exists, it must be an empty directory. If dir is omitted, gonew uses ./elem where elem is the final path element of dstmod.
This command is highly experimental and subject to change.
Example ¶
To install gonew:
go install github.com/your-username/gonew@latest
To clone the basic command-line program template github.com/example/hello as your.domain/myprog, in the directory ./myprog:
gonew github.com/example/hello your.domain/myprog
To clone the latest copy of the github.com/rsc/quote repository, keeping that module path, into ./quote:
gonew github.com/rsc/quote
Click to show internal directories.
Click to hide internal directories.