feat: project setup
This commit is contained in:
13
models/citations/functions.go
Normal file
13
models/citations/functions.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package citations
|
||||
|
||||
import "fmt"
|
||||
|
||||
// Method to return a MLA citation as a string
|
||||
func (c *MLACitation) String() string {
|
||||
return fmt.Sprintf(`"%s" (%s, %d)`, c.Content, c.LastName, c.PageNumber)
|
||||
}
|
||||
|
||||
// Method to return a APA citation as a string
|
||||
func (c *APACitation) String() string {
|
||||
return fmt.Sprintf(`"%s" (%s, %d, p. %d)`, c.Content, c.LastName, c.Year, c.PageNumber)
|
||||
}
|
||||
Reference in New Issue
Block a user