Wednesday, August 29, 2012

Golang project update: edigo

After some reflection, what I want to have is in fact to be able to auto-generate a Go package or packages, which can be imported into any Go code later, given an XML EDIFACT grammar file that is generated by some tool, such as (my current employer) Amadeus' Visual Services tool.

The format of this XML EDIFACT grammar file is

    Visual Services 5 - XML Generator
    ...list of transactions...
    ...list of messages...
    ...list of groups...
    ...list of segments...
    ...list of composites...

The resulting package codes could then be stored in a folder named after the interface name (in the above example "skd") as composites.go, segments.go, groups.go, etc. Every time there's a new version of the grammar XML file, edigo must be used to regenerate the said files.

That's all for now. I will write more on this later. Oh, and by the way, I've created a new repository on GitHub for this.

Tuesday, August 28, 2012

Golang Project Idea: Go EDIFACT

It's been sometime since I've written anything on this blog. A few weeks back I realized that my syntax highlighting brush for golang wasn't available online anymore and so I decided to put it on Github.

Anyway, I've been thinking about what I could do to improve my understanding of the Go programming language.  Earlier today it dawned on me that since I've been working a lot with EDIFACT messages, why not a Go package for handling EDIFACT messages?

So, what do I want to make? I haven't really seen an EDIFACT grammar parser that takes an XML file that defines the grammar and converts a valid EDIFACT message into a Go data structure. Conversely, it should allow the user to fill the Go data structure and generates the corresponding EDIFACT message from it.

Okay, it's time to hack.  I'll post updates on this project later.  Cheers!