mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 15:09:42 +00:00
Bump golangci-lint, Docker and Go CI versions (#564)
* Bump golangci-lint and Go CI versions * Bump golangci-lint version * Address nitterinos
This commit is contained in:
@@ -26,7 +26,7 @@ environment:
|
||||
PSQL_SSLMODE: disable
|
||||
PSQL_SKIPSQLCMD: true
|
||||
PSQL_TESTDBNAME: gct_dev_ci
|
||||
stack: go 1.14.x
|
||||
stack: go 1.15.x
|
||||
|
||||
services:
|
||||
- postgresql96
|
||||
@@ -49,7 +49,7 @@ before_test:
|
||||
|
||||
test_script:
|
||||
# test back-end
|
||||
- go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.24.0
|
||||
- go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.31.0
|
||||
- '%GOPATH%\bin\golangci-lint.exe run --verbose'
|
||||
- ps: >-
|
||||
if($env:APPVEYOR_SCHEDULED_BUILD -eq 'true') {
|
||||
|
||||
@@ -23,22 +23,31 @@ linters:
|
||||
# - varcheck
|
||||
|
||||
# disabled by default linters
|
||||
- asciicheck
|
||||
- bodyclose
|
||||
- depguard
|
||||
- dogsled
|
||||
# - dupl
|
||||
# - exhaustive
|
||||
- exportloopref
|
||||
# - funlen
|
||||
- gci
|
||||
# - gochecknoglobals
|
||||
# - gochecknoinits
|
||||
# - gocognit
|
||||
- goconst
|
||||
- gocritic
|
||||
# - gocyclo
|
||||
# - godot
|
||||
# - godox
|
||||
# - goerr113
|
||||
- gofmt
|
||||
# - gofumpt
|
||||
- goheader
|
||||
- goimports
|
||||
- golint
|
||||
# - gomnd
|
||||
- gomodguard
|
||||
- goprintffuncname
|
||||
- gosec
|
||||
# - interfacer
|
||||
@@ -46,10 +55,16 @@ linters:
|
||||
# - maligned
|
||||
- misspell
|
||||
- nakedret
|
||||
# - nestif
|
||||
# - nlreturn
|
||||
# - noctx
|
||||
- nolintlint
|
||||
# - prealloc
|
||||
- rowserrcheck
|
||||
- scopelint
|
||||
- sqlclosecheck
|
||||
- stylecheck
|
||||
# - testpackage
|
||||
- unconvert
|
||||
- unparam
|
||||
- whitespace
|
||||
@@ -82,9 +97,6 @@ issues:
|
||||
max-same-issues: 0
|
||||
|
||||
exclude-rules:
|
||||
- text: "weak cryptographic primitive"
|
||||
linters:
|
||||
- gosec
|
||||
- text: "Expect WriteFile permissions to be 0600 or less"
|
||||
linters:
|
||||
- gosec
|
||||
@@ -18,7 +18,7 @@ matrix:
|
||||
dist: xenial
|
||||
name: 'GoCryptoTrader [back-end] [linux] [64-bit]'
|
||||
go:
|
||||
- 1.14.x
|
||||
- 1.15.x
|
||||
env:
|
||||
- GO111MODULE=on
|
||||
- PSQL_USER=postgres
|
||||
@@ -43,7 +43,7 @@ matrix:
|
||||
dist: xenial
|
||||
name: 'GoCryptoTrader [back-end] [linux] [32-bit]'
|
||||
go:
|
||||
- 1.14.x
|
||||
- 1.15.x
|
||||
env:
|
||||
- GO111MODULE=on
|
||||
- NO_RACE_TEST=1
|
||||
@@ -72,7 +72,7 @@ matrix:
|
||||
os: osx
|
||||
name: 'GoCryptoTrader [back-end] [darwin]'
|
||||
go:
|
||||
- 1.14.x
|
||||
- 1.15.x
|
||||
env:
|
||||
- GO111MODULE=on
|
||||
- PSQL_USER=postgres
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM golang:1.14 as build
|
||||
FROM golang:1.15 as build
|
||||
WORKDIR /go/src/github.com/thrasher-corp/gocryptotrader
|
||||
COPY . .
|
||||
RUN GO111MODULE=on go mod vendor
|
||||
|
||||
2
Makefile
2
Makefile
@@ -1,6 +1,6 @@
|
||||
LDFLAGS = -ldflags "-w -s"
|
||||
GCTPKG = github.com/thrasher-corp/gocryptotrader
|
||||
LINTPKG = github.com/golangci/golangci-lint/cmd/golangci-lint@v1.24.0
|
||||
LINTPKG = github.com/golangci/golangci-lint/cmd/golangci-lint@v1.31.0
|
||||
LINTBIN = $(GOPATH)/bin/golangci-lint
|
||||
GCTLISTENPORT=9050
|
||||
GCTPROFILERLISTENPORT=8085
|
||||
|
||||
@@ -77,7 +77,7 @@ func testWrappers(e exchange.IBotExchange) []string {
|
||||
if !e.SupportsAsset(assetType) {
|
||||
assets := e.GetAssetTypes()
|
||||
rand.Seed(time.Now().Unix())
|
||||
assetType = assets[rand.Intn(len(assets))]
|
||||
assetType = assets[rand.Intn(len(assets))] // nolint:gosec // basic number generation required, no need for crypo/rand
|
||||
}
|
||||
|
||||
var funcs []string
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
package crypto
|
||||
|
||||
// nolint:gosec // md5/sha1 hash functions used by some exchanges
|
||||
import (
|
||||
"crypto/hmac"
|
||||
"crypto/md5" // nolint // Used by some exchanges
|
||||
"crypto/md5"
|
||||
"crypto/rand"
|
||||
"crypto/sha1" // nolint // Used by some exchanges
|
||||
"crypto/sha1"
|
||||
"crypto/sha256"
|
||||
"crypto/sha512"
|
||||
"encoding/base64"
|
||||
@@ -62,7 +63,7 @@ func GetRandomSalt(input []byte, saltLen int) ([]byte, error) {
|
||||
|
||||
// GetMD5 returns a MD5 hash of a byte array
|
||||
func GetMD5(input []byte) []byte {
|
||||
m := md5.New() // nolint // Used by some exchanges
|
||||
m := md5.New() // nolint:gosec // hash function used by some exchanges
|
||||
m.Write(input)
|
||||
return m.Sum(nil)
|
||||
}
|
||||
@@ -107,7 +108,7 @@ func GetHMAC(hashType int, input, key []byte) []byte {
|
||||
// Sha1ToHex takes a string, sha1 hashes it and return a hex string of the
|
||||
// result
|
||||
func Sha1ToHex(data string) string {
|
||||
h := sha1.New() // nolint // Used by some exchanges
|
||||
h := sha1.New() // nolint:gosec // hash function used by some exchanges
|
||||
h.Write([]byte(data))
|
||||
return hex.EncodeToString(h.Sum(nil))
|
||||
}
|
||||
|
||||
@@ -116,21 +116,25 @@ func (c *Coinmarketcap) GetCryptocurrencyHistoricalListings() ([]CryptocurrencyH
|
||||
// Status Status `json:"status"`
|
||||
// }{}
|
||||
|
||||
// nolint: gocritic err := c.CheckAccountPlan(0)
|
||||
// nolint:gocritic // unused code, used as example
|
||||
// err := c.CheckAccountPlan(0)
|
||||
// if err != nil {
|
||||
// return resp.Data, err
|
||||
// }
|
||||
|
||||
// nolint: gocritic err = c.SendHTTPRequest(http.MethodGet, endpointCryptocurrencyHistoricalListings, nil, &resp)
|
||||
// nolint:gocritic // unused code, used as example
|
||||
// err = c.SendHTTPRequest(http.MethodGet, endpointCryptocurrencyHistoricalListings, nil, &resp)
|
||||
// if err != nil {
|
||||
// return resp.Data, err
|
||||
// }
|
||||
|
||||
// nolint: gocritic nolint:gocritic if resp.Status.ErrorCode != 0 {
|
||||
// nolint:gocritic // unused code, used as example
|
||||
// if resp.Status.ErrorCode != 0 {
|
||||
// return resp.Data, errors.New(resp.Status.ErrorMessage)
|
||||
// }
|
||||
|
||||
// nolint: gocritic nolint:gocritic return resp.Data, nil
|
||||
// nolint:gocritic // unused code, used as example
|
||||
// return resp.Data, nil
|
||||
}
|
||||
|
||||
// GetCryptocurrencyLatestListing returns a paginated list of all
|
||||
|
||||
@@ -191,5 +191,5 @@ func (p Pairs) GetRandomPair() Pair {
|
||||
return Pair{Base: NewCode(""), Quote: NewCode("")}
|
||||
}
|
||||
|
||||
return p[rand.Intn(pairsLen)]
|
||||
return p[rand.Intn(pairsLen)] // nolint:gosec // basic number generation required, no need for crypo/rand
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ func seedWithdrawData() {
|
||||
Amount: 1.0,
|
||||
},
|
||||
}
|
||||
rnd := rand.Intn(2)
|
||||
rnd := rand.Intn(2) // nolint:gosec // used for generating test data, no need to import crypo/rand
|
||||
if rnd == 0 {
|
||||
resp.RequestDetails.Currency = currency.AUD
|
||||
resp.RequestDetails.Type = 1
|
||||
|
||||
@@ -320,7 +320,8 @@ func (b *Bitflyer) SendHTTPRequest(path string, result interface{}) error {
|
||||
// if you have access and update the authenticated requests
|
||||
// TODO: Fill out this function once API access is obtained
|
||||
func (b *Bitflyer) SendAuthHTTPRequest() {
|
||||
// nolint: gocritic headers := make(map[string]string)
|
||||
// nolint:gocritic // code example
|
||||
// headers := make(map[string]string)
|
||||
// headers["ACCESS-KEY"] = b.API.Credentials.Key
|
||||
// headers["ACCESS-TIMESTAMP"] = strconv.FormatInt(time.Now().UnixNano(), 10)
|
||||
}
|
||||
|
||||
@@ -151,13 +151,18 @@ func (b *Bithumb) GetTransactionHistory(symbol string) (TransactionHistory, erro
|
||||
return response, nil
|
||||
}
|
||||
|
||||
// GetAccountInformation returns account information by singular currency
|
||||
func (b *Bithumb) GetAccountInformation(currency string) (Account, error) {
|
||||
response := Account{}
|
||||
// GetAccountInformation returns account information based on the desired
|
||||
// order/payment currencies
|
||||
func (b *Bithumb) GetAccountInformation(orderCurrency, paymentCurrency string) (Account, error) {
|
||||
var response Account
|
||||
if orderCurrency == "" {
|
||||
return response, errors.New("order currency must be set")
|
||||
}
|
||||
|
||||
val := url.Values{}
|
||||
if currency != "" {
|
||||
val.Set("currency", currency)
|
||||
val.Add("order_currency", orderCurrency)
|
||||
if paymentCurrency != "" { // optional param, default is KRW
|
||||
val.Add("payment_currency", paymentCurrency)
|
||||
}
|
||||
|
||||
return response,
|
||||
@@ -477,7 +482,7 @@ func (b *Bithumb) SendAuthenticatedHTTPRequest(path string, params url.Values, r
|
||||
|
||||
params.Set("endpoint", path)
|
||||
payload := params.Encode()
|
||||
hmacPayload := path + string(0) + payload + string(0) + n
|
||||
hmacPayload := path + string('\x00') + payload + string('\x00') + n
|
||||
hmac := crypto.GetHMAC(crypto.HashSHA512,
|
||||
[]byte(hmacPayload),
|
||||
[]byte(b.API.Credentials.Secret))
|
||||
|
||||
@@ -92,6 +92,25 @@ func TestGetTransactionHistory(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetAccountInformation(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
// Offline test
|
||||
_, err := b.GetAccountInformation("", "")
|
||||
if err == nil {
|
||||
t.Error("expected error when no order currency is specified")
|
||||
}
|
||||
|
||||
if !areTestAPIKeysSet() {
|
||||
t.Skip()
|
||||
}
|
||||
|
||||
_, err = b.GetAccountInformation(testCurrency, currency.KRW.String())
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetAccountBalance(t *testing.T) {
|
||||
t.Parallel()
|
||||
if !areTestAPIKeysSet() {
|
||||
|
||||
@@ -338,7 +338,7 @@ type OrderbookResponse struct {
|
||||
|
||||
// FillResponse contains fill information from the exchange
|
||||
type FillResponse struct {
|
||||
TradeID int `json:"trade_id"`
|
||||
TradeID int64 `json:"trade_id"`
|
||||
ProductID string `json:"product_id"`
|
||||
Price float64 `json:"price,string"`
|
||||
Size float64 `json:"size,string"`
|
||||
|
||||
@@ -560,7 +560,7 @@ func (c *CoinbasePro) GetOrderInfo(orderID string) (order.Detail, error) {
|
||||
}
|
||||
response.Trades = append(response.Trades, order.TradeHistory{
|
||||
Timestamp: fillResponse[i].CreatedAt,
|
||||
TID: string(fillResponse[i].TradeID),
|
||||
TID: strconv.FormatInt(fillResponse[i].TradeID, 10),
|
||||
Price: fillResponse[i].Price,
|
||||
Amount: fillResponse[i].Size,
|
||||
Exchange: c.GetName(),
|
||||
|
||||
@@ -494,5 +494,5 @@ func (i *instrumentMap) GetInstrumentIDs() []int64 {
|
||||
}
|
||||
|
||||
func getNonce() int64 {
|
||||
return rand.Int63n(coinutMaxNonce-1) + 1
|
||||
return rand.Int63n(coinutMaxNonce-1) + 1 // nolint:gosec // basic number generation required, no need for crypo/rand
|
||||
}
|
||||
|
||||
@@ -102,11 +102,11 @@ func TestCreateKline(t *testing.T) {
|
||||
rand.Seed(time.Now().Unix())
|
||||
for i := 0; i < 24000; i++ {
|
||||
trades = append(trades, order.TradeHistory{
|
||||
Timestamp: time.Now().Add((time.Duration(rand.Intn(10)) * time.Minute) +
|
||||
(time.Duration(rand.Intn(10)) * time.Second)),
|
||||
Timestamp: time.Now().Add((time.Duration(rand.Intn(10)) * time.Minute) + // nolint:gosec // no need to import crypo/rand for testing
|
||||
(time.Duration(rand.Intn(10)) * time.Second)), // nolint:gosec // no need to import crypo/rand for testing
|
||||
TID: crypto.HexEncodeToString([]byte(string(rune(i)))),
|
||||
Amount: float64(rand.Intn(20)) + 1,
|
||||
Price: 1000 + float64(rand.Intn(1000)),
|
||||
Amount: float64(rand.Intn(20)) + 1, // nolint:gosec // no need to import crypo/rand for testing
|
||||
Price: 1000 + float64(rand.Intn(1000)), // nolint:gosec // no need to import crypo/rand for testing
|
||||
})
|
||||
}
|
||||
|
||||
@@ -422,7 +422,7 @@ func TestItem_SortCandlesByTimestamp(t *testing.T) {
|
||||
}
|
||||
|
||||
for x := 0; x < 100; x++ {
|
||||
y := rand.Float64() // nolint gosec: used for generating test data no need to import crypo/rand
|
||||
y := rand.Float64() // nolint:gosec // used for generating test data, no need to import crypo/rand
|
||||
tempKline.Candles = append(tempKline.Candles,
|
||||
Candle{
|
||||
Time: time.Now().AddDate(0, 0, -x),
|
||||
|
||||
@@ -454,12 +454,12 @@ func TestProcessOrderbook(t *testing.T) {
|
||||
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
newName := "Exchange" + strconv.FormatInt(rand.Int63(), 10)
|
||||
newName := "Exchange" + strconv.FormatInt(rand.Int63(), 10) // nolint:gosec // no need to import crypo/rand for testing
|
||||
newPairs := currency.NewPair(currency.NewCode("BTC"+strconv.FormatInt(rand.Int63(), 10)),
|
||||
currency.NewCode("USD"+strconv.FormatInt(rand.Int63(), 10)))
|
||||
currency.NewCode("USD"+strconv.FormatInt(rand.Int63(), 10))) // nolint:gosec // no need to import crypo/rand for testing
|
||||
|
||||
asks := []Item{{Price: rand.Float64(), Amount: rand.Float64()}}
|
||||
bids := []Item{{Price: rand.Float64(), Amount: rand.Float64()}}
|
||||
asks := []Item{{Price: rand.Float64(), Amount: rand.Float64()}} // nolint:gosec // no need to import crypo/rand for testing
|
||||
bids := []Item{{Price: rand.Float64(), Amount: rand.Float64()}} // nolint:gosec // no need to import crypo/rand for testing
|
||||
base := &Base{
|
||||
Pair: newPairs,
|
||||
Asks: asks,
|
||||
|
||||
@@ -48,12 +48,12 @@ func bidAskGenerator() []orderbook.Item {
|
||||
var response []orderbook.Item
|
||||
randIterator := 100
|
||||
for i := 0; i < randIterator; i++ {
|
||||
price := float64(rand.Intn(1000))
|
||||
price := float64(rand.Intn(1000)) // nolint:gosec // no need to import crypo/rand for testing
|
||||
if price == 0 {
|
||||
price = 1
|
||||
}
|
||||
response = append(response, orderbook.Item{
|
||||
Amount: float64(rand.Intn(10)),
|
||||
Amount: float64(rand.Intn(10)), // nolint:gosec // no need to import crypo/rand for testing
|
||||
Price: price,
|
||||
ID: int64(i),
|
||||
})
|
||||
@@ -124,7 +124,7 @@ func BenchmarkBufferPerformance(b *testing.B) {
|
||||
}
|
||||
b.ResetTimer()
|
||||
for i := 0; i < b.N; i++ {
|
||||
randomIndex := rand.Intn(4)
|
||||
randomIndex := rand.Intn(4) // nolint:gosec // no need to import crypo/rand for testing
|
||||
update.Asks = itemArray[randomIndex]
|
||||
update.Bids = itemArray[randomIndex]
|
||||
err = obl.Update(update)
|
||||
@@ -159,7 +159,7 @@ func BenchmarkBufferSortingPerformance(b *testing.B) {
|
||||
}
|
||||
b.ResetTimer()
|
||||
for i := 0; i < b.N; i++ {
|
||||
randomIndex := rand.Intn(4)
|
||||
randomIndex := rand.Intn(4) // nolint:gosec // no need to import crypo/rand for testing
|
||||
update.Asks = itemArray[randomIndex]
|
||||
update.Bids = itemArray[randomIndex]
|
||||
err = obl.Update(update)
|
||||
@@ -195,7 +195,7 @@ func BenchmarkBufferSortingByIDPerformance(b *testing.B) {
|
||||
}
|
||||
b.ResetTimer()
|
||||
for i := 0; i < b.N; i++ {
|
||||
randomIndex := rand.Intn(4)
|
||||
randomIndex := rand.Intn(4) // nolint:gosec // no need to import crypo/rand for testing
|
||||
update.Asks = itemArray[randomIndex]
|
||||
update.Bids = itemArray[randomIndex]
|
||||
err = obl.Update(update)
|
||||
@@ -229,7 +229,7 @@ func BenchmarkNoBufferPerformance(b *testing.B) {
|
||||
}
|
||||
b.ResetTimer()
|
||||
for i := 0; i < b.N; i++ {
|
||||
randomIndex := rand.Intn(4)
|
||||
randomIndex := rand.Intn(4) // nolint:gosec // no need to import crypo/rand for testing
|
||||
update.Asks = itemArray[randomIndex]
|
||||
update.Bids = itemArray[randomIndex]
|
||||
err = obl.Update(update)
|
||||
|
||||
@@ -309,16 +309,17 @@ func TestProcessTicker(t *testing.T) { // non-appending function to tickers
|
||||
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
// nolint:gosec // no need to import crypo/rand for testing
|
||||
newName := "Exchange" + strconv.FormatInt(rand.Int63(), 10)
|
||||
newPairs, err := currency.NewPairFromStrings("BTC"+strconv.FormatInt(rand.Int63(), 10),
|
||||
"USD"+strconv.FormatInt(rand.Int63(), 10))
|
||||
newPairs, err := currency.NewPairFromStrings("BTC"+strconv.FormatInt(rand.Int63(), 10), // nolint:gosec // no need to import crypo/rand for testing
|
||||
"USD"+strconv.FormatInt(rand.Int63(), 10)) // nolint:gosec // no need to import crypo/rand for testing
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
tp := Price{
|
||||
Pair: newPairs,
|
||||
Last: rand.Float64(),
|
||||
Last: rand.Float64(), // nolint:gosec // no need to import crypo/rand for testing
|
||||
ExchangeName: newName,
|
||||
AssetType: asset.Spot,
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ var (
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
for x := 0; x < 100; x++ {
|
||||
v := rand.Float64()
|
||||
v := rand.Float64() // nolint:gosec // no need to import crypo/rand for testing
|
||||
candle := &objects.Array{}
|
||||
candle.Value = append(candle.Value, &objects.Time{Value: time.Now()},
|
||||
&objects.Float{Value: v},
|
||||
|
||||
@@ -249,7 +249,7 @@ func (w Wrapper) OHLCV(exch string, p currency.Pair, a asset.Item, start, end ti
|
||||
})
|
||||
|
||||
for x := 1; x < 200; x++ {
|
||||
r := validatorLow + rand.Float64()*(validatorHigh-validatorLow)
|
||||
r := validatorLow + rand.Float64()*(validatorHigh-validatorLow) // nolint:gosec // no need to import crypo/rand
|
||||
candle := kline.Candle{
|
||||
Time: candles[x-1].Time.Add(-i.Duration()),
|
||||
Open: r,
|
||||
|
||||
17
go.sum
17
go.sum
@@ -41,10 +41,8 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym
|
||||
github.com/DATA-DOG/go-sqlmock v1.3.3 h1:CWUqKXe0s8A2z6qCgkP4Kru7wC11YoAnoupUKFDnH08=
|
||||
github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
|
||||
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
|
||||
github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc=
|
||||
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||
github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y=
|
||||
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
|
||||
github.com/apmckinlay/gsuneido v0.0.0-20180907175622-1f10244968e3/go.mod h1:hJnaqxrCRgMCTWtpNz9XUFkBCREiQdlcyK6YNmOfroM=
|
||||
github.com/apmckinlay/gsuneido v0.0.0-20190404155041-0b6cd442a18f/go.mod h1:JU2DOj5Fc6rol0yaT79Csr47QR0vONGwJtBNGRD7jmc=
|
||||
@@ -81,10 +79,6 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:ma
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/d5/tengo/v2 v2.6.0 h1:D0cJtpiBzaLJ/Smv6nnUc/LIfO46oKwDx85NZtIRNRI=
|
||||
github.com/d5/tengo/v2 v2.6.0/go.mod h1:XRGjEs5I9jYIKTxly6HCF8oiiilk5E/RYXOZ5b0DZC8=
|
||||
github.com/d5/tengo/v2 v2.6.1 h1:hey1AC10EYgf87TLNAp1LcZZnlFf0Qzd/8icJC3kcDM=
|
||||
github.com/d5/tengo/v2 v2.6.1/go.mod h1:XRGjEs5I9jYIKTxly6HCF8oiiilk5E/RYXOZ5b0DZC8=
|
||||
github.com/d5/tengo/v2 v2.6.2 h1:AnPhA/Y5qrNLb5QSWHU9uXq25T3QTTdd2waTgsAHMdc=
|
||||
github.com/d5/tengo/v2 v2.6.2/go.mod h1:XRGjEs5I9jYIKTxly6HCF8oiiilk5E/RYXOZ5b0DZC8=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
@@ -183,16 +177,10 @@ github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoA
|
||||
github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=
|
||||
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.2.1 h1:V59tBiPuMkySHwJkuq/OYkK0WnOLwCwD3UkTbEMr12U=
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.2.1/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI=
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.2.2 h1:FlFbCRLd5Jr4iYXZufAvgWN6Ao0JrI5chLINnUXDDr0=
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI=
|
||||
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.14.7 h1:Nk5kuHrnWUTf/0GL1a/vchH/om9Ap2/HnVna+jYZgTY=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.14.7/go.mod h1:oYZKL012gGh6LMyg/xA7Q2yq6j8bu0wa+9w14EEthWU=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.14.8 h1:hXClj+iFpmLM8i3lkO6i4Psli4P2qObQuQReiII26U8=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.14.8/go.mod h1:NZE8t6vs6TnwLL/ITkaK8W3ecMLGAbh2jXTclvpiwYo=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.15.0 h1:ntPNC9TD/6l2XDenJZe6T5lSMg95thpV9sGAqHX4WU8=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.15.0/go.mod h1:vO11I9oWA+KsxmfFQPhLnnIb1VDE24M+pdxZFiuZcA8=
|
||||
github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q=
|
||||
@@ -251,8 +239,6 @@ github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzR
|
||||
github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
|
||||
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
|
||||
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
||||
github.com/mattn/go-sqlite3 v1.14.2 h1:A2EQLwjYf/hfYaM20FVjs1UewCTTFR7RmjEHkLjldIA=
|
||||
github.com/mattn/go-sqlite3 v1.14.2/go.mod h1:JIl7NbARA7phWnGvh0LKTyg7S9BA+6gx71ShQilpsus=
|
||||
github.com/mattn/go-sqlite3 v1.14.3 h1:j7a/xn1U6TKA/PHHxqZuzh64CdtRc7rU9M+AvkOl5bA=
|
||||
github.com/mattn/go-sqlite3 v1.14.3/go.mod h1:WVKg1VTActs4Qso6iwGbiFih2UIHo0ENGwNd0Lj+XmI=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||
@@ -435,7 +421,6 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB
|
||||
golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
|
||||
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
@@ -657,8 +642,6 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji
|
||||
google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
|
||||
google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI=
|
||||
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
|
||||
google.golang.org/grpc v1.31.1 h1:SfXqXS5hkufcdZ/mHtYCh53P2b+92WQq/DZcKLgsFRs=
|
||||
google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
|
||||
google.golang.org/grpc v1.32.0 h1:zWTV+LMdc3kaiJMSTOFz2UgSBgx8RNQoTGiZu3fR9S0=
|
||||
google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
|
||||
google.golang.org/grpc/examples v0.0.0-20200825214159-c4ba4cc6af4a h1:LwiilwqlW063bWAVbMG6G57sv7YyPZX3N0X298jj1nA=
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM node:9-alpine as build
|
||||
FROM node:14-alpine as build
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm set progress=false \
|
||||
&& npm config set depth 0 \
|
||||
@@ -10,7 +10,7 @@ WORKDIR /app
|
||||
COPY . .
|
||||
RUN $(npm bin)/ng build --prod --build-optimizer
|
||||
|
||||
FROM nginx:1.13.3-alpine
|
||||
FROM nginx:1.19.2-alpine
|
||||
RUN rm -rf /var/www/html/*
|
||||
COPY nginx/default.conf /etc/nginx/conf.d/
|
||||
COPY --from=build /app/dist /var/www/html
|
||||
|
||||
Reference in New Issue
Block a user