MCPcopy Index your code
hub / github.com/azoner/gox12

github.com/azoner/gox12 @v0.1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.0 ↗ · + Follow
35 symbols 92 edges 6 files 12 documented · 34%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

gox12

golang X12 non-validating parser

Build Status

Installation

go get github.com/azoner/gox12

Example

package main

import (
        "fmt"
        "os"
        "log"
        "github.com/azoner/gox12"
)

func main() {
        inFilename := "x12file.txt"
        inFile, err := os.Open(inFilename)
        if err != nil {
                log.Fatal(err)
                os.Exit(1)
        }
        defer inFile.Close()
        raw, err := gox12.NewRawX12FileReader(inFile)
        if err != nil {
                fmt.Println(err)
        }
        for rs := range raw.GetSegments() {
                if rs.Segment.SegmentId == "INS" {
                        fmt.Println(rs)
                        v, _, _ := rs.Segment.GetValue("INS01")
                        fmt.Println(v)
                        for v := range rs.Segment.GetAllValues() {
                                fmt.Println(v.X12Path, v.Value)
                        }
                        fmt.Println()
                }
        }
}

Core symbols most depended-on inside this repo

ParseX12Path
called by 11
x12path.go
String
called by 11
x12path.go
NewSegment
called by 4
segment.go
IsAbs
called by 4
x12path.go
NewRawX12FileReader
called by 2
rawx12file.go
GetValue
called by 1
segment.go
GetSegments
called by 1
rawx12file.go
getDelimiters
called by 1
rawx12file.go

Shape

Function 23
Method 7
Struct 5

Languages

Go100%

Modules by API surface

x12path_test.go11 symbols
x12path.go9 symbols
segment.go5 symbols
rawx12file.go5 symbols
segment_test.go3 symbols
rawx12file_test.go2 symbols

For agents

$ claude mcp add gox12 \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact