Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultBoard = `` /* 469-byte string literal not displayed */
View Source
const DefaultError = `{{ .Status }} {{ .FgRed }}ERROR{{ .End }}: {{ .Error }}
`
View Source
const DefaultPost = `[{{ .ID | highlight }}] {{ .Author }} wrote at {{ .Timestamp | timeANSIC }}
{{ .Content }}
`
View Source
const DefaultThread = `` /* 257-byte string literal not displayed */
View Source
const DefaultWelcome string = "{{ .FgGreen }}::::::::::::.,:::::: :::::::.. . : {{ .End }}\n" +
"{{ .FgGreen }};;;;;;;;'''';;;;'''' ;;;;``;;;; ;;,. ;;; {{ .End }}\n" +
"{{ .FgGreen }} [[ [[cccc [[[,/[[[' [[[[, ,[[[[, {{ .End }}\n" +
"{{ .FgGreen }} $$ $$\"\"\"\" $$$$$$c $$$$$$$$\"$$$ {{ .End }}\n" +
"{{ .FgGreen }} 88, 888oo,__ 888b \"88bo,888 Y88\" 888o {{ .End }}\n" +
"{{ .FgGreen }} MMM \"\"\"\"YUMMMMMMM \"W\" MMM M' \"MMM {{ .End }}\n" +
"{{ .FgBlue }} .,-::::: :: .: :::. :::. :::. {{ .End }}\n" +
"{{ .FgBlue }} ,;;;'````' ,;; ;;, ;;`;; `;;;;, `;;; {{ .End }}\n" +
"{{ .FgBlue }} [[[ ,[[[,,,[[[ ,[[ '[[, [[[[[. '[[ {{ .End }}\n" +
"{{ .FgBlue }} $$$ \"$$$\"\"\"$$$c$$$cc$$$c $$$ \"Y$c$$ {{ .End }}\n" +
"{{ .FgBlue }} `88bo,__,o, 888 \"88o888 888,888 Y88 {{ .End }}\n" +
"{{ .FgBlue }} \"YUMMMMMP\"MMM YMMYMM \"\"` MMM YM {{ .End }}\n" +
"Welcome!\n" +
"{{ .Separator.Double }}\n" +
"Boards\n" +
"{{ range .Boards }} {{ . | formatBoard }}\n{{ end }}" +
"{{ .Separator.Single }}\n" +
"How do I use it?\n" +
"{{ .Separator.Double }}\n" +
"{{ .FgGreen }}Viewing{{ .End }}\n" +
"{{ .Separator.Single }}\n" +
"{{ .FgGreen }}View{{ .End }} a board (e.g. /g/)\n" +
" curl -s '{{ .Hostname }}/g'\n" +
"{{ .Separator.Single }}\n" +
"{{ .FgGreen }}View{{ .End }} a board as HTML (e.g. /m/)\n" +
" curl -s '{{ .Hostname }}/m?format=html'\n" +
"{{ .Separator.Single }}\n" +
"{{ .FgGreen }}View{{ .End }} a thread (e.g. thread #23 on /v/)\n" +
" curl -s '{{ .Hostname}}/v/23'\n" +
"{{ .Separator.Single }}\n" +
"{{ .FgGreen }}View{{ .End }} as JSON\n" +
" curl -s '{{ .Hostname }}/d/69?format=json'\n" +
"{{ .Separator.Double }}\n" +
"{{ .FgBlue }}Posting{{ .End }}\n" +
"{{ .FgBlue }}Post{{ .End }} a reply to a thread ({{ .FgBlue }}*{{ .End }})\n" +
" curl -s '{{ .Hostname }}/g/42' \\\n" +
" --data-urlencode \"format=json\" \\\n" +
" --data-urlencode \"name=ilovebsd\" \\\n" +
" --data-urlencode \"content=Have you considered OpenBSD?\"\\\n" +
"{{ .Separator.Single }}\n" +
"{{ .FgBlue }}Post{{ .End }} (i.e. create) a thread ({{ .FgBlue }}*{{ .End }})\n" +
" curl -s '{{ .Hostname }}/b' \\\n" +
" --data-urlencode \"name=m00t\" \\\n" +
" --data-urlencode \"topic=Candlejack\" \\\n" +
" --data-urlencode \"content=I'm not afraid of him, what's he gon-\\\n" +
"{{ .Separator.Single }}\n" +
"({{ .FgBlue }}*{{ .End }}) fields other than content are optional, board/thread has to exist.\n" +
"{{ .Separator.Double }}\n" +
"{{ .FgGreen }}HAVE{{ .End }} {{ .FgBlue }}FUN{{ .End }}!\n"
Contains backticks so cannot use backtick notation.
Variables ¶
This section is empty.
Functions ¶
func WriteTemplates ¶
WriteTemplates dumps the default templates inside the given directory.
Types ¶
Click to show internal directories.
Click to hide internal directories.