Add api package
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2022-01-20 03:44:33 +01:00
parent faa3cc102f
commit e7c5a672ff
5 changed files with 21 additions and 17 deletions

View File

@@ -10,6 +10,7 @@ import (
"time"
"git.t-juice.club/torjus/gpaste"
"git.t-juice.club/torjus/gpaste/api"
"github.com/urfave/cli/v2"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
@@ -68,7 +69,7 @@ func ActionServe(c *cli.Context) error {
defer httpShutdownCancel()
go func() {
srv := gpaste.NewHTTPServer(cfg)
srv := api.NewHTTPServer(cfg)
srv.Addr = cfg.ListenAddr
srv.Logger = serverLogger
srv.AccessLogger = accessLogger