Skip to content

Commit 7bce670

Browse files
authored
Merge pull request #129 from devopsdays/restructure-packages
Restructure packages
2 parents ec29bc0 + 94f4be8 commit 7bce670

24 files changed

Lines changed: 66 additions & 104 deletions

Gopkg.lock

Lines changed: 1 addition & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gopkg.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@
3737
branch = "master"
3838
name = "github.com/GeertJohan/go.rice"
3939

40-
[[constraint]]
41-
branch = "master"
42-
name = "github.com/alecthomas/template"
43-
4440
[[constraint]]
4541
name = "github.com/asaskevich/govalidator"
4642
version = "9.0.0"

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ VERSION:=$(shell git describe --tags)
1111
# VERSION := $(shell grep "const Version " version.go | sed -E 's/.*"(.+)"$$/\1/')
1212
BUILD:=$(shell date +%FT%T%z)
1313

14-
LDFLAGS=-ldflags "-w -s -X github.com/devopsdays/devopsdays-cli/cmd.Version=${VERSION} -X github.com/devopsdays/devopsdays-cli/cmd.Build=${BUILD}"
14+
LDFLAGS=-ldflags "-w -s -X github.com/devopsdays/devopsdays-cli/commands.Version=${VERSION} -X github.com/devopsdays/devopsdays-cli/commands.Build=${BUILD}"
1515

1616
help:
1717
@echo 'Available commands:'

cmd/add.go renamed to commands/add.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package cmd
1+
package commands
22

33
import (
44
"github.com/spf13/cobra"

cmd/config.go renamed to commands/config.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package cmd
1+
package commands
22

33
import (
44
"fmt"
@@ -28,7 +28,7 @@ var configCmd = &cobra.Command{
2828
fmt.Println("Current Working Directory = ", pwd)
2929
fmt.Println("DevOpsDays web directory = ", webdir)
3030
color.Blue("Checking your config...")
31-
CheckHugo()
31+
checkHugo()
3232
checkGit()
3333
},
3434
}
@@ -38,10 +38,10 @@ func init() {
3838

3939
}
4040

41-
// CheckHugo tests whether or not a compatible version of the Hugo static site generator is instealled.
41+
// checkHugo tests whether or not a compatible version of the Hugo static site generator is instealled.
4242
//
4343
// Currently, the list of supported versions is hard-coded using the `supportedVersions` variable, but this should be moved elsewhere eventually.
44-
func CheckHugo() {
44+
func checkHugo() {
4545
supportedVersions := map[string]bool{"0.36.1": true, "0.37": true, "0.37.1": true}
4646
out, err := exec.Command("hugo", "version").Output()
4747
if err != nil {

cmd/create.go renamed to commands/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package cmd
1+
package commands
22

33
import (
44
"github.com/spf13/cobra"

cmd/edit.go renamed to commands/edit.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package cmd
1+
package commands
22

33
import (
44
"github.com/spf13/cobra"

cmd/event.go renamed to commands/event.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package cmd
1+
package commands
22

33
import (
44
"fmt"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package cmd
1+
package commands
22

33
import (
44
"fmt"

cmd/program.go renamed to commands/program.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package cmd
1+
package commands
22

33
import (
44
"fmt"

0 commit comments

Comments
 (0)