gonew

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 22, 2023 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Overview

Gonew starts a new Go module by copying a template module.

Usage:

gonew srcMod[@version] [dstMod [dir]]

Gonew makes a copy of the srcMod, changing its module path to dstMod. It writes that new 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 clone the basic command-line program template rsc.io/tmp/newcmd as your.domain/myprog, in the directory ./myprog:

gonew rsc.io/tmp/newcmd your.domain/myprog

Or without having to install gonew first:

go run rsc.io/tmp/gonew@latest rsc.io/tmp/newcmd your.domain/myprog

To clone a module without renaming the module:

gonew rsc.io/tmp/quote

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL