From 0abd53ec942b951dd777dafb4d27d86e76073f06 Mon Sep 17 00:00:00 2001 From: Jannis Mattheis Date: Fri, 17 Mar 2023 09:21:58 +0100 Subject: [PATCH 1/5] Fix linting --- .github/workflows/build.yml | 4 ++-- .golangci.yml | 21 ++++----------------- auth/auth.go | 6 ++---- cmd/serve.go | 4 ---- config/config.go | 15 ++++++++++----- config/mode/mode.go | 4 ++-- logger/logger.go | 2 +- router/router.go | 5 ++--- server/server.go | 15 ++++++++------- turn/none.go | 2 +- turn/server.go | 8 ++++---- util/sillyname.go | 9 +++++---- ws/client.go | 12 ++++++------ ws/event_clientanswer.go | 1 + ws/event_clientice.go | 1 + ws/event_create.go | 3 +-- ws/event_disconnected.go | 4 ++-- ws/event_hostice.go | 1 + ws/event_hostoffer.go | 1 + ws/event_join.go | 4 +--- ws/event_share.go | 3 +-- ws/event_stop_share.go | 3 +-- ws/room.go | 1 - ws/rooms.go | 15 +++++++++++---- 24 files changed, 68 insertions(+), 76 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0a646561..6bf908ce 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,9 +28,9 @@ jobs: - run: (cd ui && yarn) - run: (cd ui && yarn build) - run: (cd ui && yarn testformat) - - uses: golangci/golangci-lint-action@v2 + - uses: golangci/golangci-lint-action@v3 with: - version: v1.50.1 + version: v1.51.1 - run: go build ./... - run: go test -race ./... - if: startsWith(github.ref, 'refs/tags/v') diff --git a/.golangci.yml b/.golangci.yml index 0f54208c..fcf2e5f4 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,46 +1,35 @@ -inters: +linters: enable: - asciicheck - bodyclose - - deadcode - depguard - dogsled - - dupl - errcheck - exhaustive - exportloopref - - gci - - gocritic - godot - - goerr113 - gofmt - gofumpt - goimports - - golint - gomodguard - goprintffuncname - - gosec - gosimple - govet - ineffassign - - interfacer - misspell - nakedret - nolintlint - - prealloc - - rowserrcheck - - scopelint - sqlclosecheck - staticcheck - - structcheck - stylecheck - typecheck - - unconvert - unparam - unused - - varcheck - whitespace disable: + - dupl + - gocritic + - goerr113 - funlen - gochecknoglobals - gocognit @@ -59,7 +48,5 @@ inters: linters-settings: gofumpt: extra-rules: true - goimports: - local-prefixes: github.com/screego/server misspell: locale: US diff --git a/auth/auth.go b/auth/auth.go index c38664c2..c0044fd5 100644 --- a/auth/auth.go +++ b/auth/auth.go @@ -8,9 +8,8 @@ import ( "net/http" "os" - "github.com/rs/zerolog/log" - "github.com/gorilla/sessions" + "github.com/rs/zerolog/log" "golang.org/x/crypto/bcrypt" ) @@ -32,7 +31,6 @@ func read(r io.Reader) ([]UserPW, error) { reader.TrimLeadingSpace = true records, err := reader.ReadAll() - if err != nil { return nil, err } @@ -130,7 +128,7 @@ func (u *Users) Authenticate(w http.ResponseWriter, r *http.Request) { }) } -func (u Users) Validate(user string, password string) bool { +func (u Users) Validate(user, password string) bool { realPassword, exists := u.Lookup[user] return exists && bcrypt.CompareHashAndPassword([]byte(realPassword), []byte(password)) == nil } diff --git a/cmd/serve.go b/cmd/serve.go index 2ab36fd8..ba133df2 100644 --- a/cmd/serve.go +++ b/cmd/serve.go @@ -1,9 +1,7 @@ package cmd import ( - mrand "math/rand" "os" - "time" "github.com/rs/zerolog" "github.com/rs/zerolog/log" @@ -21,8 +19,6 @@ func serveCmd(version string) cli.Command { return cli.Command{ Name: "serve", Action: func(ctx *cli.Context) { - - mrand.Seed(time.Now().Unix()) conf, errs := config.Get() logger.Init(conf.LogLevel.AsZeroLogLevel()) diff --git a/config/config.go b/config/config.go index ead1229e..29bf1cfe 100644 --- a/config/config.go +++ b/config/config.go @@ -112,14 +112,16 @@ func Get() (Config, []FutureLog) { } else { logs = append(logs, FutureLog{ Level: zerolog.DebugLevel, - Msg: fmt.Sprintf("Loading file %s", file)}) + Msg: fmt.Sprintf("Loading file %s", file), + }) } } else if os.IsNotExist(fileErr) { continue } else { logs = append(logs, FutureLog{ Level: zerolog.WarnLevel, - Msg: fmt.Sprintf("cannot read file %s because %s", file, fileErr)}) + Msg: fmt.Sprintf("cannot read file %s because %s", file, fileErr), + }) } } @@ -171,7 +173,8 @@ func Get() (Config, []FutureLog) { if _, err := rand.Read(config.Secret); err == nil { logs = append(logs, FutureLog{ Level: zerolog.InfoLevel, - Msg: "SCREEGO_SECRET unset, user logins will be invalidated on restart"}) + Msg: "SCREEGO_SECRET unset, user logins will be invalidated on restart", + }) } else { logs = append(logs, futureFatal(fmt.Sprintf("cannot create secret %s", err))) } @@ -212,7 +215,8 @@ func Get() (Config, []FutureLog) { } else if (max - min) < 40 { logs = append(logs, FutureLog{ Level: zerolog.WarnLevel, - Msg: "Less than 40 ports are available for turn. When using multiple TURN connections this may not be enough"}) + Msg: "Less than 40 ports are available for turn. When using multiple TURN connections this may not be enough", + }) } return config, logs @@ -277,7 +281,8 @@ func getExecutableDir() (string, *FutureLog) { if err != nil { return "", &FutureLog{ Level: zerolog.ErrorLevel, - Msg: "Could not get path of executable using working directory instead. " + err.Error()} + Msg: "Could not get path of executable using working directory instead. " + err.Error(), + } } return filepath.Dir(ex), nil } diff --git a/config/mode/mode.go b/config/mode/mode.go index 6a9204dc..fb166b2c 100644 --- a/config/mode/mode.go +++ b/config/mode/mode.go @@ -1,9 +1,9 @@ package mode const ( - // Dev for development mode + // Dev for development mode. Dev = "dev" - // Prod for production mode + // Prod for production mode. Prod = "prod" ) diff --git a/logger/logger.go b/logger/logger.go index 0674b13b..35fa0e7e 100644 --- a/logger/logger.go +++ b/logger/logger.go @@ -8,7 +8,7 @@ import ( "github.com/rs/zerolog/log" ) -// Init initializes the logger +// Init initializes the logger. func Init(lvl zerolog.Level) { log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stdout, TimeFormat: time.RFC3339}).Level(lvl) log.Debug().Msg("Logger initialized") diff --git a/router/router.go b/router/router.go index 6ab716f9..5b0d8758 100644 --- a/router/router.go +++ b/router/router.go @@ -2,13 +2,13 @@ package router import ( "encoding/json" - "github.com/rs/zerolog/hlog" "net/http" "time" "github.com/gorilla/handlers" "github.com/gorilla/mux" "github.com/prometheus/client_golang/prometheus/promhttp" + "github.com/rs/zerolog/hlog" "github.com/rs/zerolog/log" "github.com/screego/server/auth" "github.com/screego/server/config" @@ -68,13 +68,12 @@ func accessLogger(r *http.Request, status, size int, dur time.Duration) { func basicAuth(handler http.Handler, users *auth.Users) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { - user, pass, ok := r.BasicAuth() if !ok || !users.Validate(user, pass) { w.Header().Set("WWW-Authenticate", `Basic realm="screego"`) w.WriteHeader(401) - _, _ = w.Write([]byte("Unauthorised.\n")) + _, _ = w.Write([]byte("Unauthorized.\n")) return } diff --git a/server/server.go b/server/server.go index 0e13fb18..af4ce743 100644 --- a/server/server.go +++ b/server/server.go @@ -9,17 +9,18 @@ import ( "strings" "time" - "github.com/rs/zerolog/log" - "github.com/gorilla/mux" + "github.com/rs/zerolog/log" ) -var notifySignal = signal.Notify -var serverShutdown = func(server *http.Server, ctx context.Context) error { - return server.Shutdown(ctx) -} +var ( + notifySignal = signal.Notify + serverShutdown = func(server *http.Server, ctx context.Context) error { + return server.Shutdown(ctx) + } +) -// Start starts the http server +// Start starts the http server. func Start(mux *mux.Router, address, cert, key string) error { server, shutdown := startServer(mux, address, cert, key) shutdownOnInterruptSignal(server, 2*time.Second, shutdown) diff --git a/turn/none.go b/turn/none.go index 0b26a8bd..24a2ef9b 100644 --- a/turn/none.go +++ b/turn/none.go @@ -6,7 +6,7 @@ import ( "strconv" ) -type RelayAddressGeneratorNone struct {} +type RelayAddressGeneratorNone struct{} func (r *RelayAddressGeneratorNone) Validate() error { return nil diff --git a/turn/server.go b/turn/server.go index 534fc3a4..81861e2f 100644 --- a/turn/server.go +++ b/turn/server.go @@ -148,12 +148,12 @@ func (a *InternalServer) authenticate(username, realm string, addr net.Addr) ([] a.lock.RLock() defer a.lock.RUnlock() - var connectedIp net.IP + var connectedIP net.IP switch addr := addr.(type) { case *net.UDPAddr: - connectedIp = addr.IP + connectedIP = addr.IP case *net.TCPAddr: - connectedIp = addr.IP + connectedIP = addr.IP default: log.Error().Interface("type", fmt.Sprintf("%T", addr)).Msg("unknown addr type") return nil, false @@ -167,7 +167,7 @@ func (a *InternalServer) authenticate(username, realm string, addr net.Addr) ([] authIP := entry.addr - if a.strictAuth && !connectedIp.Equal(authIP) { + if a.strictAuth && !connectedIP.Equal(authIP) { log.Debug().Interface("allowedIp", addr.String()).Interface("connectingIp", entry.addr.String()).Msg("TURN strict auth check failed") return nil, false } diff --git a/util/sillyname.go b/util/sillyname.go index e22271dc..6790f84c 100644 --- a/util/sillyname.go +++ b/util/sillyname.go @@ -18,6 +18,7 @@ var adjectives = []string{ "optimistic", "patient", "pioneering", "polite", "powerful", "reliable", "resourceful", "sensible", "sincere", "thoughtful", "tough", "versatile", } + var animals = []string{ "Dog", "Puppy", "Turtle", "Rabbit", "Parrot", "Cat", "Kitten", "Goldfish", "Mouse", "Hamster", "Fish", "Cow", "Rabbit", "Duck", "Shrimp", "Pig", @@ -28,10 +29,10 @@ var animals = []string{ "Coyote", "Hedgehong", "Sheep", "Deer", } -func r(l []string) string { - return l[rand.Intn(len(l)-1)] +func r(r *rand.Rand, l []string) string { + return l[r.Intn(len(l)-1)] } -func NewName() string { - return cases.Title(language.English).String(r(adjectives) + " " + r(animals)) +func NewName(s *rand.Rand) string { + return cases.Title(language.English).String(r(s, adjectives) + " " + r(s, animals)) } diff --git a/ws/client.go b/ws/client.go index 7c275d9b..765de92b 100644 --- a/ws/client.go +++ b/ws/client.go @@ -2,15 +2,16 @@ package ws import ( "fmt" + "net" + "net/http" + "strings" + "time" + "github.com/gorilla/websocket" "github.com/rs/xid" "github.com/rs/zerolog" "github.com/rs/zerolog/log" "github.com/screego/server/ws/outgoing" - "net" - "net/http" - "strings" - "time" ) var ping = func(conn *websocket.Conn) error { @@ -48,7 +49,6 @@ type ClientInfo struct { } func newClient(conn *websocket.Conn, req *http.Request, read chan ClientMessage, authenticatedUser string, authenticated, trustProxy bool) *Client { - ip := conn.RemoteAddr().(*net.TCPAddr).IP if realIP := req.Header.Get("X-Real-IP"); trustProxy && realIP != "" { ip = net.ParseIP(realIP) @@ -122,7 +122,7 @@ func (c *Client) startReading(pongWait time.Duration) { // startWriteHandler starts the write loop. The method has the following tasks: // * ping the client in the interval provided as parameter // * write messages send by the channel to the client -// * on errors exit the loop +// * on errors exit the loop. func (c *Client) startWriteHandler(pingPeriod time.Duration) { pingTicker := time.NewTicker(pingPeriod) diff --git a/ws/event_clientanswer.go b/ws/event_clientanswer.go index 52b727fe..eb4ad558 100644 --- a/ws/event_clientanswer.go +++ b/ws/event_clientanswer.go @@ -2,6 +2,7 @@ package ws import ( "fmt" + "github.com/rs/zerolog/log" "github.com/screego/server/ws/outgoing" ) diff --git a/ws/event_clientice.go b/ws/event_clientice.go index 29a4edd8..9701ee96 100644 --- a/ws/event_clientice.go +++ b/ws/event_clientice.go @@ -2,6 +2,7 @@ package ws import ( "fmt" + "github.com/rs/zerolog/log" "github.com/screego/server/ws/outgoing" ) diff --git a/ws/event_create.go b/ws/event_create.go index 45c350d6..2a280780 100644 --- a/ws/event_create.go +++ b/ws/event_create.go @@ -6,7 +6,6 @@ import ( "github.com/rs/xid" "github.com/screego/server/config" - "github.com/screego/server/util" ) func init() { @@ -42,7 +41,7 @@ func (e *Create) Execute(rooms *Rooms, current ClientInfo) error { name = current.AuthenticatedUser } if name == "" { - name = util.NewName() + name = rooms.RandUserName() } switch rooms.config.AuthMode { diff --git a/ws/event_disconnected.go b/ws/event_disconnected.go index 89d49e7b..f4488671 100644 --- a/ws/event_disconnected.go +++ b/ws/event_disconnected.go @@ -2,11 +2,11 @@ package ws import ( "bytes" + "github.com/screego/server/ws/outgoing" ) -type Disconnected struct { -} +type Disconnected struct{} func (e *Disconnected) Execute(rooms *Rooms, current ClientInfo) error { if current.RoomID == "" { diff --git a/ws/event_hostice.go b/ws/event_hostice.go index 67d748bc..2b5a84e6 100644 --- a/ws/event_hostice.go +++ b/ws/event_hostice.go @@ -2,6 +2,7 @@ package ws import ( "fmt" + "github.com/rs/zerolog/log" "github.com/screego/server/ws/outgoing" ) diff --git a/ws/event_hostoffer.go b/ws/event_hostoffer.go index ad102673..658a5fed 100644 --- a/ws/event_hostoffer.go +++ b/ws/event_hostoffer.go @@ -2,6 +2,7 @@ package ws import ( "fmt" + "github.com/rs/zerolog/log" "github.com/screego/server/ws/outgoing" ) diff --git a/ws/event_join.go b/ws/event_join.go index 17e24035..90bd0038 100644 --- a/ws/event_join.go +++ b/ws/event_join.go @@ -2,8 +2,6 @@ package ws import ( "fmt" - - "github.com/screego/server/util" ) func init() { @@ -31,7 +29,7 @@ func (e *Join) Execute(rooms *Rooms, current ClientInfo) error { name = current.AuthenticatedUser } if name == "" { - name = util.NewName() + name = rooms.RandUserName() } room.Users[current.ID] = &User{ diff --git a/ws/event_share.go b/ws/event_share.go index 88067b69..475465a0 100644 --- a/ws/event_share.go +++ b/ws/event_share.go @@ -10,8 +10,7 @@ func init() { }) } -type StartShare struct { -} +type StartShare struct{} func (e *StartShare) Execute(rooms *Rooms, current ClientInfo) error { if current.RoomID == "" { diff --git a/ws/event_stop_share.go b/ws/event_stop_share.go index ddf346b7..81c809b8 100644 --- a/ws/event_stop_share.go +++ b/ws/event_stop_share.go @@ -13,8 +13,7 @@ func init() { }) } -type StopShare struct { -} +type StopShare struct{} func (e *StopShare) Execute(rooms *Rooms, current ClientInfo) error { if current.RoomID == "" { diff --git a/ws/room.go b/ws/room.go index 034be7dc..3ca9ff02 100644 --- a/ws/room.go +++ b/ws/room.go @@ -59,7 +59,6 @@ func (r *Room) newSession(host, client xid.ID, rooms *Rooms) { Credential: clientPW, Username: clientName, }} - } r.Users[host].Write <- outgoing.HostSession{Peer: client, ID: id, ICEServers: iceHost} r.Users[client].Write <- outgoing.ClientSession{Peer: host, ID: id, ICEServers: iceClient} diff --git a/ws/rooms.go b/ws/rooms.go index 397949b2..1dec306e 100644 --- a/ws/rooms.go +++ b/ws/rooms.go @@ -2,6 +2,7 @@ package ws import ( "fmt" + "math/rand" "net/http" "net/url" "time" @@ -11,6 +12,7 @@ import ( "github.com/screego/server/auth" "github.com/screego/server/config" "github.com/screego/server/turn" + "github.com/screego/server/util" ) func NewRooms(tServer turn.Server, users *auth.Users, conf config.Config) *Rooms { @@ -20,6 +22,7 @@ func NewRooms(tServer turn.Server, users *auth.Users, conf config.Config) *Rooms turnServer: tServer, users: users, config: conf, + r: rand.New(rand.NewSource(time.Now().Unix())), upgrader: websocket.Upgrader{ ReadBufferSize: 1024, WriteBufferSize: 1024, @@ -45,11 +48,15 @@ type Rooms struct { upgrader websocket.Upgrader users *auth.Users config config.Config + r *rand.Rand +} + +func (r *Rooms) RandUserName() string { + return util.NewName(r.r) } func (r *Rooms) Upgrade(w http.ResponseWriter, req *http.Request) { conn, err := r.upgrader.Upgrade(w, req, nil) - if err != nil { log.Debug().Err(err).Msg("Websocket upgrade") w.WriteHeader(400) @@ -73,8 +80,8 @@ func (r *Rooms) Start() { } } -func (r *Rooms) closeRoom(roomId string) { - room, ok := r.Rooms[roomId] +func (r *Rooms) closeRoom(roomID string) { + room, ok := r.Rooms[roomID] if !ok { return } @@ -83,6 +90,6 @@ func (r *Rooms) closeRoom(roomId string) { room.closeSession(r, id) } - delete(r.Rooms, roomId) + delete(r.Rooms, roomID) roomsClosedTotal.Inc() } From 3881fbbc4c9babea431d707d9f35fd9690f27563 Mon Sep 17 00:00:00 2001 From: Jannis Mattheis Date: Fri, 17 Mar 2023 09:41:27 +0100 Subject: [PATCH 2/5] Update workflow --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6bf908ce..0e3fe29d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,7 +7,7 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: 1.19.x + go-version: 1.20.x - uses: actions/setup-node@v3 with: node-version: '16' @@ -39,7 +39,7 @@ jobs: DOCKER_USER: ${{ secrets.DOCKER_USER }} DOCKER_PASS: ${{ secrets.DOCKER_PASS }} - if: startsWith(github.ref, 'refs/tags/v') - uses: goreleaser/goreleaser-action@v2 + uses: goreleaser/goreleaser-action@v4 with: version: latest args: release From e62933364f0ef581409965cfd7210ad1a8e7b49f Mon Sep 17 00:00:00 2001 From: Jannis Mattheis Date: Fri, 17 Mar 2023 10:03:28 +0100 Subject: [PATCH 3/5] Fix multiarch docker images --- .github/workflows/build.yml | 5 --- .goreleaser.yml | 76 +++++++++++++++++++++++++++---------- Makefile | 25 ------------ 3 files changed, 57 insertions(+), 49 deletions(-) delete mode 100644 Makefile diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0e3fe29d..d63462d5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,8 +45,3 @@ jobs: args: release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - if: startsWith(github.ref, 'refs/tags/v') - run: make VERSION=${GITHUB_REF/refs\/tags\/v/} docker-manifest-annotate docker-manifest-push - env: - DOCKER_USER: ${{ secrets.DOCKER_USER }} - DOCKER_PASS: ${{ secrets.DOCKER_PASS }} diff --git a/.goreleaser.yml b/.goreleaser.yml index 263f885d..f1a09d33 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -14,23 +14,23 @@ builds: - freebsd - openbsd goarch: - - 386 + - "386" - amd64 - arm - arm64 - ppc64 - ppc64le goarm: - - 6 - - 7 + - "6" + - "7" flags: - '-tags="netgo osusergo"' ldflags: - - '-s' - - '-w' - - '-X main.version={{.Version}}' - - '-X main.commitHash={{.Commit}}' - - '-X main.mode=prod' + - "-s" + - "-w" + - "-X main.version={{.Version}}" + - "-X main.commitHash={{.Commit}}" + - "-X main.mode=prod" archives: - files: - LICENSE @@ -42,49 +42,57 @@ archives: - goos: windows format: zip checksum: + disable: true changelog: skip: true dockers: - - goos: linux + - use: docker + goos: linux goarch: amd64 - goarm: '' + goarm: "" image_templates: - "screego/server:amd64-unstable" - "screego/server:amd64-{{ .RawVersion }}" - "screego/server:amd64-{{ .Major }}" dockerfile: Dockerfile build_flag_templates: + - "--platform=linux/amd64" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}" - "--label=org.opencontainers.image.revision={{.FullCommit}}" - "--label=org.opencontainers.image.version={{.Version}}" - - goos: linux - goarch: 386 - goarm: '' + - use: docker + goos: linux + goarch: "386" + goarm: "" image_templates: - "screego/server:386-unstable" - "screego/server:386-{{ .RawVersion }}" - "screego/server:386-{{ .Major }}" dockerfile: Dockerfile build_flag_templates: + - "--platform=linux/386" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}" - "--label=org.opencontainers.image.revision={{.FullCommit}}" - "--label=org.opencontainers.image.version={{.Version}}" - - goos: linux + - use: docker + goos: linux goarch: arm64 - goarm: '' + goarm: "" image_templates: - "screego/server:arm64-unstable" - "screego/server:arm64-{{ .RawVersion }}" - "screego/server:arm64-{{ .Major }}" dockerfile: Dockerfile build_flag_templates: + - "--platform=linux/arm64" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}" - "--label=org.opencontainers.image.revision={{.FullCommit}}" - "--label=org.opencontainers.image.version={{.Version}}" - - goos: linux + - use: docker + goos: linux goarch: arm goarm: 7 image_templates: @@ -93,11 +101,13 @@ dockers: - "screego/server:armv7-{{ .Major }}" dockerfile: Dockerfile build_flag_templates: + - "--platform=linux/arm/v7" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}" - "--label=org.opencontainers.image.revision={{.FullCommit}}" - "--label=org.opencontainers.image.version={{.Version}}" - - goos: linux + - use: docker + goos: linux goarch: arm goarm: 6 image_templates: @@ -106,20 +116,48 @@ dockers: - "screego/server:armv6-{{ .Major }}" dockerfile: Dockerfile build_flag_templates: + - "--platform=linux/arm/v6" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}" - "--label=org.opencontainers.image.revision={{.FullCommit}}" - "--label=org.opencontainers.image.version={{.Version}}" - - goos: linux + - use: docker + goos: linux goarch: ppc64le - goarm: '' + goarm: "" image_templates: - "screego/server:ppc64le-unstable" - "screego/server:ppc64le-{{ .RawVersion }}" - "screego/server:ppc64le-{{ .Major }}" dockerfile: Dockerfile build_flag_templates: + - "--platform=linux/ppc64le" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}" - "--label=org.opencontainers.image.revision={{.FullCommit}}" - "--label=org.opencontainers.image.version={{.Version}}" +docker_manifests: + - name_template: "screego/server:unstable" + image_templates: + - "screego/server:amd64-unstable" + - "screego/server:386-unstable" + - "screego/server:arm64-unstable" + - "screego/server:armv7-unstable" + - "screego/server:armv6-unstable" + - "screego/server:ppc64le-unstable" + - name_template: "screego/server:{{ .RawVersion }}" + image_templates: + - "screego/server:amd64-{{ .RawVersion }}" + - "screego/server:386-{{ .RawVersion }}" + - "screego/server:arm64-{{ .RawVersion }}" + - "screego/server:armv7-{{ .RawVersion }}" + - "screego/server:armv6-{{ .RawVersion }}" + - "screego/server:ppc64le-{{ .RawVersion }}" + - name_template: "screego/server:{{ .Major }}" + image_templates: + - "screego/server:amd64-{{ .Major }}" + - "screego/server:386-{{ .Major }}" + - "screego/server:arm64-{{ .Major }}" + - "screego/server:armv7-{{ .Major }}" + - "screego/server:armv6-{{ .Major }}" + - "screego/server:ppc64le-{{ .Major }}" diff --git a/Makefile b/Makefile deleted file mode 100644 index 8d94bbda..00000000 --- a/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -DOCKER_MANIFEST=DOCKER_CLI_EXPERIMENTAL=enabled docker manifest - -docker-login-ci: - docker login -u "$$DOCKER_USER" -p "$$DOCKER_PASS"; - -docker-manifest-annotate: - echo ${VERSION} - ${DOCKER_MANIFEST} create --amend "screego/server:unstable" "screego/server:amd64-unstable" "screego/server:386-unstable" "screego/server:armv7-unstable" "screego/server:arm64-unstable" "screego/server:ppc64le-unstable" - ${DOCKER_MANIFEST} create --amend "screego/server:${VERSION}" "screego/server:amd64-${VERSION}" "screego/server:386-${VERSION}" "screego/server:armv7-${VERSION}" "screego/server:arm64-${VERSION}" "screego/server:ppc64le-${VERSION}" - ${DOCKER_MANIFEST} annotate "screego/server:unstable" "screego/server:amd64-unstable" --os=linux --arch=amd64 - ${DOCKER_MANIFEST} annotate "screego/server:${VERSION}" "screego/server:amd64-${VERSION}" --os=linux --arch=amd64 - ${DOCKER_MANIFEST} annotate "screego/server:unstable" "screego/server:386-unstable" --os=linux --arch=386 - ${DOCKER_MANIFEST} annotate "screego/server:${VERSION}" "screego/server:386-${VERSION}" --os=linux --arch=386 - ${DOCKER_MANIFEST} annotate "screego/server:unstable" "screego/server:armv7-unstable" --os=linux --arch=arm --variant=v7 - ${DOCKER_MANIFEST} annotate "screego/server:${VERSION}" "screego/server:armv7-${VERSION}" --os=linux --arch=arm --variant=v7 - ${DOCKER_MANIFEST} annotate "screego/server:unstable" "screego/server:arm64-unstable" --os=linux --arch=arm64 - ${DOCKER_MANIFEST} annotate "screego/server:${VERSION}" "screego/server:arm64-${VERSION}" --os=linux --arch=arm64 - ${DOCKER_MANIFEST} annotate "screego/server:unstable" "screego/server:ppc64le-unstable" --os=linux --arch=ppc64le - ${DOCKER_MANIFEST} annotate "screego/server:${VERSION}" "screego/server:ppc64le-${VERSION}" --os=linux --arch=ppc64le - - -docker-manifest-push: - ${DOCKER_MANIFEST} push "screego/server:${VERSION}" - ${DOCKER_MANIFEST} push "screego/server:unstable" - From f6cd0c68431e652575adaf372209b363483cffbf Mon Sep 17 00:00:00 2001 From: Jannis Mattheis Date: Fri, 17 Mar 2023 10:06:32 +0100 Subject: [PATCH 4/5] Add ghcr.io docker images --- .github/workflows/build.yml | 4 +++- .goreleaser.yml | 42 +++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d63462d5..ba2474ab 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,7 +34,9 @@ jobs: - run: go build ./... - run: go test -race ./... - if: startsWith(github.ref, 'refs/tags/v') - run: echo "$DOCKER_PASS" | docker login --username "$DOCKER_USER" --password-stdin + run: | + echo "$DOCKER_PASS" | docker login --username "$DOCKER_USER" --password-stdin + echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io --username "${{ github.actor }}" --password-stdin env: DOCKER_USER: ${{ secrets.DOCKER_USER }} DOCKER_PASS: ${{ secrets.DOCKER_PASS }} diff --git a/.goreleaser.yml b/.goreleaser.yml index f1a09d33..36d1664a 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -54,6 +54,9 @@ dockers: - "screego/server:amd64-unstable" - "screego/server:amd64-{{ .RawVersion }}" - "screego/server:amd64-{{ .Major }}" + - "ghcr.io/screego/server:amd64-unstable" + - "ghcr.io/screego/server:amd64-{{ .RawVersion }}" + - "ghcr.io/screego/server:amd64-{{ .Major }}" dockerfile: Dockerfile build_flag_templates: - "--platform=linux/amd64" @@ -69,6 +72,9 @@ dockers: - "screego/server:386-unstable" - "screego/server:386-{{ .RawVersion }}" - "screego/server:386-{{ .Major }}" + - "ghcr.io/screego/server:386-unstable" + - "ghcr.io/screego/server:386-{{ .RawVersion }}" + - "ghcr.io/screego/server:386-{{ .Major }}" dockerfile: Dockerfile build_flag_templates: - "--platform=linux/386" @@ -84,6 +90,9 @@ dockers: - "screego/server:arm64-unstable" - "screego/server:arm64-{{ .RawVersion }}" - "screego/server:arm64-{{ .Major }}" + - "ghcr.io/screego/server:arm64-unstable" + - "ghcr.io/screego/server:arm64-{{ .RawVersion }}" + - "ghcr.io/screego/server:arm64-{{ .Major }}" dockerfile: Dockerfile build_flag_templates: - "--platform=linux/arm64" @@ -99,6 +108,9 @@ dockers: - "screego/server:armv7-unstable" - "screego/server:armv7-{{ .RawVersion }}" - "screego/server:armv7-{{ .Major }}" + - "ghcr.io/screego/server:armv7-unstable" + - "ghcr.io/screego/server:armv7-{{ .RawVersion }}" + - "ghcr.io/screego/server:armv7-{{ .Major }}" dockerfile: Dockerfile build_flag_templates: - "--platform=linux/arm/v7" @@ -114,6 +126,9 @@ dockers: - "screego/server:armv6-unstable" - "screego/server:armv6-{{ .RawVersion }}" - "screego/server:armv6-{{ .Major }}" + - "ghcr.io/screego/server:armv6-unstable" + - "ghcr.io/screego/server:armv6-{{ .RawVersion }}" + - "ghcr.io/screego/server:armv6-{{ .Major }}" dockerfile: Dockerfile build_flag_templates: - "--platform=linux/arm/v6" @@ -129,6 +144,9 @@ dockers: - "screego/server:ppc64le-unstable" - "screego/server:ppc64le-{{ .RawVersion }}" - "screego/server:ppc64le-{{ .Major }}" + - "ghcr.io/screego/server:ppc64le-unstable" + - "ghcr.io/screego/server:ppc64le-{{ .RawVersion }}" + - "ghcr.io/screego/server:ppc64le-{{ .Major }}" dockerfile: Dockerfile build_flag_templates: - "--platform=linux/ppc64le" @@ -137,6 +155,14 @@ dockers: - "--label=org.opencontainers.image.revision={{.FullCommit}}" - "--label=org.opencontainers.image.version={{.Version}}" docker_manifests: + - name_template: "ghcr.io/screego/server:unstable" + image_templates: + - "ghcr.io/screego/server:amd64-unstable" + - "ghcr.io/screego/server:386-unstable" + - "ghcr.io/screego/server:arm64-unstable" + - "ghcr.io/screego/server:armv7-unstable" + - "ghcr.io/screego/server:armv6-unstable" + - "ghcr.io/screego/server:ppc64le-unstable" - name_template: "screego/server:unstable" image_templates: - "screego/server:amd64-unstable" @@ -153,6 +179,14 @@ docker_manifests: - "screego/server:armv7-{{ .RawVersion }}" - "screego/server:armv6-{{ .RawVersion }}" - "screego/server:ppc64le-{{ .RawVersion }}" + - name_template: "ghcr.io/screego/server:{{ .RawVersion }}" + image_templates: + - "ghcr.io/screego/server:amd64-{{ .RawVersion }}" + - "ghcr.io/screego/server:386-{{ .RawVersion }}" + - "ghcr.io/screego/server:arm64-{{ .RawVersion }}" + - "ghcr.io/screego/server:armv7-{{ .RawVersion }}" + - "ghcr.io/screego/server:armv6-{{ .RawVersion }}" + - "ghcr.io/screego/server:ppc64le-{{ .RawVersion }}" - name_template: "screego/server:{{ .Major }}" image_templates: - "screego/server:amd64-{{ .Major }}" @@ -161,3 +195,11 @@ docker_manifests: - "screego/server:armv7-{{ .Major }}" - "screego/server:armv6-{{ .Major }}" - "screego/server:ppc64le-{{ .Major }}" + - name_template: "ghcr.io/screego/server:{{ .Major }}" + image_templates: + - "ghcr.io/screego/server:amd64-{{ .Major }}" + - "ghcr.io/screego/server:386-{{ .Major }}" + - "ghcr.io/screego/server:arm64-{{ .Major }}" + - "ghcr.io/screego/server:armv7-{{ .Major }}" + - "ghcr.io/screego/server:armv6-{{ .Major }}" + - "ghcr.io/screego/server:ppc64le-{{ .Major }}" From d4ded438d5ad2dad9b292aee28b659918394ec89 Mon Sep 17 00:00:00 2001 From: Jannis Mattheis Date: Fri, 17 Mar 2023 10:15:18 +0100 Subject: [PATCH 5/5] Update backend deps --- go.mod | 28 ++++++++++++------------ go.sum | 68 ++++++++++++++++++++++++++++++++++------------------------ 2 files changed, 54 insertions(+), 42 deletions(-) diff --git a/go.mod b/go.mod index 85910ce6..6c86abad 100644 --- a/go.mod +++ b/go.mod @@ -7,23 +7,24 @@ require ( github.com/gorilla/mux v1.8.0 github.com/gorilla/sessions v1.2.1 github.com/gorilla/websocket v1.5.0 - github.com/joho/godotenv v1.4.0 + github.com/joho/godotenv v1.5.1 github.com/kelseyhightower/envconfig v1.4.0 github.com/pion/randutil v0.1.0 - github.com/pion/turn/v2 v2.0.8 - github.com/prometheus/client_golang v1.13.0 + github.com/pion/turn/v2 v2.1.0 + github.com/prometheus/client_golang v1.14.0 github.com/rs/xid v1.4.0 - github.com/rs/zerolog v1.28.0 - github.com/stretchr/testify v1.8.1 - github.com/urfave/cli v1.22.10 - golang.org/x/crypto v0.1.0 - golang.org/x/term v0.1.0 + github.com/rs/zerolog v1.29.0 + github.com/stretchr/testify v1.8.2 + github.com/urfave/cli v1.22.12 + golang.org/x/crypto v0.7.0 + golang.org/x/term v0.6.0 + golang.org/x/text v0.8.0 ) require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect - github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect + github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/felixge/httpsnoop v1.0.2 // indirect github.com/golang/protobuf v1.5.2 // indirect @@ -33,15 +34,14 @@ require ( github.com/mattn/go-isatty v0.0.14 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect github.com/pion/logging v0.2.2 // indirect - github.com/pion/stun v0.3.5 // indirect - github.com/pion/transport v0.13.0 // indirect + github.com/pion/stun v0.4.0 // indirect + github.com/pion/transport/v2 v2.0.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_model v0.2.0 // indirect + github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common v0.37.0 // indirect github.com/prometheus/procfs v0.8.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect - golang.org/x/sys v0.1.0 // indirect - golang.org/x/text v0.4.0 // indirect + golang.org/x/sys v0.6.0 // indirect google.golang.org/protobuf v1.28.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 73054a77..8cb3a65d 100644 --- a/go.sum +++ b/go.sum @@ -32,6 +32,7 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -52,9 +53,8 @@ github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMn github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.1 h1:r/myEWzV9lfsM1tFLgDyu0atFtJ1fXn261LKYj/3DxU= -github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -145,8 +145,8 @@ github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/joho/godotenv v1.4.0 h1:3l4+N6zfMWnkbPEXKng2o2/MR5mSwTrBih4ZEkkz1lg= -github.com/joho/godotenv v1.4.0/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= +github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= +github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -185,12 +185,12 @@ github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY= github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms= github.com/pion/randutil v0.1.0 h1:CFG1UdESneORglEsnimhUjf33Rwjubwj6xfiOXBa3mA= github.com/pion/randutil v0.1.0/go.mod h1:XcJrSMMbbMRhASFVOlj/5hQial/Y8oH/HVo7TBZq+j8= -github.com/pion/stun v0.3.5 h1:uLUCBCkQby4S1cf6CGuR9QrVOKcvUwFeemaC865QHDg= -github.com/pion/stun v0.3.5/go.mod h1:gDMim+47EeEtfWogA37n6qXZS88L5V6LqFcf+DZA2UA= -github.com/pion/transport v0.13.0 h1:KWTA5ZrQogizzYwPEciGtHPLwpAjE91FgXnyu+Hv2uY= -github.com/pion/transport v0.13.0/go.mod h1:yxm9uXpK9bpBBWkITk13cLo1y5/ur5VQpG22ny6EP7g= -github.com/pion/turn/v2 v2.0.8 h1:KEstL92OUN3k5k8qxsXHpr7WWfrdp7iJZHx99ud8muw= -github.com/pion/turn/v2 v2.0.8/go.mod h1:+y7xl719J8bAEVpSXBXvTxStjJv3hbz9YFflvkpcGPw= +github.com/pion/stun v0.4.0 h1:vgRrbBE2htWHy7l3Zsxckk7rkjnjOsSM7PHZnBwo8rk= +github.com/pion/stun v0.4.0/go.mod h1:QPsh1/SbXASntw3zkkrIk3ZJVKz4saBY2G7S10P3wCw= +github.com/pion/transport/v2 v2.0.0 h1:bsMYyqHCbkvHwj+eNCFBuxtlKndKfyGI2vaQmM3fIE4= +github.com/pion/transport/v2 v2.0.0/go.mod h1:HS2MEBJTwD+1ZI2eSXSvHJx/HnzQqRy2/LXxt6eVMHc= +github.com/pion/turn/v2 v2.1.0 h1:5wGHSgGhJhP/RpabkUb/T9PdsAjkGLS6toYz5HNzoSI= +github.com/pion/turn/v2 v2.1.0/go.mod h1:yrT5XbXSGX1VFSF31A3c1kCNB5bBZgk/uu5LET162qs= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -201,13 +201,14 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.13.0 h1:b71QUfeo5M8gq2+evJdTPfZhYMAU0uKPkyPJ7TPsloU= -github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= +github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= +github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= +github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= @@ -224,12 +225,10 @@ github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0ua github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rs/xid v1.4.0 h1:qd7wPTDkN6KQx2VmMBLrpHkiyQwgFXRnkOLacUiaSNY= github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.28.0 h1:MirSo27VyNi7RJYP3078AA1+Cyzd2GB66qy3aUHvsWY= -github.com/rs/zerolog v1.28.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/rs/zerolog v1.29.0 h1:Zes4hju04hjbvkVkOhdl2HpZa+0PmVwigmo8XoORE5w= +github.com/rs/zerolog v1.29.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= @@ -240,16 +239,17 @@ github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpE github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/urfave/cli v1.22.10 h1:p8Fspmz3iTctJstry1PYS3HVdllxnEzTEsgIgtxTrCk= -github.com/urfave/cli v1.22.10/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/urfave/cli v1.22.12 h1:igJgVw1JdKH+trcLWLeLwZjU9fEfPesQ+9/e4MQ44S8= +github.com/urfave/cli v1.22.12/go.mod h1:sSBEIC79qR6OvcmsD4U3KABeOTxDqQtdDnaFuUN30b8= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -261,8 +261,9 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU= -golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -293,6 +294,7 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -321,10 +323,12 @@ golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211201190559-0a0e4e1bb54c/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -341,6 +345,7 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -381,12 +386,17 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.1.0 h1:g6Z6vPFA9dYBAF7DWcH6sCcOntplXsDKcliusYijMlw= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw= +golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -394,8 +404,9 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -439,6 +450,7 @@ golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=