Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update to go19 #662

Open
wants to merge 2 commits into
base: rel6
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 24 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,21 +1,39 @@
module github.com/rwynn/monstache/v6

go 1.19

require (
github.com/BurntSushi/toml v1.2.1
github.com/aws/aws-sdk-go v1.44.239
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf
github.com/evanphx/json-patch v5.6.0+incompatible
github.com/fsnotify/fsnotify v1.5.1
github.com/golang/snappy v0.0.4 // indirect
github.com/klauspost/compress v1.15.1 // indirect
github.com/kr/pretty v0.2.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/olivere/elastic/v7 v7.0.31
github.com/robertkrimen/otto v0.0.0-20211024170158-b87d35c0b86f
github.com/rwynn/gtm/v2 v2.1.2
go.mongodb.org/mongo-driver v1.11.4
go.mongodb.org/mongo-driver v1.11.0
gopkg.in/Graylog2/go-gelf.v2 v2.0.0-20191017102106-1550ee647df0
gopkg.in/natefinch/lumberjack.v2 v2.0.0
)

go 1.13
require (
github.com/golang/snappy v0.0.4 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/klauspost/compress v1.15.1 // indirect
github.com/kr/pretty v0.2.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/serialx/hashring v0.0.0-20200727003509-22c0c7ab6b1b // indirect
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
github.com/xdg-go/scram v1.1.1 // indirect
github.com/xdg-go/stringprep v1.0.3 // indirect
github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a // indirect
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5 // indirect
golang.org/x/text v0.3.7 // indirect
gopkg.in/sourcemap.v1 v1.0.5 // indirect
)
1 change: 0 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba
gopkg.in/Graylog2/go-gelf.v2 v2.0.0-20191017102106-1550ee647df0 h1:Xg23ydYYJLmb9AK3XdcEpplHZd1MpN3X2ZeeMoBClmY=
gopkg.in/Graylog2/go-gelf.v2 v2.0.0-20191017102106-1550ee647df0/go.mod h1:CeDeqW4tj9FrgZXF/dQCWZrBdcZWWBenhJtxLH4On2g=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8=
gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
Expand Down
14 changes: 7 additions & 7 deletions monstache.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"errors"
"flag"
"fmt"
"io/ioutil"
"io"
"log"
"math"
"net/http"
Expand Down Expand Up @@ -1852,7 +1852,7 @@ func (config *configOptions) loadPipelines() {
errorLog.Fatalln("Pipelines must specify path or script but not both")
}
if s.Path != "" {
if script, err := ioutil.ReadFile(s.Path); err == nil {
if script, err := os.ReadFile(s.Path); err == nil {
s.Script = string(script[:])
} else {
errorLog.Fatalf("Unable to load pipeline at path %s: %s", s.Path, err)
Expand Down Expand Up @@ -1892,7 +1892,7 @@ func (config *configOptions) loadFilters() {
errorLog.Fatalln("Filters must specify path or script but not both")
}
if s.Path != "" {
if script, err := ioutil.ReadFile(s.Path); err == nil {
if script, err := os.ReadFile(s.Path); err == nil {
s.Script = string(script[:])
} else {
errorLog.Fatalf("Unable to load filter at path %s: %s", s.Path, err)
Expand Down Expand Up @@ -1949,7 +1949,7 @@ func (config *configOptions) loadScripts() {
errorLog.Fatalln("Scripts must specify path or script but not both")
}
if s.Path != "" {
if script, err := ioutil.ReadFile(s.Path); err == nil {
if script, err := os.ReadFile(s.Path); err == nil {
s.Script = string(script[:])
} else {
errorLog.Fatalf("Unable to load script at path %s: %s", s.Path, err)
Expand Down Expand Up @@ -2051,7 +2051,7 @@ func (config *configOptions) decodeAsTemplate() *configOptions {
name, val := pair[0], pair[1]
env[name] = val
}
tpl, err := ioutil.ReadFile(config.ConfigFile)
tpl, err := os.ReadFile(config.ConfigFile)
if err != nil {
errorLog.Fatalln(err)
}
Expand Down Expand Up @@ -2649,7 +2649,7 @@ func (config *configOptions) loadVariableValueFromFile(name string, path string)
return name, "", fmt.Errorf("read value for %s from file failed: %s", name, err)
}
defer f.Close()
c, err := ioutil.ReadAll(f)
c, err := io.ReadAll(f)
if err != nil {
return name, "", fmt.Errorf("read value for %s from file failed: %s", name, err)
}
Expand Down Expand Up @@ -2899,7 +2899,7 @@ func (config *configOptions) NewHTTPClient() (client *http.Client, err error) {
if config.ElasticPemFile != "" {
var ca []byte
certs := x509.NewCertPool()
if ca, err = ioutil.ReadFile(config.ElasticPemFile); err == nil {
if ca, err = os.ReadFile(config.ElasticPemFile); err == nil {
if ok := certs.AppendCertsFromPEM(ca); !ok {
errorLog.Printf("No certs parsed successfully from %s", config.ElasticPemFile)
}
Expand Down