An open API service indexing awesome lists of open source software.

https://github.com/mmmommm/goinit

Generate initial configuration files for Go.
https://github.com/mmmommm/goinit

cli go initialization

Last synced: about 1 month ago
JSON representation

Generate initial configuration files for Go.

Awesome Lists containing this project

README

          

![GitHub](https://img.shields.io/github/license/mmmommm/goinit)
![GitHub CI Status](https://img.shields.io/github/workflow/status/mmmommm/goinit/ci?label=CI)

# goinit
Generate initial configuration files for Go.

example usage goinit command

Here are generated by this cli tool.

- [main.go](https://github.com/mmmommm/goinit/blob/main/cmd/example/main.go)
- [main_test.go](https://github.com/mmmommm/goinit/blob/main/cmd/example/main_test.go)
- [README.md](https://github.com/mmmommm/goinit/blob/main/cmd/example/README.md)
- [LICENSE](https://github.com/mmmommm/goinit/blob/main/cmd/example/LICENSE)
- [.github/workflows/lint.yml](https://github.com/mmmommm/goinit/blob/main/cmd/example/lint.yml)
- [.github/workflows/test.yml](https://github.com/mmmommm/goinit/blob/main/cmd/example/test.yml)
- [.gitignore](https://github.com/mmmommm/goinit/blob/main/cmd/example/.gitignore)
- [.golangci.yml](https://github.com/mmmommm/goinit/blob/main/cmd/example/.golangci.yml)

## Required
- Go 1.16~

# Installation
```
$ go install github.com/mmmommm/goinit@latest
```

## MacOS
If you want to install on MacOS, you can use Homebrew.
```
brew install mmmommm/tap/goinit
```

#### upgrade
```
brew upgrade mmmommm/tap/goinit
```

## Windows, Linux etc...
Download the binary from [here](https://github.com/mmmommm/goinit/releases/tag/v0.1.4).

## Usage
```sh
$ goinit ${directory_name}

$ goinit example
```

## Option
```sh
$ goinit ${directory_name} -m ${package_name}

$ goinit example -m github.com/mmmommm/example
```
this option run `go mod init github.com/mmmommm/example`

## After run goinit

```
go run main.go
curl localhost:8080/Go
```

And then response this sentence.
>Hi there, I love Go!

open LICENSE file and rewrite ${your_account_name}

```
Copyright (c) 2021 ${your_account_name}`
```