Files
fit-parser/DEPLOYMENT.md
Thomas Klaehn 2945d90d24 Initial commit
Signed-off-by: Thomas Klaehn <thomas.klaehn@perinet.io>
2026-02-08 07:30:31 +00:00

3.3 KiB

Deployment Guide

Module Information

Quick Start for Users

Installation

go get git.blackfinn.de/go/fit-parser/fitparser

Usage

package main

import (
    "fmt"
    "log"
    "os"
    "git.blackfinn.de/go/fit-parser/fitparser"
)

func main() {
    data, err := os.ReadFile("activity.fit")
    if err != nil {
        log.Fatal(err)
    }

    decoder, err := fitparser.NewDecoder(data)
    if err != nil {
        log.Fatal(err)
    }

    messages, err := decoder.Decode()
    if err != nil {
        log.Fatal(err)
    }

    fmt.Printf("Decoded %d messages\n", len(messages))
}

Deployment Steps

1. Initialize Git Repository

git init
git add .
git commit -m "Initial commit: FIT Parser v1.0.0"

2. Add Remote

git remote add origin https://git.blackfinn.de/go/fit-parser.git

3. Push to Repository

# Push main branch
git branch -M main
git push -u origin main

# Create and push tag for version
git tag v1.0.0
git push origin v1.0.0

4. Verify Module is Accessible

# Test fetching the module
go get git.blackfinn.de/go/fit-parser/fitparser@latest

# Or specific version
go get git.blackfinn.de/go/fit-parser/fitparser@v1.0.0

Version Tagging

For semantic versioning, use git tags:

# Major release
git tag v2.0.0
git push origin v2.0.0

# Minor release
git tag v1.1.0
git push origin v1.1.0

# Patch release
git tag v1.0.1
git push origin v1.0.1

Module Dependencies

This module has zero external dependencies - it uses only the Go standard library.

Go Version Support

  • Minimum Go version: 1.16
  • Tested with: 1.23.4
  • Should work with: All Go versions 1.16+

Repository Structure

git.blackfinn.de/go/fit-parser/
├── fitparser/           # Main package
│   └── *.go            # Implementation
├── example/            # Example application
│   └── testdata/       # Test FIT files
├── README.md           # Documentation
├── LICENSE             # MIT License
└── go.mod              # Module definition

CI/CD Considerations

Automated Testing

# Example GitLab CI configuration
test:
  script:
    - go test -v ./fitparser
    - go test -race ./fitparser
    - go test -bench=. ./fitparser

Build Verification

build:
  script:
    - go build ./fitparser
    - go build ./example

Coverage Report

go test -coverprofile=coverage.out ./fitparser
go tool cover -html=coverage.out -o coverage.html

Documentation

  • Main Docs: README.md
  • Quick Start: QUICKSTART.md
  • Examples: example/README.md
  • Structure: PROJECT_STRUCTURE.md
  • Technical: CRC_FIX_SUMMARY.md

Support

For issues and questions:

License

MIT License - See LICENSE file for details.

The FIT protocol is property of Garmin International, Inc.