Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
kariae committed Jan 1, 2018
0 parents commit fc9ee0a
Show file tree
Hide file tree
Showing 6 changed files with 92 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.idea/
vendor/*/
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
GO=go
GOV=govendor
GOINSTALL=$(GO) install
GOCLEAN=$(GO) clean
GOGET=$(GOV) fetch -v

fetch:
@$(GOGET) github.com/urfave/cli

build:
@echo "start building..."
$(GOINSTALL)
@echo "Yay! build DONE!"

all: fetch build
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
+-------+ ____ _
| || || | / ___|___ _ __ ___ _ __ ___ ___ ___(_)
+---+---+---+---+ | | / _ \| '_ ` _ \| '_ \ / _ \/ __|/ _ \ |
| || || | || || | | |__| (_) | | | | | | |_) | (_) \__ \ __/ |
+-------+-------+ \____\___/|_| |_| |_| .__/ \___/|___/\___|_|
|_|



Composei is an interactive command line tool build with golang that helps you create your `docker-compose.yml` file.

Cause yes I'm lazy to remember all the possible options for each container xD

30 changes: 30 additions & 0 deletions commands/generate.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package commands

import (
"github.com/urfave/cli"
"fmt"
)

var GenerateCommand = cli.Command{
Name: "generate",
Usage: "Generate docker-compose.yml file",
Aliases: []string{"g"},
Action: generate,
}

func generate(c *cli.Context) {
composei := `
+-------+ ____ _
| || || | / ___|___ _ __ ___ _ __ ___ ___ ___(_)
+---+---+---+---+ | | / _ \| '_ ` + "`" + ` _ \| '_ \ / _ \/ __|/ _ \ |
| || || | || || | | |__| (_) | | | | | | |_) | (_) \__ \ __/ |
+-------+-------+ \____\___/|_| |_| |_| .__/ \___/|___/\___|_|
|_|
By Zakariae Filali - 0.0.1
https://github.com/kariae/composei
`
fmt.Println(composei)
}
26 changes: 26 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package main

import (
"fmt"
"github.com/urfave/cli"
"os"
"github.com/kariae/composei/commands"
)

func main() {
// Launch CLI
app := cli.NewApp()

app.Name = "Composei"
app.Version = "0.0.1"
app.Usage = "Composei is an interactive command line tool build with golang that helps you create your `docker-compose.yml` file."

app.Commands = []cli.Command{
commands.GenerateCommand,
}

if err := app.Run(os.Args); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
}
6 changes: 6 additions & 0 deletions vendor/vendor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"comment": "",
"ignore": "test",
"package": [],
"rootPath": "github.com/kariae/composei"
}

0 comments on commit fc9ee0a

Please sign in to comment.