Add login support, golangci-lint config
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
"github.com/rs/zerolog"
|
||||
"gitlab.com/pztrn/flagger"
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
@@ -95,3 +96,7 @@ func (c *Context) SaveConfig() {
|
||||
dlog.Fatal().Err(err).Msg("Failed to encode config")
|
||||
}
|
||||
}
|
||||
|
||||
func (c *Context) SetCookies(cookies []*http.Cookie) {
|
||||
c.Cookies = append(c.Cookies, cookies...)
|
||||
}
|
||||
|
@@ -8,6 +8,7 @@ import (
|
||||
"github.com/rs/zerolog"
|
||||
"gitlab.com/fat0troll/uploader_tools/internal/config"
|
||||
"gitlab.com/pztrn/flagger"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -21,6 +22,7 @@ type Context struct {
|
||||
Config config.Config
|
||||
Flagger *flagger.Flagger
|
||||
Logger zerolog.Logger
|
||||
Cookies []*http.Cookie
|
||||
}
|
||||
|
||||
// New creates new Context
|
||||
|
Reference in New Issue
Block a user