Remove frontmatter interface

Former-commit-id: bd8ab54a13b08f223cc00a5372dc885c5b7b49e6 [formerly 169211b32940ffa9a157bf140579e1946b8df75d] [formerly 1795b434a35c2f9dc3c6940b7555542f62f3d74d [formerly 1ae2afb9985b82c7c101395c8a65fd122200c808]]
Former-commit-id: 1ed1a0402184384c37b80d51ef1460d036d5201e [formerly e068d59a1b531635e6ccad4d2203c1ef9eab7c86]
Former-commit-id: 391cbcefcd6b9f98b054bc02aec5cf808ccd199f
This commit is contained in:
Henrique Dias
2017-07-01 08:50:42 +01:00
parent cc462c8bca
commit 43468dfa2b
5 changed files with 36 additions and 524 deletions

View File

@@ -1,7 +1,6 @@
package frontmatter
import (
"errors"
"strings"
)
@@ -27,31 +26,3 @@ func AppendRune(frontmatter string, mark rune) string {
return frontmatter
}
// RuneToStringFormat converts the rune to a string with the format
func RuneToStringFormat(mark rune) (string, error) {
switch mark {
case '-':
return "yaml", nil
case '+':
return "toml", nil
case '{', '}':
return "json", nil
default:
return "", errors.New("Unsupported format type")
}
}
// StringFormatToRune converts the format name to its rune
func StringFormatToRune(format string) (rune, error) {
switch format {
case "yaml":
return '-', nil
case "toml":
return '+', nil
case "json":
return '{', nil
default:
return '0', errors.New("Unsupported format type")
}
}