Documentation ¶
Overview ¶
Package event provides the functions for creating, editing, and showing events
Index ¶
- Variables
- func CheckEvent(city, year string) bool
- func CityClean(city string) (cityClean string)
- func CreateEvent(city, year string) (err error)
- func Logo(srcPath, city, year string) (err error)
- func LogoSquare(srcPath, city, year string) (err error)
- func NewEvent(event model.Event, city string, year string) (err error)
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var LogoPath string
LogoPath is the fully qualified path to the event's logo
View Source
var SquareLogoPath string
SquareLogoPath is the fully qualified path to the event's square logo
Functions ¶
func CheckEvent ¶
CheckEvent takes in two arguments, the city and the year, and returns true if the city exists.
Example ¶
city := "Ponyville" year := "2017" if CheckEvent(city, year) { fmt.Println("This event already exists. If you would like to edit it, please run `devopsdays-cli edit event`") return }
Output:
func CreateEvent ¶
CreateEvent takes input from the user to create a new event
func Logo ¶
Logo takes in a path to an event's main logo and copies/renames it to the proper destination
func LogoSquare ¶
LogoSquare takes in a path the event's square logo, and crops/resizes it and copies it to the proper destination
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.