Skip to content

Commit

Permalink
Added constructor for Link
Browse files Browse the repository at this point in the history
  • Loading branch information
Woody1193 committed Apr 28, 2023
1 parent eadf3f9 commit bc252dd
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions data/extensions.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
package data

// NewLink creates a new Link from a name, method, and URL
func NewLink(name string, method Method, url string) *Link {
return &Link{
Name: name,
Method: method,
Url: url,
}
}

// ForDate returns true if the frequency is less than or equal to a day (Day, Week, Month, Quarter, Year)
func (enum Frequency) ForDate() bool {
switch enum {
Expand Down

0 comments on commit bc252dd

Please sign in to comment.