Skip to content

yonwoo9/go-comtrade

Repository files navigation

Translate to: 简体中文

About go-comtrade

The go-comtrade is a lib used to parse COMTRADE file.

Getting Started

go get github.com/yonwoo9/go-comtrade

Usage

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)
}

License

The go-comtrade is open-sourced software licensed under the MIT license.

Acknowledgments

The following project had particular influence on go-comtrade design.