An open API service indexing awesome lists of open source software.

https://github.com/logocomune/adif


https://github.com/logocomune/adif

Last synced: 11 months ago
JSON representation

Awesome Lists containing this project

README

          

# Adif Parser

Simple parser for Amateur Data Interchange Format (ADIF)

## Installation

`go get -u github.com/logocomune/adif`

## Usage

### Read from file

```go
package main

import (
"github.com/logocomune/adif"
"fmt"
"log"
)

func main() {

parsed, err := adif.ParseFile("example.adi")
if err != nil {
log.Fatalf("Error: %s\n", err.Error())
}

fmt.Printf("%+v\n", parsed)
}

```

### Read from a string

```go
package main

import (
"github.com/logocomune/adif"
"fmt"
"log"
)

const adifString = "...AN ADIF STRING..."

func main() {

parsed, err := adif.ParseString(adifString)
if err != nil {
log.Fatalf("Error: %s\n", err.Error())
}

fmt.Printf("%+v\n", parsed)
}
```