hugolib, output: Fix RSSLink vs output formats

And remove the now superflous setPageURLs method.
This commit is contained in:
Bjørn Erik Pedersen
2017-03-24 16:54:37 +01:00
parent 87188496fb
commit 5761b93c96
6 changed files with 23 additions and 23 deletions

View File

@@ -23,6 +23,7 @@ import (
var (
// An ordered list of built-in output formats
// See https://www.ampproject.org/learn/overview/
// TODO(bep) output rename to AMPFormat etc.
AMPType = Format{
Name: "AMP",
MediaType: media.HTMLType,
@@ -84,6 +85,17 @@ var builtInTypes = map[string]Format{
type Formats []Format
func (formats Formats) GetByName(name string) (f Format, found bool) {
for _, ff := range formats {
if name == ff.Name {
f = ff
found = true
return
}
}
return
}
// Format represents an output represenation, usually to a file on disk.
type Format struct {
// The Name is used as an identifier. Internal output formats (i.e. HTML and RSS)