Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ICode ¶
type ICode interface {
// contains filtered or unexported methods
}
ICode the Code interface
type LanguageType ¶
type LanguageType string
LanguageType type of language
const ( // LanguageGo golang language LanguageGo LanguageType = "golang" )
type Markdown ¶
Markdown the struct of leetcode markdown template manager.
func NewMarkdown ¶
NewMarkdown returns new Markdown impl.
type MarkdownFragments ¶
type MarkdownFragments struct { ID string TitleSlug string Title string Language string Difficulty string DirName string PackageName string }
MarkdownFragments the struct of leetcode markdown template.
type Problem ¶
type Problem struct { Question Question Language LanguageType `json:"language"` Markdown string `json:"markdown"` }
Problem the struct of leetcode problem.
func NewProblem ¶
func NewProblem(lang LanguageType, key, markdown string) *Problem
NewProblem returns new Problem instance with a title string.
func NewProblemByURI ¶
func NewProblemByURI(lang LanguageType, uri, markdown string) *Problem
NewProblemByURI returns new Problem instance with a url string.
func (Problem) OutputCode ¶
OutputCode save to src code file with language.
func (Problem) OutputMarkdown ¶
OutputMarkdown prints markdown template.
func (Problem) OutputTestCode ¶
OutputTestCode save to test code file with language.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.