Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseCmdFromString ¶
The input string is like: execute command: docker stop xyz, this func just parse the command from the string
Types ¶
type CodeParser ¶
type CodeParser interface {
ParseCode(text string) (SourceFileDict, error)
}
type GoCodeParser ¶
type GoCodeParser struct { }
func NewGoCodeParser ¶
func NewGoCodeParser() *GoCodeParser
func (*GoCodeParser) ParseCode ¶
func (g *GoCodeParser) ParseCode(text string) ([]SourceFile, error)
ParseCode function Parse the code from markdown blocks and return a SourceFileDict
type SourceFile ¶
func (*SourceFile) ParseFileContent ¶
func (s *SourceFile) ParseFileContent()
func (*SourceFile) ParseFileName ¶
func (s *SourceFile) ParseFileName()
Parse filename and code from the match content
type SourceFileDict ¶
type SourceFileDict struct {
SourceFiles map[string]SourceFile
}
func NewSourceFileDict ¶
func NewSourceFileDict() *SourceFileDict
func (*SourceFileDict) AddSourceFile ¶
func (s *SourceFileDict) AddSourceFile(fileName string, fileContent string)
func (*SourceFileDict) GetSourceFile ¶
func (s *SourceFileDict) GetSourceFile(fileName string) (SourceFile, error)
func (*SourceFileDict) PrintSourceFiles ¶
func (s *SourceFileDict) PrintSourceFiles()
PrintSourceFiles function prints the source files in the SourceFileDict
Click to show internal directories.
Click to hide internal directories.