1

Add login support, golangci-lint config

This commit is contained in:
2019-09-14 18:55:39 +04:00
parent afc2a73ed6
commit c1c969db2e
7 changed files with 178 additions and 0 deletions

View File

@@ -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...)
}

View File

@@ -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