Valid returns whether or not a format value is valid.
()
| 189 | |
| 190 | // Valid returns whether or not a format value is valid. |
| 191 | func (cf *CollectionFormat) Valid() bool { |
| 192 | return cf.Format == "blog" || |
| 193 | cf.Format == "novel" || |
| 194 | cf.Format == "notebook" |
| 195 | } |
| 196 | |
| 197 | // NewFormat creates a new CollectionFormat object from the Collection. |
| 198 | func (c *Collection) NewFormat() *CollectionFormat { |