refactor: Update dependencies, modernize Hydrun build systems, CI/CD and README conventions

Signed-off-by: Felicitas Pojtinger <felicitas@pojtinger.com>
This commit is contained in:
Felicitas Pojtinger
2024-07-30 15:56:12 -07:00
parent f3fbd3156f
commit 3aff00b57e
14 changed files with 522 additions and 553 deletions

View File

@@ -6,34 +6,31 @@ on:
schedule:
- cron: "0 0 * * 0"
permissions:
contents: write
jobs:
build-linux:
runs-on: ubuntu-latest
runs-on: ${{ matrix.target.runner }}
permissions:
contents: read
strategy:
matrix:
target:
# Tests
- id: test
src: .
os: golang:bookworm
flags: ""
flags: -e '-v /tmp/ccache:/root/.cache/go-build'
cmd: GOFLAGS="-short" ./Hydrunfile test
dst: out/nonexistent
- id: go-stfs
runner: ubuntu-latest
# Binaries
- id: go.stfs
src: .
os: golang:bookworm
flags: ""
flags: -e '-v /tmp/ccache:/root/.cache/go-build'
cmd: ./Hydrunfile go stfs
dst: out/*
# Disabled until `gccgo` supports generics/Go 1.21: https://go.dev/doc/install/gccgo
# - id: gccgo-stfs
# src: .
# os: ghcr.io/pojntfx/bagccgop-base-sid
# flags: -e '--privileged'
# cmd: ./Hydrunfile gccgo stfs
# dst: out/*
runner: ubuntu-latest
steps:
- name: Maximize build space
@@ -42,11 +39,17 @@ jobs:
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Restore ccache
uses: actions/cache/restore@v4
with:
path: |
/tmp/ccache
key: cache-ccache-${{ matrix.target.id }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
- name: Set up hydrun
run: |
curl -L -o /tmp/hydrun "https://github.com/pojntfx/hydrun/releases/latest/download/hydrun.linux-$(uname -m)"
@@ -56,21 +59,29 @@ jobs:
run: hydrun -o ${{ matrix.target.os }} ${{ matrix.target.flags }} "${{ matrix.target.cmd }}"
- name: Fix permissions for output
run: sudo chown -R $USER .
- name: Save ccache
uses: actions/cache/save@v4
with:
path: |
/tmp/ccache
key: cache-ccache-${{ matrix.target.id }}
- name: Upload output
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.target.id }}
path: ${{ matrix.target.dst }}
publish-linux:
runs-on: ubuntu-latest
permissions:
contents: write
needs: build-linux
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Download output
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
path: /tmp/out
- name: Extract branch name
@@ -78,18 +89,16 @@ jobs:
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
- name: Publish pre-release to GitHub releases
if: ${{ github.ref == 'refs/heads/main' }}
uses: marvinpinto/action-automatic-releases@latest
uses: softprops/action-gh-release@v2
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: release-${{ steps.extract_branch.outputs.branch }}
tag_name: release-${{ steps.extract_branch.outputs.branch }}
prerelease: true
files: |
/tmp/out/*/*
- name: Publish release to GitHub releases
if: startsWith(github.ref, 'refs/tags/v')
uses: marvinpinto/action-automatic-releases@latest
uses: softprops/action-gh-release@v2
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
/tmp/out/*/*

View File

@@ -37,22 +37,3 @@ if [ "$1" = "go" ]; then
exit 0
fi
# gccgo
if [ "$1" = "gccgo" ]; then
# Install native dependencies
apt update
apt install -y curl git
# Install bagccgop
curl -L -o /tmp/bagccgop "https://github.com/pojntfx/bagccgop/releases/latest/download/bagccgop.linux-$(uname -m)"
install /tmp/bagccgop /usr/local/bin
# Configure Git
git config --global --add safe.directory '*'
# Build
GOFLAGS='-gccgoflags=-static' bagccgop -x '(linux/alpha|linux/mipsle|linux/arm$|linux/arm64|linux/386|linux/amd64|linux/s390x)' -j1 -b "$2" -n -r 'make depend' -s 'build-essential,automake' -m 'libsqlite3-dev' -p 'make build/stfs DST=$DST' -d out
exit 0
fi

View File

@@ -2,10 +2,8 @@
Simple Tape File System (STFS), a file system for tapes and tar files.
⚠️ STFS has not yet been audited! While we try to make it as secure as possible, it has not yet undergone a formal security audit by a third party. Please keep this in mind if you use it for security-critical applications. ⚠️
[![hydrun CI](https://github.com/pojntfx/stfs/actions/workflows/hydrun.yaml/badge.svg)](https://github.com/pojntfx/stfs/actions/workflows/hydrun.yaml)
![Go Version](https://img.shields.io/badge/go%20version-%3E=1.17-61CFDD.svg)
![Go Version](https://img.shields.io/badge/go%20version-%3E=1.21-61CFDD.svg)
[![Go Reference](https://pkg.go.dev/badge/github.com/pojntfx/stfs.svg)](https://pkg.go.dev/github.com/pojntfx/stfs)
[![Matrix](https://img.shields.io/matrix/stfs:matrix.org)](https://matrix.to/#/#stfs:matrix.org?via=matrix.org)
@@ -13,7 +11,7 @@ Simple Tape File System (STFS), a file system for tapes and tar files.
STFS is a filesystem that brings tapes and tar files into the 21st century.
It enables you too ...
It enables you to:
- **Use a tape or tar file like a regular disk**: STFS uses the robust `tar` format and tape technology to provide a fully features filesystem. This makes such storage solutions much for accessible and manageable, while also significantly increasing the performance of everyday operations such as listing and searching for files by using a SQLite-based on-disk index.
- **Archive data securely**: The integrated transparent, asymmetrical encryption and signature support makes it possible to use almost any tape as a regulations compliant storage medium, while still being able to take advantage of all the benefits of tapes like reduced cost and increased reliability.
@@ -39,9 +37,17 @@ $ curl -L -o /tmp/stfs "https://github.com/pojntfx/stfs/releases/latest/download
$ sudo install /tmp/stfs /usr/local/bin
```
On Windows, the following should work (using PowerShell as administrator):
```shell
PS> Invoke-WebRequest https://github.com/pojntfx/stfs/releases/latest/download/stfs.windows-x86_64.exe -OutFile \Windows\System32\stfs.exe
```
Note that only the Linux version supports reading from tape drives; macOS and Windows are limited to operating on tar files.
You can find binaries for more operating systems and architectures on [GitHub releases](https://github.com/pojntfx/stfs/releases).
## Usage
## Tutorial
> Please note that this is only a short overview and does not explain all configuration options. To get more info on available commands or options, use `--help`.
@@ -613,6 +619,6 @@ Have any questions or need help? Chat with us [on Matrix](https://matrix.to/#/#s
## License
STFS (c) 2023 Felicitas Pojtinger and contributors
STFS (c) 2024 Felicitas Pojtinger and contributors
SPDX-License-Identifier: AGPL-3.0

View File

@@ -41,6 +41,10 @@ func (l Logger) Error(event string, keyvals ...interface{}) {
l.log("ERROR", event, keyvals)
}
func (l Logger) Panic(event string, keyvals ...interface{}) {
l.log("PANIC", event, keyvals)
}
func (l Logger) With(keyvals ...interface{}) golog.Logger {
return l
}

110
go.mod
View File

@@ -1,71 +1,73 @@
module github.com/pojntfx/stfs
go 1.17
go 1.21
toolchain go1.22.5
require (
aead.dev/minisign v0.2.0
filippo.io/age v1.0.0
github.com/ProtonMail/go-crypto v0.0.0-20211112122917-428f8eabeeb3
github.com/ProtonMail/gopenpgp/v2 v2.3.1
github.com/andybalholm/brotli v1.0.4
github.com/cosnicolaou/pbzip2 v1.0.1
aead.dev/minisign v0.3.0
filippo.io/age v1.2.0
github.com/ProtonMail/go-crypto v1.0.0
github.com/ProtonMail/gopenpgp/v2 v2.7.5
github.com/andybalholm/brotli v1.1.0
github.com/cosnicolaou/pbzip2 v1.0.3
github.com/dsnet/compress v0.0.1
github.com/fclairamb/ftpserverlib v0.16.0
github.com/fclairamb/go-log v0.1.0
github.com/fclairamb/ftpserverlib v0.24.1
github.com/fclairamb/go-log v0.5.0
github.com/friendsofgo/errors v0.9.2
github.com/klauspost/compress v1.13.6
github.com/klauspost/pgzip v1.2.5
github.com/klauspost/compress v1.17.9
github.com/klauspost/pgzip v1.2.6
github.com/mattetti/filebuffer v1.0.1
github.com/mattn/go-sqlite3 v1.14.9
github.com/pierrec/lz4/v4 v4.1.12
github.com/rubenv/sql-migrate v0.0.0-20211023115951-9f02b1e13857
github.com/spf13/afero v1.8.0
github.com/spf13/cobra v1.3.0
github.com/spf13/viper v1.10.1
github.com/mattn/go-sqlite3 v1.14.22
github.com/pierrec/lz4/v4 v4.1.21
github.com/rubenv/sql-migrate v1.7.0
github.com/spf13/afero v1.11.0
github.com/spf13/cobra v1.8.1
github.com/spf13/viper v1.19.0
github.com/volatiletech/null/v8 v8.1.2
github.com/volatiletech/sqlboiler/v4 v4.8.3
github.com/volatiletech/strmangle v0.0.1
modernc.org/sqlite v1.14.3
github.com/volatiletech/sqlboiler/v4 v4.16.2
github.com/volatiletech/strmangle v0.0.6
modernc.org/sqlite v1.31.1
)
require (
github.com/ProtonMail/go-mime v0.0.0-20190923161245-9b5a4261663a // indirect
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/gofrs/uuid v3.2.0+incompatible // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/ProtonMail/go-mime v0.0.0-20230322103455-7d82a3887f2f // indirect
github.com/cloudflare/circl v1.3.9 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/go-gorp/gorp/v3 v3.1.0 // indirect
github.com/gofrs/uuid v4.4.0+incompatible // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/magiconair/properties v1.8.5 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mitchellh/mapstructure v1.4.3 // indirect
github.com/pelletier/go-toml v1.9.4 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/ncruces/go-strftime v0.1.9 // indirect
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/spf13/cast v1.4.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/sagikazarmark/locafero v0.6.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.2.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/volatiletech/inflect v0.0.1 // indirect
github.com/volatiletech/randomize v0.0.1 // indirect
github.com/ziutek/mymysql v1.5.4 // indirect
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa // indirect
golang.org/x/mod v0.5.0 // indirect
golang.org/x/sys v0.0.0-20211210111614-af8b64212486 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/tools v0.1.5 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
gopkg.in/gorp.v1 v1.7.2 // indirect
gopkg.in/ini.v1 v1.66.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
lukechampine.com/uint128 v1.1.1 // indirect
modernc.org/cc/v3 v3.35.18 // indirect
modernc.org/ccgo/v3 v3.12.95 // indirect
modernc.org/libc v1.11.104 // indirect
modernc.org/mathutil v1.4.1 // indirect
modernc.org/memory v1.0.5 // indirect
modernc.org/opt v0.1.1 // indirect
modernc.org/strutil v1.1.1 // indirect
modernc.org/token v1.0.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.25.0 // indirect
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/xerrors v0.0.0-20240716161551-93cc26a95ae9 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
modernc.org/gc/v3 v3.0.0-20240722195230-4a140ff9c08e // indirect
modernc.org/libc v1.55.6 // indirect
modernc.org/mathutil v1.6.0 // indirect
modernc.org/memory v1.8.0 // indirect
modernc.org/strutil v1.2.0 // indirect
modernc.org/token v1.1.0 // indirect
)

791
go.sum

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
// Code generated by SQLBoiler 4.15.0 (https://github.com/volatiletech/sqlboiler). DO NOT EDIT.
// Code generated by SQLBoiler 4.16.2 (https://github.com/volatiletech/sqlboiler). DO NOT EDIT.
// This file is meant to be re-generated in place and/or deleted at any time.
package models

View File

@@ -1,4 +1,4 @@
// Code generated by SQLBoiler 4.15.0 (https://github.com/volatiletech/sqlboiler). DO NOT EDIT.
// Code generated by SQLBoiler 4.16.2 (https://github.com/volatiletech/sqlboiler). DO NOT EDIT.
// This file is meant to be re-generated in place and/or deleted at any time.
package models

View File

@@ -1,4 +1,4 @@
// Code generated by SQLBoiler 4.15.0 (https://github.com/volatiletech/sqlboiler). DO NOT EDIT.
// Code generated by SQLBoiler 4.16.2 (https://github.com/volatiletech/sqlboiler). DO NOT EDIT.
// This file is meant to be re-generated in place and/or deleted at any time.
package models

View File

@@ -1,4 +1,4 @@
// Code generated by SQLBoiler 4.15.0 (https://github.com/volatiletech/sqlboiler). DO NOT EDIT.
// Code generated by SQLBoiler 4.16.2 (https://github.com/volatiletech/sqlboiler). DO NOT EDIT.
// This file is meant to be re-generated in place and/or deleted at any time.
package models

View File

@@ -1,4 +1,4 @@
// Code generated by SQLBoiler 4.15.0 (https://github.com/volatiletech/sqlboiler). DO NOT EDIT.
// Code generated by SQLBoiler 4.16.2 (https://github.com/volatiletech/sqlboiler). DO NOT EDIT.
// This file is meant to be re-generated in place and/or deleted at any time.
package models
@@ -163,18 +163,27 @@ var (
_ = qmhelper.Where
)
var gorpMigrationAfterSelectMu sync.Mutex
var gorpMigrationAfterSelectHooks []GorpMigrationHook
var gorpMigrationBeforeInsertMu sync.Mutex
var gorpMigrationBeforeInsertHooks []GorpMigrationHook
var gorpMigrationAfterInsertMu sync.Mutex
var gorpMigrationAfterInsertHooks []GorpMigrationHook
var gorpMigrationBeforeUpdateMu sync.Mutex
var gorpMigrationBeforeUpdateHooks []GorpMigrationHook
var gorpMigrationAfterUpdateMu sync.Mutex
var gorpMigrationAfterUpdateHooks []GorpMigrationHook
var gorpMigrationBeforeDeleteMu sync.Mutex
var gorpMigrationBeforeDeleteHooks []GorpMigrationHook
var gorpMigrationAfterDeleteMu sync.Mutex
var gorpMigrationAfterDeleteHooks []GorpMigrationHook
var gorpMigrationBeforeUpsertMu sync.Mutex
var gorpMigrationBeforeUpsertHooks []GorpMigrationHook
var gorpMigrationAfterUpsertMu sync.Mutex
var gorpMigrationAfterUpsertHooks []GorpMigrationHook
// doAfterSelectHooks executes all "after Select" hooks.
@@ -316,23 +325,41 @@ func (o *GorpMigration) doAfterUpsertHooks(ctx context.Context, exec boil.Contex
func AddGorpMigrationHook(hookPoint boil.HookPoint, gorpMigrationHook GorpMigrationHook) {
switch hookPoint {
case boil.AfterSelectHook:
gorpMigrationAfterSelectMu.Lock()
gorpMigrationAfterSelectHooks = append(gorpMigrationAfterSelectHooks, gorpMigrationHook)
gorpMigrationAfterSelectMu.Unlock()
case boil.BeforeInsertHook:
gorpMigrationBeforeInsertMu.Lock()
gorpMigrationBeforeInsertHooks = append(gorpMigrationBeforeInsertHooks, gorpMigrationHook)
gorpMigrationBeforeInsertMu.Unlock()
case boil.AfterInsertHook:
gorpMigrationAfterInsertMu.Lock()
gorpMigrationAfterInsertHooks = append(gorpMigrationAfterInsertHooks, gorpMigrationHook)
gorpMigrationAfterInsertMu.Unlock()
case boil.BeforeUpdateHook:
gorpMigrationBeforeUpdateMu.Lock()
gorpMigrationBeforeUpdateHooks = append(gorpMigrationBeforeUpdateHooks, gorpMigrationHook)
gorpMigrationBeforeUpdateMu.Unlock()
case boil.AfterUpdateHook:
gorpMigrationAfterUpdateMu.Lock()
gorpMigrationAfterUpdateHooks = append(gorpMigrationAfterUpdateHooks, gorpMigrationHook)
gorpMigrationAfterUpdateMu.Unlock()
case boil.BeforeDeleteHook:
gorpMigrationBeforeDeleteMu.Lock()
gorpMigrationBeforeDeleteHooks = append(gorpMigrationBeforeDeleteHooks, gorpMigrationHook)
gorpMigrationBeforeDeleteMu.Unlock()
case boil.AfterDeleteHook:
gorpMigrationAfterDeleteMu.Lock()
gorpMigrationAfterDeleteHooks = append(gorpMigrationAfterDeleteHooks, gorpMigrationHook)
gorpMigrationAfterDeleteMu.Unlock()
case boil.BeforeUpsertHook:
gorpMigrationBeforeUpsertMu.Lock()
gorpMigrationBeforeUpsertHooks = append(gorpMigrationBeforeUpsertHooks, gorpMigrationHook)
gorpMigrationBeforeUpsertMu.Unlock()
case boil.AfterUpsertHook:
gorpMigrationAfterUpsertMu.Lock()
gorpMigrationAfterUpsertHooks = append(gorpMigrationAfterUpsertHooks, gorpMigrationHook)
gorpMigrationAfterUpsertMu.Unlock()
}
}

View File

@@ -1,4 +1,4 @@
// Code generated by SQLBoiler 4.15.0 (https://github.com/volatiletech/sqlboiler). DO NOT EDIT.
// Code generated by SQLBoiler 4.16.2 (https://github.com/volatiletech/sqlboiler). DO NOT EDIT.
// This file is meant to be re-generated in place and/or deleted at any time.
package models
@@ -290,18 +290,27 @@ var (
_ = qmhelper.Where
)
var headerAfterSelectMu sync.Mutex
var headerAfterSelectHooks []HeaderHook
var headerBeforeInsertMu sync.Mutex
var headerBeforeInsertHooks []HeaderHook
var headerAfterInsertMu sync.Mutex
var headerAfterInsertHooks []HeaderHook
var headerBeforeUpdateMu sync.Mutex
var headerBeforeUpdateHooks []HeaderHook
var headerAfterUpdateMu sync.Mutex
var headerAfterUpdateHooks []HeaderHook
var headerBeforeDeleteMu sync.Mutex
var headerBeforeDeleteHooks []HeaderHook
var headerAfterDeleteMu sync.Mutex
var headerAfterDeleteHooks []HeaderHook
var headerBeforeUpsertMu sync.Mutex
var headerBeforeUpsertHooks []HeaderHook
var headerAfterUpsertMu sync.Mutex
var headerAfterUpsertHooks []HeaderHook
// doAfterSelectHooks executes all "after Select" hooks.
@@ -443,23 +452,41 @@ func (o *Header) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecut
func AddHeaderHook(hookPoint boil.HookPoint, headerHook HeaderHook) {
switch hookPoint {
case boil.AfterSelectHook:
headerAfterSelectMu.Lock()
headerAfterSelectHooks = append(headerAfterSelectHooks, headerHook)
headerAfterSelectMu.Unlock()
case boil.BeforeInsertHook:
headerBeforeInsertMu.Lock()
headerBeforeInsertHooks = append(headerBeforeInsertHooks, headerHook)
headerBeforeInsertMu.Unlock()
case boil.AfterInsertHook:
headerAfterInsertMu.Lock()
headerAfterInsertHooks = append(headerAfterInsertHooks, headerHook)
headerAfterInsertMu.Unlock()
case boil.BeforeUpdateHook:
headerBeforeUpdateMu.Lock()
headerBeforeUpdateHooks = append(headerBeforeUpdateHooks, headerHook)
headerBeforeUpdateMu.Unlock()
case boil.AfterUpdateHook:
headerAfterUpdateMu.Lock()
headerAfterUpdateHooks = append(headerAfterUpdateHooks, headerHook)
headerAfterUpdateMu.Unlock()
case boil.BeforeDeleteHook:
headerBeforeDeleteMu.Lock()
headerBeforeDeleteHooks = append(headerBeforeDeleteHooks, headerHook)
headerBeforeDeleteMu.Unlock()
case boil.AfterDeleteHook:
headerAfterDeleteMu.Lock()
headerAfterDeleteHooks = append(headerAfterDeleteHooks, headerHook)
headerAfterDeleteMu.Unlock()
case boil.BeforeUpsertHook:
headerBeforeUpsertMu.Lock()
headerBeforeUpsertHooks = append(headerBeforeUpsertHooks, headerHook)
headerBeforeUpsertMu.Unlock()
case boil.AfterUpsertHook:
headerAfterUpsertMu.Lock()
headerAfterUpsertHooks = append(headerAfterUpsertHooks, headerHook)
headerAfterUpsertMu.Unlock()
}
}

View File

@@ -1,4 +1,4 @@
// Code generated by SQLBoiler 4.15.0 (https://github.com/volatiletech/sqlboiler). DO NOT EDIT.
// Code generated by SQLBoiler 4.16.2 (https://github.com/volatiletech/sqlboiler). DO NOT EDIT.
// This file is meant to be re-generated in place and/or deleted at any time.
package models

View File

@@ -85,6 +85,12 @@ func (l JSONLogger) Error(event string, keyvals ...interface{}) {
}
}
func (l JSONLogger) Panic(event string, keyvals ...interface{}) {
if l.verbosity >= 0 {
printJSON("PANIC", event, keyvals)
}
}
func (l JSONLogger) With(keyvals ...interface{}) golog.Logger {
return l
}