ing
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
type CPUParser struct {
|
||||
}
|
||||
|
||||
func (p *CPUParser) Name() string {
|
||||
func (p *CPUParser) Key() string {
|
||||
return "cpu"
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type MemoryParser struct {
|
||||
}
|
||||
|
||||
func (p *MemoryParser) Name() string {
|
||||
func (p *MemoryParser) Key() string {
|
||||
return "mem"
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ func init() {
|
||||
}
|
||||
|
||||
func addParser(p Parser) {
|
||||
parsers[p.Name()] = p
|
||||
parsers[p.Key()] = p
|
||||
}
|
||||
|
||||
func GetParser(name string) Parser {
|
||||
@@ -24,7 +24,7 @@ func GetParser(name string) Parser {
|
||||
}
|
||||
|
||||
type Parser interface {
|
||||
Name() string
|
||||
Key() string
|
||||
Parse(scanner *ParserScanner) (map[string]string, error)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user