Skip to content
frostyardPublic

About

Frostyard's Go commons library

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

133 Commits

Folders and files

Repository files navigation

std

CI Go Reference

std is a Go module of standard-library-only shared packages for frostyard programs — updex, clix, chairlift and other tools — and it carries the Rust crate frostyard-problems for frostyard apps written in Rust.

Status: pre-release. Releases are v0 tags, and the API can change between minor releases.

Documentation: pkg.go.dev/github.com/frostyard/std

What it does

Package What it gives you
reporter A Reporter interface for progress output, with text, JSON Lines and silent implementations.
problems Writes the panics and coded errors of an app to the local systemd journal as problem records, and reads them back.
rust/ (frostyard-problems) The same record writer for Rust apps, in the Rust standard library only.

Install

go get github.com/frostyard/std

The Rust crate is not on crates.io: add it as a cargo git dependency on a std tag, as rust/README.md shows.

Use

package main

import (
	"os"

	"github.com/frostyard/std/reporter"
)

func main() {
	r := reporter.NewTextReporter(os.Stdout)

	r.Step(1, 2, "Download the image")
	r.Progress(50, "12 of 24 MiB")
	r.Step(2, 2, "Write the system extension links")
	r.Complete("Done", nil)
}

Develop

mise install   # golangci-lint, svu, Rust
make ci        # the canonical gate (what CI's Verify job runs)

Design and invariants: docs/design/overview.md.

Where to go next

About

Frostyard's Go commons library

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages