Skip to content

Commit 60c9d57

Browse files
committed
Move helpers.GetTalks to talks.GetTalks
Signed-off-by: Matt Stratton <[email protected]>
1 parent eb07fc8 commit 60c9d57

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

speaker/speaker.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import (
1414

1515
"github.com/devopsdays/devopsdays-cli/helpers"
1616
"github.com/devopsdays/devopsdays-cli/model"
17+
"github.com/devopsdays/devopsdays-cli/talks"
1718
"github.com/fatih/color"
1819
survey "gopkg.in/AlecAivazis/survey.v1"
1920
)
@@ -162,7 +163,7 @@ func CreateSpeaker(speakerName, city, year string) (err error) {
162163
if name == true {
163164
prompt := &survey.Select{
164165
Message: "Choose a talk:",
165-
Options: helpers.GetTalks(city, year),
166+
Options: talks.GetTalks(city, year),
166167
}
167168
survey.AskOne(prompt, &talk, nil)
168169
color.Yellow("NOT IMPLEMENTED")

helpers/get_talks.go renamed to talks/get_talks.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1-
package helpers
1+
package talks
22

33
import (
44
"fmt"
55
"io/ioutil"
66
"path/filepath"
7+
8+
"github.com/devopsdays/devopsdays-cli/helpers"
79
)
810

911
// GetTalks takes in the city and year and returns a list of the talks
1012
func GetTalks(city, year string) []string {
1113

12-
talksDir := filepath.Join(EventContentPath(city, year), "program")
14+
talksDir := filepath.Join(helpers.EventContentPath(city, year), "program")
1315

1416
fmt.Println(talksDir)
1517

talks/talks.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// Package talks includes the functionality to add, create, edit, remove, and show talks.
2+
// It also includes supporting and helper functions that are talk-releated.
3+
package talks

0 commit comments

Comments
 (0)