Giter Site home page Giter Site logo

gmc's Introduction

gmc (Go mod create)

gmc (Go mod create) is a CLI that creates Go modules

โš ๏ธ gmc is now in archive-mode, and is no longer actively maintained. Refer to these instructions instead: https://github.com/jbrudvik/new

Build Go Reference

Usage

Create a module as Git repository

$ gmc -g github.com/jbrudvik/mymodule
Creating Go module: github.com/jbrudvik/mymodule
- Created directory: mymodule
- Initialized Go module
- Created file     : mymodule/main.go
- Created file     : mymodule/.gitignore
- Initialized Git repository
- Created file     : mymodule/README.md
- Committed all files to Git repository
- Added remote for Git repository: [email protected]:jbrudvik/mymodule.git

Finished creating Go module: github.com/jbrudvik/mymodule

Next steps:
- Change into module's directory: $ cd mymodule
- Run module: $ go run .
- Create remote Git repository [email protected]:jbrudvik/mymodule.git: https://github.com/new
- Push to remote Git repository: $ git push -u origin main
- Start coding: $ vim .

Show help

$ gmc -h
NAME:
   gmc - (Go mod create) creates Go modules

USAGE:
   gmc [global options] [module name]

VERSION:
   vX.Y.Z

DESCRIPTION:
   `gmc [module name]` creates a directory containing:
   - Go module metadata: go.mod
   - A place to start writing code: main.go
   - A .gitignore file

   This module can be immediately run:

       $ go run .
       hello, world!

   Optionally, the directory can also include:
   - Git repository setup with .gitignore, README.md

   More information: https://github.com/jbrudvik/gmc

GLOBAL OPTIONS:
   --git, -g      create as Git repository (default: false)
   --quiet, -q    silence output (default: false)
   --help, -h     show help (default: false)
   --version, -v  print the version (default: false)

Install

Required dependencies

  • Go 1.18
  • goimports: $ go install golang.org/x/tools/cmd/goimports@latest
  • Git (for Git-related features)

Install gmc

$ go install github.com/jbrudvik/gmc@latest

gmc's People

Contributors

jbrudvik avatar

Stargazers

 avatar

Watchers

 avatar

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.