g

command module
v0.0.0-...-60e33b3 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2021 License: MIT Imports: 10 Imported by: 0

README

Init a new Go project or Open a pdf file or a path in Linux and Windows with the same command

Install

# GitHub Install
go get -ldflags=-s -u -v github.com/wasmup/g

g --version
which g
file $(which g)
g -help

Create a new Go module or add Makefile, main.go, main_test.go or README.md

mkdir hello
cd hello
g -init
code .

Creates a new main.go, main_test.go, Makefile, README.md files if not exist, and runs
go mod init $(FolderName).
Output:

hello

Create a Web project

mkdir hello
cd hello
g -web
code .

web

Open a pdf file at a specific page

g 12 filename.pdf

Open the current dir using explorer/nautilus

g

Open Go src path

e.g. ($GOPATH/src/github.com/wasmup/g):

g -go github.com/wasmup/g

Show environment variables value per line

g -echo GOPATH GOBIN GOROOT

g -echo G_ROOT G_RDR HOME

Set G_ROOT environment variable to replace / at the begining of the path.
Set G_RDR environment variable for pdf document reader.
Set HOME environment variable to replace ~.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
web

Jump to

Keyboard shortcuts

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