Translate to: 简体中文
The go-comtrade is a lib used to parse COMTRADE file.
go get github.com/yonwoo9/go-comtrade
package main
import (
"flag"
"fmt"
"github.com/yonwoo9/go-comtrade"
)
var (
configFile = flag.String("config", "testdata/test1.cfg", "config file path")
dataFile = flag.String("data", "testdata/test1.dat", "data file path")
)
func main() {
flag.Parse()
c, err := comtrade.ParseComtrade(*configFile, *dataFile)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(c.Conf)
}
The go-comtrade is open-sourced software licensed under the MIT license.
The following project had particular influence on go-comtrade design.