Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NotSupported = errors.New("not supported") NotImplemented = errors.New("not implemented") )
View Source
var ( // TODO scala, typescript, erlang, dart, racket SupportedLanguages = []Generator{ golangGen, pythonGen, cppGen, rustGen, javaGen, jsGen, phpGen, cGen, csharpGen, rubyGen, swiftGen, kotlinGen, } )
Functions ¶
Types ¶
type FileOutput ¶
type Generator ¶
type Generator interface {
Name() string
ShortName() string
Slug() string
// SupportTest returns true if the language supports local test.
SupportTest() bool
// CheckLibrary checks if the library is installed. Return false if not installed.
CheckLibrary() bool
// GenerateLibrary copies necessary supporting library files to project.
GenerateLibrary() error
// Generate generates code files for the question.
Generate(q *leetcode.QuestionData) ([]FileOutput, error)
}
func GetGenerator ¶
Click to show internal directories.
Click to hide internal directories.