mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-01 06:33:18 +02:00
refactor: move some io, http and string utils to separate repo
This commit is contained in:
@@ -5,7 +5,7 @@ import (
|
||||
"iter"
|
||||
"strconv"
|
||||
|
||||
"github.com/yusing/godoxy/internal/utils/strutils"
|
||||
strutils "github.com/yusing/goutils/strings"
|
||||
)
|
||||
|
||||
type watcherDebug struct {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
api "github.com/yusing/godoxy/internal/api/v1"
|
||||
gphttp "github.com/yusing/godoxy/internal/net/gphttp"
|
||||
"github.com/yusing/godoxy/internal/net/gphttp/httpheaders"
|
||||
"github.com/yusing/goutils/http/httpheaders"
|
||||
)
|
||||
|
||||
type ForceCacheControl struct {
|
||||
@@ -107,7 +107,8 @@ func (w *Watcher) wakeFromHTTP(rw http.ResponseWriter, r *http.Request) (shouldN
|
||||
w.l.Trace().Msg("signal received")
|
||||
err := w.Wake(ctx)
|
||||
if err != nil {
|
||||
gphttp.ServerError(rw, r, err)
|
||||
http.Error(rw, "Internal Server Error", http.StatusInternalServerError)
|
||||
gphttp.LogError(r).Msg(fmt.Sprintf("failed to wake: %v", err))
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
_ "embed"
|
||||
"text/template"
|
||||
|
||||
"github.com/yusing/godoxy/internal/net/gphttp/httpheaders"
|
||||
"github.com/yusing/goutils/http/httpheaders"
|
||||
)
|
||||
|
||||
type templateData struct {
|
||||
|
||||
@@ -15,7 +15,6 @@ import (
|
||||
"github.com/yusing/godoxy/internal/gperr"
|
||||
"github.com/yusing/godoxy/internal/idlewatcher/provider"
|
||||
idlewatcher "github.com/yusing/godoxy/internal/idlewatcher/types"
|
||||
"github.com/yusing/godoxy/internal/net/gphttp/reverseproxy"
|
||||
nettypes "github.com/yusing/godoxy/internal/net/types"
|
||||
"github.com/yusing/godoxy/internal/route/routes"
|
||||
"github.com/yusing/godoxy/internal/task"
|
||||
@@ -24,6 +23,7 @@ import (
|
||||
"github.com/yusing/godoxy/internal/utils/atomic"
|
||||
"github.com/yusing/godoxy/internal/watcher/events"
|
||||
"github.com/yusing/godoxy/internal/watcher/health/monitor"
|
||||
"github.com/yusing/goutils/http/reverseproxy"
|
||||
"golang.org/x/sync/errgroup"
|
||||
"golang.org/x/sync/singleflight"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user