Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
arp242 committed May 22, 2024
1 parent bb107ed commit 224cc1f
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 67 deletions.
2 changes: 1 addition & 1 deletion cmd/goatcounter/dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ func dash(url, key string, rng ztime.Range) error {
"%s – %d of %d visits shown", rng.String(), data.hits.Total, data.total.Total),
78), zli.Bold))
fmt.Printf("┌%s┬%s┐\n", strings.Repeat("─", 48), strings.Repeat("─", 30))
m := zint.Max(len(left), len(right))
m := max(len(left), len(right))
for i := 0; i < m; i++ {
l, r := row{}, row{}
if i < len(right) {
Expand Down
4 changes: 2 additions & 2 deletions cmd/goatcounter/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ func importCSV(fp io.ReadCloser, url, key string, silent bool) error {

n += len(hits)
if !silent {
zli.ReplaceLinef("Imported %d rows", n)
zli.Replacef("Imported %d rows", n)
}

hits = make([]handlers.APICountRequestHit, 0, 500)
Expand Down Expand Up @@ -400,7 +400,7 @@ func importLog(
t.Reset(d)
persistLog(hits, url, key, silent, follow)
if !silent && !follow {
zli.ReplaceLinef("Imported %d rows", n)
zli.Replacef("Imported %d rows", n)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/goatcounter/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ func doServe(ctx context.Context, db zdb.DB,
}
time.Sleep(100 * time.Millisecond)

zli.EraseLine()
zli.Erase()
fmt.Fprintf(zli.Stdout, "%d tasks: ", len(r))
for i, t := range r {
if i > 0 {
Expand Down
39 changes: 19 additions & 20 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.21
require (
code.soquee.net/otp v0.0.4
github.com/BurntSushi/toml v1.3.2
github.com/PuerkitoBio/goquery v1.9.1
github.com/PuerkitoBio/goquery v1.9.2
github.com/bmatcuk/doublestar/v4 v4.6.1
github.com/boombuler/barcode v1.0.1
github.com/go-chi/chi/v5 v5.0.12
Expand All @@ -16,31 +16,31 @@ require (
github.com/oschwald/geoip2-golang v1.4.0
github.com/russross/blackfriday/v2 v2.1.0
github.com/teamwork/reload v1.4.2
golang.org/x/crypto v0.22.0
golang.org/x/image v0.15.0
golang.org/x/net v0.24.0
golang.org/x/crypto v0.23.0
golang.org/x/image v0.16.0
golang.org/x/net v0.25.0
golang.org/x/sync v0.7.0
golang.org/x/text v0.14.0
golang.org/x/text v0.15.0
zgo.at/bgrun v0.0.0-00010101000000-000000000000
zgo.at/blackmail v0.0.0-20221021025740-b3fdfc32a1aa
zgo.at/errors v1.2.0
zgo.at/follow v0.0.0-20221021024812-dd647d64b369
zgo.at/follow v0.0.0-20240522232612-673fb184d32f
zgo.at/gadget v1.0.0
zgo.at/guru v1.1.0
zgo.at/isbot v1.0.0
zgo.at/json v0.0.0-20221020004326-fe4f75bb278e
zgo.at/termtext v1.2.0
zgo.at/termtext v1.5.0
zgo.at/tz v0.0.0-20211017223207-006eae99adf6
zgo.at/z18n v0.0.0-20221020022658-4ea64eeb51d9
zgo.at/z18n v0.0.0-20240522230155-4d5af439f8c4
zgo.at/zcache v1.2.0
zgo.at/zcache/v2 v2.1.0
zgo.at/zdb v0.0.0-20240329024059-bf49d3312618
zgo.at/zhttp v0.0.0-20231215095120-00bad823c4be
zgo.at/zli v0.0.0-20231124215953-c6675b0b020a
zgo.at/zdb v0.0.0-20240522231118-43a1cf220952
zgo.at/zhttp v0.0.0-20240522230924-481de30321c5
zgo.at/zli v0.0.0-20240522161040-91dbcffb2960
zgo.at/zlog v0.0.0-20211017235224-dd4772ddf860
zgo.at/zprof v0.0.0-20211217104121-c3c12596d8f0
zgo.at/zstd v0.0.0-20240329024239-70792c70046d
zgo.at/ztpl v0.0.0-20240423151759-1204c34324cb
zgo.at/zstd v0.0.0-20240521013615-10baa641d7d0
zgo.at/ztpl v0.0.0-20240522225602-574aca1079e7
zgo.at/zvalidate v0.0.0-20221021025449-cb54fa8efade
)

Expand All @@ -55,13 +55,12 @@ replace github.com/oschwald/geoip2-golang => github.com/arp242/geoip2-golang v1.

require (
github.com/andybalholm/cascadia v1.3.2 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/lib/pq v1.10.9 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/oschwald/maxminddb-golang v1.10.0 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
golang.org/x/mod v0.11.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/term v0.19.0 // indirect
golang.org/x/tools v0.6.0 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/tools v0.21.0 // indirect
zgo.at/runewidth v0.1.0 // indirect
)
80 changes: 39 additions & 41 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions types.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ package goatcounter
import (
"database/sql/driver"
"fmt"
"slices"
"strings"

"zgo.at/zstd/zfloat"
"zgo.at/zstd/zint"
"zgo.at/zstd/zstring"
)

// Ints stores a slice of []int64 as a comma-separated string.
Expand Down Expand Up @@ -63,7 +63,7 @@ type Strings []string

func (l Strings) String() string { return strings.Join(l, ", ") }
func (l Strings) Value() (driver.Value, error) {
return strings.Join(zstring.Filter(l, zstring.FilterEmpty), ","), nil
return strings.Join(slices.DeleteFunc(l, func(s string) bool { return s == "" }), ","), nil
}
func (l *Strings) UnmarshalText(v []byte) error { return l.Scan(v) }

Expand Down

0 comments on commit 224cc1f

Please sign in to comment.