Skip to content

Latest commit

 

History

History
53 lines (37 loc) · 1.05 KB

README.md

File metadata and controls

53 lines (37 loc) · 1.05 KB
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.