Skip to content
This repository was archived by the owner on Jul 26, 2020. It is now read-only.

Code Refactor #6

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
merge master with refactor-bake
jmickey committed May 24, 2019
commit eaf4ef1e938d515fd5a00db1bfefcb8e9471d5bc
3 changes: 1 addition & 2 deletions cmd/testconfig.go
Original file line number Diff line number Diff line change
@@ -34,8 +34,7 @@ This application is a tool to generate the needed files
to quickly create a Cobra application.`,
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("testconfig called")
var creator creators.Creator
creator.AddConfig(viper.GetViper())
creators.AddConfig(viper.GetViper())
},
}

2 changes: 1 addition & 1 deletion cmd/video.go
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ import (
"os"
"regexp"

"github.com/breadtubetv/bake/providers"
"github.com/breadtubetv/bake/pkg/providers"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
1 change: 0 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk=
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
2 changes: 2 additions & 0 deletions pkg/creators/creators.go
Original file line number Diff line number Diff line change
@@ -23,10 +23,12 @@ var config *viper.Viper
// AddConfig allows package user to pass a viper configuation to the pkg
func AddConfig(conf *viper.Viper) error {
config = conf
return nil
}

// FindCreatorBySlug retreives the creator based on the provided
// slug, loads the creator, and returns its creator object.
func FindCreatorBySlug(slug string) *Creator {
fmt.Print(slug)
return &Creator{}
}
3 changes: 1 addition & 2 deletions pkg/providers/provider.go
Original file line number Diff line number Diff line change
@@ -3,8 +3,7 @@ package providers
// Provider is a struct that serves as a base type for
// future providers.
type Provider struct {
providerName string
name string
name string
}

type Providers struct{}
You are viewing a condensed version of this merge commit. You can view the full changes here.