Skip to content

Commit

Permalink
Refactioring, Test coverage up to 98.6% of statements
Browse files Browse the repository at this point in the history
  • Loading branch information
Vic Shóstak committed Jun 20, 2020
1 parent d10c390 commit 6436ff4
Show file tree
Hide file tree
Showing 17 changed files with 377 additions and 245 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ clean:
@echo "$(GREEN)[OK]$(NOCOLOR) Project was cleaned!"

test:
@go test -v -cover -race ./...
@go test -v -cover ./...
@echo "$(GREEN)[OK]$(NOCOLOR) Project was tested!"

install: generate
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<h1 align="center">🕶 Create Go App CLI</h1>
<h3 align="center">Set up a new Go (Golang) full stack app by running one CLI command!</h3>

<p align="center"><img src="https://img.shields.io/badge/cli_version-0.8.2-blue?style=for-the-badge&logo=none" alt="cli version" />&nbsp;<img src="https://img.shields.io/badge/Go-1.11+-00ADD8?style=for-the-badge&logo=go" alt="go version" />&nbsp;<img src="https://img.shields.io/badge/securego.io-success-success?style=for-the-badge&logo=none" alt="gosec" />&nbsp;<img src="https://img.shields.io/badge/license-mit-red?style=for-the-badge&logo=none" alt="lisense" /></p>
<p align="center"><img src="https://img.shields.io/badge/cli_version-0.8.3-blue?style=for-the-badge&logo=none" alt="cli version" />&nbsp;<img src="https://img.shields.io/badge/Go-1.11+-00ADD8?style=for-the-badge&logo=go" alt="go version" />&nbsp;<img src="https://img.shields.io/badge/securego.io-success-success?style=for-the-badge&logo=none" alt="gosec" />&nbsp;<img src="https://img.shields.io/badge/license-mit-red?style=for-the-badge&logo=none" alt="lisense" /></p>

## Requirements

Expand Down Expand Up @@ -121,7 +121,7 @@ If you want to say «thank you» or/and support active development `create-go-ap
2. Twit about project [on your Twitter](https://twitter.com/intent/tweet?text=Set%20up%20a%20new%20Go%20%28Golang%29%20full%20stack%20app%20by%20running%20one%20CLI%20command%21%26url%3Dhttps%3A%2F%2Fgithub.com%2Fcreate-go-app%2Fcli).
3. Donate some money to project author via PayPal: [@paypal.me/koddr](https://paypal.me/koddr?locale.x=en_EN).
4. Join DigitalOcean at our [referral link](https://shrts.website/do/server) (your profit is **$100** and we get $25).
5. Buy awesome [domain name with 5% discount](https://shrts.website/reg/domain) at REG.COM.
5. Buy awesome [domain name with **5%** discount](https://shrts.website/reg/domain) at REG.COM.

Thanks for your support! 😘 Together, we make this project better every day.

Expand Down
33 changes: 11 additions & 22 deletions cmd/cgapp/main.go
Original file line number Diff line number Diff line change
@@ -1,30 +1,19 @@
package main

import "github.com/create-go-app/cli/internal/cgapp"
import (
"log"
"os"

var (
// cgapp CLI version
version string = "0.8.2"

// Templates registry
registry = map[string]string{
// Backend templates
"default": "create-go-app/net_http-go-template",
"echo": "create-go-app/echo-go-template",
"fiber": "create-go-app/fiber-go-template",

// Frontend templates
"react-js": "create-go-app/react-js-template",
"react-ts": "create-go-app/react-ts-template",
"preact": "create-go-app/preact-js-template",

// Docker containers
"nginx": "create-go-app/nginx-certbot-docker",
"postgres": "create-go-app/postgres-docker",
}
"github.com/create-go-app/cli/pkg/cgapp"
)

func main() {
// Start new CLI app
cgapp.New(version, registry)
cli, err := cgapp.New()
if err != nil {
log.Fatal(err)
}

// Run new CLI
cli.Run(os.Args)
}
212 changes: 0 additions & 212 deletions internal/cgapp/new.go

This file was deleted.

Loading

0 comments on commit 6436ff4

Please sign in to comment.