From f1311a3d26604be20df0efa9b9483277e10801e9 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Mon, 5 Dec 2022 14:07:58 -0800 Subject: [PATCH] Upgrade invoker. --- server/go.mod | 2 +- server/go.sum | 6 ++---- server/main.go | 26 ++------------------------ 3 files changed, 5 insertions(+), 29 deletions(-) diff --git a/server/go.mod b/server/go.mod index c1054d2..dcb38e7 100644 --- a/server/go.mod +++ b/server/go.mod @@ -4,7 +4,7 @@ go 1.18 require ( github.com/abema/go-mp4 v0.7.2 - github.com/kixelated/invoker v0.10.0 + github.com/kixelated/invoker v1.0.0 github.com/lucas-clemente/quic-go v0.30.0 github.com/marten-seemann/webtransport-go v0.2.0 github.com/zencoder/go-dash/v3 v3.0.2 diff --git a/server/go.sum b/server/go.sum index 0b7d22e..0e33684 100644 --- a/server/go.sum +++ b/server/go.sum @@ -66,10 +66,8 @@ github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCV github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/kisielk/errcheck v1.4.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kixelated/invoker v0.9.2 h1:Pz8JDiRs8EzGc4EGVMZ4RYvFh+iQLXGZ4PG2KZyAh/0= -github.com/kixelated/invoker v0.9.2/go.mod h1:RjG3iqm/sKwZjOpcW4SGq+l+4DJCDR/yUtc70VjCRB8= -github.com/kixelated/invoker v0.10.0 h1:M93MfnlR5OjKoQNcM2mvEVwKeA3wolxEeqShCkLbcUE= -github.com/kixelated/invoker v0.10.0/go.mod h1:RjG3iqm/sKwZjOpcW4SGq+l+4DJCDR/yUtc70VjCRB8= +github.com/kixelated/invoker v1.0.0 h1:0wYlvK39yQPbkwIFy+YN41AhF89WOtGyWqV2pZB39xw= +github.com/kixelated/invoker v1.0.0/go.mod h1:RjG3iqm/sKwZjOpcW4SGq+l+4DJCDR/yUtc70VjCRB8= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= diff --git a/server/main.go b/server/main.go index 340f223..39753ba 100644 --- a/server/main.go +++ b/server/main.go @@ -1,43 +1,21 @@ package main import ( - "bufio" "context" "crypto/tls" - "errors" "flag" "fmt" "log" - "os" - "strings" "github.com/kixelated/invoker" "github.com/kixelated/warp-demo/server/internal/warp" ) func main() { - invoker.Panic = true - err := run(context.Background()) - if err == nil { - return + if err != nil { + log.Fatal(err) } - - log.Println(err) - - var errPanic invoker.ErrPanic - - // TODO use an interface - if errors.As(err, &errPanic) { - stack := string(errPanic.Stack()) - - scanner := bufio.NewScanner(strings.NewReader(stack)) - for scanner.Scan() { - log.Println(scanner.Text()) - } - } - - os.Exit(1) } func run(ctx context.Context) (err error) {