Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
NotSupported = errors.New("not supported")
)
View Source
var ( // TODO scala, typescript, erlang, dart, racket SupportedLangs = []Lang{ golangGen, python3Gen, cppGen, rustGen, javaGen, jsGen, phpGen, cGen, csharpGen, rubyGen, swiftGen, kotlinGen, } )
Functions ¶
func GetSolutionCode ¶
func GetSolutionCode(q *leetcode.QuestionData) (string, error)
func RunLocalTest ¶
func RunLocalTest(q *leetcode.QuestionData) error
Types ¶
type GenerateResult ¶
type GenerateResult struct { Lang Lang Files []FileOutput }
func Generate ¶
func Generate(q *leetcode.QuestionData) (*GenerateResult, error)
func GeneratePathsOnly ¶
func GeneratePathsOnly(q *leetcode.QuestionData) (*GenerateResult, error)
GeneratePathsOnly runs generate process but does not generate real content.
func (*GenerateResult) GetCodeFile ¶
func (r *GenerateResult) GetCodeFile() *FileOutput
func (*GenerateResult) PrependPath ¶
func (r *GenerateResult) PrependPath(dir string)
type Lang ¶
type Lang interface { Name() string ShortName() string Slug() string LineComment() string // Generate generates code files for the question. Generate(q *leetcode.QuestionData) (*GenerateResult, error) GeneratePaths(q *leetcode.QuestionData) (*GenerateResult, error) }
func GetGenerator ¶
type LocalTestable ¶
type LocalTestable interface {
RunLocalTest(q *leetcode.QuestionData, dir string) error
}
Click to show internal directories.
Click to hide internal directories.