Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/mpolden/sfv

Go library for verifying SFV files
https://github.com/mpolden/sfv

checksum go sfv

Last synced: 8 days ago
JSON representation

Go library for verifying SFV files

Awesome Lists containing this project

README

        

# sfv

![Build Status](https://github.com/mpolden/sfv/workflows/ci/badge.svg)

sfv is a [Go](http://golang.org) package for verifying
[SFV files](https://en.wikipedia.org/wiki/Simple_file_verification).

## Installation

`$ go get github.com/mpolden/sfv`

## Example

```go
package main

import (
"github.com/mpolden/sfv"
"log"
)

func main() {
sfv, err := sfv.Read("/path/to/file.sfv")
if err != nil {
log.Fatal(err)
}

ok, err := sfv.Verify()
if err != nil {
log.Fatal(err)
}
if ok {
log.Print("All files are OK!")
}
for _, c := range sfv.Checksums {
log.Printf("%+v", c)
}
}
```