14 lines
375 B
Go
14 lines
375 B
Go
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)
|
|
}
|