Documentation
¶
Index ¶
- Constants
- func Append[T comparable](s []T, vs ...T) []T
- func DedupSlice[T comparable](s []T) []T
- func ExtractMDCodes(resp string, lang string) (js string, realLang uniast.Language, last int)
- func ExtractXMLBlock(text string, tag string) (string, int)
- func IterateXMLBlock(text string, tag string, hook func(block string) bool)
- func LangToMDBlock(lang uniast.Language) string
- func MDBlockToLang(lang string) uniast.Language
- func MarshalJSONBytes(input any) ([]byte, error)
- func MarshalJSONIndent(input any) (string, error)
- func MarshalJSONIndentNoError(input any) string
- func MustWriteFile(fpath string, data []byte) error
- func NewError(msg string, v ...interface{}) error
- func NormalizeString(s string, sep rune) string
- func UnmarshalJSON(input string, output any) error
- func UnmarshalJSONBytes(input []byte, output any) error
- func WatchDir(dir string, cb func(op fsnotify.Op, file string)) error
- func WrapError(err error, msg string, v ...interface{}) error
Constants ¶
View Source
const (
MARKDOWN_CODE_BLOCK = "```"
)
Variables ¶
This section is empty.
Functions ¶
func Append ¶
func Append[T comparable](s []T, vs ...T) []T
func DedupSlice ¶
func DedupSlice[T comparable](s []T) []T
func ExtractMDCodes ¶
func LangToMDBlock ¶
func MDBlockToLang ¶
func MarshalJSONBytes ¶
func MarshalJSONIndent ¶
func MustWriteFile ¶
func NormalizeString ¶
scan each non-alphanumeric character as a separator
func UnmarshalJSON ¶
func UnmarshalJSONBytes ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.