Skip to content

Commit

Permalink
Adds command boilerplate
Browse files Browse the repository at this point in the history
  • Loading branch information
Ciro S. Costa committed Jul 2, 2018
1 parent 2310a67 commit 86fa13b
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 2 deletions.
15 changes: 15 additions & 0 deletions commands/max-delay.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package commands

import (
"gopkg.in/urfave/cli.v1"
)

var MaxDelay = cli.Command{
Name: "max-delay",
Usage: "cuts all delays between commands up to a maximum value",
Action: maxDelayAction,
}

func maxDelayAction(c *cli.Context) (err error) {
return
}
13 changes: 13 additions & 0 deletions editor/editor_suite_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package editor_test

import (
"testing"

. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)

func TestEditor(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Editor Suite")
}
12 changes: 12 additions & 0 deletions editor/editor_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package editor_test

import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"

. "github.com/cirocosta/asciinema-edit/editor"
)

var _ = Describe("Editor", func() {

})
14 changes: 12 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
package main

import (
"os"

"github.com/cirocosta/asciinema-edit/commands"
"gopkg.in/urfave/cli.v1"
)

var (
version = "dev"
)

func main () {
func main() {
app := cli.NewApp()

app.Commands = []cli.Command{}
app.Version = version
app.Usage = "edit recorded asciinema casts"
app.Description = `asciinema-edit provides missing features from the "asciinema" tool
when it comes to editing a cast that has already been recorded.`
app.Commands = []cli.Command{
commands.MaxDelay,
}

app.Run(os.Args)
}

0 comments on commit 86fa13b

Please sign in to comment.