strings.Chomp
如果參數為 template.HTML
類型,則返回 template.HTML
,否則返回 string
。
{{ chomp "foo\n" }} → foo
{{ chomp "foo\n\n" }} → foo
{{ chomp "foo\r\n" }} → foo
{{ chomp "foo\r\n\r\n" }} → foo
如果參數為 template.HTML
類型,則返回 template.HTML
,否則返回 string
。
{{ chomp "foo\n" }} → foo
{{ chomp "foo\n\n" }} → foo
{{ chomp "foo\r\n" }} → foo
{{ chomp "foo\r\n\r\n" }} → foo