Skip to content
Permalink
Browse files

Merge pull request #71 from okkur/lint

Fix linting errors
  • Loading branch information
nzt-ventures committed Jan 23, 2020
2 parents 40731e0 + 33707c0 commit c66b11248b0744348edeae3ce8f7117a39dd1bd8
Showing with 8 additions and 2 deletions.
  1. +2 −2 Makefile
  2. +1 −0 cmd/config/config.go
  3. +3 −0 cmd/root.go
  4. +1 −0 cmd/templates/templates.go
  5. +1 −0 cmd/version.go
@@ -39,9 +39,9 @@ simplify:

check:
@go get -u golang.org/x/lint/golint
@test -z $(shell gofmt -l ./main.go | tee /dev/stderr) || echo "[WARN] Fix formatting issues with 'make fmt'"
@test -z $(shell gofmt -l ./ | tee /dev/stderr) || echo "[WARN] Fix formatting issues with 'make fmt'"
@for d in $$(go list ./...); do golint $${d}; done
@go vet ${SRC}
@go vet

packr:
@go get -u github.com/gobuffalo/packr/...
@@ -13,6 +13,7 @@ limitations under the License.

package config

// Config holds the reposeed configuration structure
type Config struct {
Project struct {
Name string `yaml:"name" json:"name"`
@@ -10,6 +10,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package cmd

import (
@@ -47,6 +48,7 @@ func init() {
rootCmd.PersistentFlags().BoolVarP(&overwrite, "overwrite", "w", false, "Force overwrite files")
}

// RootHandler handles main cli entrypoint with cobra
func RootHandler(cmd *cobra.Command, args []string) {
box := templatesBox.GetTemplates()

@@ -83,6 +85,7 @@ func RootHandler(cmd *cobra.Command, args []string) {
}
}

// Execute executes a specific command
func Execute() {
if err := rootCmd.Execute(); err != nil {
log.Printf("Couldn't execute the command: %s", err.Error())
@@ -17,6 +17,7 @@ import (
"github.com/gobuffalo/packr"
)

// GetTemplates pulls in go templates from packr
func GetTemplates() packr.Box {
box := packr.NewBox("../../templates")
return box
@@ -6,6 +6,7 @@ import (
"github.com/spf13/cobra"
)

// SupportedConfigVersion holds matching configuration version
const SupportedConfigVersion = "v1"

var version = "dev"

0 comments on commit c66b112

Please sign in to comment.
You can’t perform that action at this time.