https://github.com/logocomune/adif
https://github.com/logocomune/adif
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/logocomune/adif
- Owner: logocomune
- Created: 2022-10-17T19:05:02.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-20T21:04:10.000Z (over 3 years ago)
- Last Synced: 2025-06-04T08:23:53.900Z (12 months ago)
- Language: Go
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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)
}
```