diff --git a/.golangci.yml b/.golangci.yml index 5f48fe39..524c341f 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -7,25 +7,22 @@ linters-settings: default-signifies-exhaustive: false golint: min-confidence: 0 - + linters: disable-all: true enable: - - deadcode - - depguard - dogsled - errcheck - goconst - gocyclo - gofmt - goimports - - revive - gosimple - govet - ineffassign + - revive - staticcheck - - structcheck - stylecheck - typecheck - unconvert - - varcheck + - unused diff --git a/Makefile b/Makefile index 2f7fdf68..f593c694 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ include Makefile.tools -VERSION := 0.15.2 +VERSION := 0.15.3 SHORT_COMMIT := $(shell git rev-parse --short HEAD 2>/dev/null || echo dev) GO_VERSION := $(shell go version | awk '{ print $$3}' | sed 's/^go//') FMT_OPTIONS := -x '**/testdata' -x site/themes -x '.vscode/*' -x dist -t jsonnet -t json -t yaml diff --git a/cmd/gen-qbec-swagger/main.go b/cmd/gen-qbec-swagger/main.go index 5c050e2a..ad2373ef 100644 --- a/cmd/gen-qbec-swagger/main.go +++ b/cmd/gen-qbec-swagger/main.go @@ -19,7 +19,6 @@ package main import ( "encoding/json" "fmt" - "io/ioutil" "log" "os" "time" @@ -41,7 +40,7 @@ func main() { } } - b, err := ioutil.ReadFile(inFile) + b, err := os.ReadFile(inFile) handle(err) var data interface{} @@ -61,7 +60,7 @@ var swaggerJSON = %s %s `, inFile, time.Now().UTC(), "`", b, "`") - err = ioutil.WriteFile(outFile, []byte(code), 0644) + err = os.WriteFile(outFile, []byte(code), 0644) handle(err) log.Println("Successfully wrote", outFile, "from", inFile) } diff --git a/cmdtest/qbec-replay-exec/main.go b/cmdtest/qbec-replay-exec/main.go index 8b055ad6..8e334e13 100644 --- a/cmdtest/qbec-replay-exec/main.go +++ b/cmdtest/qbec-replay-exec/main.go @@ -20,7 +20,7 @@ package main import ( "encoding/json" "fmt" - "io/ioutil" + "io" "log" "os" "sort" @@ -28,7 +28,7 @@ import ( ) func main() { - b, err := ioutil.ReadAll(os.Stdin) + b, err := io.ReadAll(os.Stdin) if err != nil { log.Fatalln(err) } diff --git a/go.mod b/go.mod index cdf8b998..bbcfea33 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/splunk/qbec -go 1.19 +go 1.21 require ( github.com/bmatcuk/doublestar/v4 v4.0.2 @@ -9,7 +9,6 @@ require ( github.com/go-openapi/spec v0.19.12 github.com/go-openapi/strfmt v0.19.8 github.com/go-openapi/validate v0.19.12 - github.com/golang/protobuf v1.5.2 github.com/google/go-jsonnet v0.18.0 github.com/googleapis/gnostic v0.5.5 github.com/jonboulle/clockwork v0.2.2 @@ -18,9 +17,10 @@ require ( github.com/pmezard/go-difflib v1.0.0 github.com/spf13/cobra v1.3.0 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.7.0 + github.com/stretchr/testify v1.8.2 github.com/tidwall/pretty v1.0.0 - gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b + google.golang.org/protobuf v1.27.1 + gopkg.in/yaml.v3 v3.0.1 k8s.io/api v0.23.1 k8s.io/apimachinery v0.23.1 k8s.io/cli-runtime v0.23.1 @@ -35,7 +35,7 @@ require ( github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect github.com/Azure/go-autorest/autorest v0.11.18 // indirect - github.com/Azure/go-autorest/autorest/adal v0.9.13 // indirect + github.com/Azure/go-autorest/autorest/adal v0.9.23 // indirect github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect github.com/Azure/go-autorest/logger v0.2.1 // indirect github.com/Azure/go-autorest/tracing v0.6.0 // indirect @@ -47,7 +47,6 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/evanphx/json-patch v4.12.0+incompatible // indirect github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect - github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect github.com/go-errors/errors v1.0.1 // indirect github.com/go-logr/logr v1.2.0 // indirect github.com/go-openapi/analysis v0.19.10 // indirect @@ -59,6 +58,8 @@ require ( github.com/go-openapi/swag v0.19.14 // indirect github.com/go-stack/stack v1.8.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang-jwt/jwt/v4 v4.5.0 // indirect + github.com/golang/protobuf v1.5.2 // indirect github.com/google/btree v1.0.1 // indirect github.com/google/go-cmp v0.5.6 // indirect github.com/google/gofuzz v1.1.0 // indirect @@ -85,7 +86,7 @@ require ( github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca // indirect go.mongodb.org/mongo-driver v1.4.2 // indirect go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect - golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce // indirect + golang.org/x/crypto v0.6.0 // indirect golang.org/x/net v0.7.0 // indirect golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect golang.org/x/sys v0.5.0 // indirect @@ -93,7 +94,6 @@ require ( golang.org/x/text v0.7.0 // indirect golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/protobuf v1.27.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect k8s.io/component-base v0.23.1 // indirect diff --git a/go.sum b/go.sum index ed0cf55d..fd35dd53 100644 --- a/go.sum +++ b/go.sum @@ -55,8 +55,9 @@ github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.11.18 h1:90Y4srNYrwOtAgVo3ndrQkTYn6kf1Eg/AjTFJ8Is2aM= github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= -github.com/Azure/go-autorest/autorest/adal v0.9.13 h1:Mp5hbtOePIzM8pJVRa3YLrWWmZtoxRXqUEzCfJt3+/Q= github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= +github.com/Azure/go-autorest/autorest/adal v0.9.23 h1:Yepx8CvFxwNKpH6ja7RZ+sKX+DWYNldbLiALMC3BTz8= +github.com/Azure/go-autorest/autorest/adal v0.9.23/go.mod h1:5pcMqFkdPhviJdlEy3kC/v1ZLnQl0MH6XA5YCcMhy4c= github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk= @@ -182,7 +183,6 @@ github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGE github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= -github.com/form3tech-oss/jwt-go v3.2.3+incompatible h1:7ZaBxOI7TMoYBfyA3cQHErNNyAWIKUMIwqxEtgHOs5c= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= @@ -316,6 +316,8 @@ github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= +github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -682,15 +684,20 @@ github.com/spf13/viper v1.10.0/go.mod h1:SoyBPwAtKDzypXNDFKN5kzH7ppppbGZtls1UpIy github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= @@ -710,6 +717,7 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= @@ -767,8 +775,9 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce h1:Roh6XWxHFKrPgC/EQhVubSAGQ6Ozk6IdxHSzt1mR0EI= -golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc= +golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -805,6 +814,7 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= 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-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -859,6 +869,8 @@ golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -892,6 +904,7 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -978,10 +991,13 @@ golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1070,6 +1086,7 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff/go.mod h1:YD9qOF0M9xpSpdWTBbzEl5e/RnCefISl8E5Noe10jFM= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1252,8 +1269,9 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= diff --git a/internal/cmd/base.go b/internal/cmd/base.go index f3268747..e3d3df47 100644 --- a/internal/cmd/base.go +++ b/internal/cmd/base.go @@ -22,7 +22,6 @@ import ( "errors" "fmt" "io" - "io/ioutil" "os" "sync" @@ -233,7 +232,7 @@ func (c Context) Confirm(action string) error { } inst, err := readline.NewEx(&readline.Config{ Prompt: "Do you want to continue [y/n]: ", - Stdin: ioutil.NopCloser(c.stdin), + Stdin: io.NopCloser(c.stdin), Stdout: c.stdout, Stderr: c.stderr, ForceUseInteractive: true, diff --git a/internal/cmd/profile_test.go b/internal/cmd/profile_test.go index 43ccd4fe..1f802ebb 100644 --- a/internal/cmd/profile_test.go +++ b/internal/cmd/profile_test.go @@ -18,7 +18,6 @@ package cmd import ( "bytes" - "io/ioutil" "os" "path/filepath" "testing" @@ -29,7 +28,7 @@ import ( func TestProfileSuccess(t *testing.T) { defer func() { cleanup = &closers{} }() - tmpDir, err := ioutil.TempDir("", "") + tmpDir, err := os.MkdirTemp("", "") require.NoError(t, err) defer os.RemoveAll(tmpDir) cpuFile := filepath.Join(tmpDir, "cpu.prof") diff --git a/internal/commands/fmt.go b/internal/commands/fmt.go index 8f151965..06b21b0b 100644 --- a/internal/commands/fmt.go +++ b/internal/commands/fmt.go @@ -19,7 +19,6 @@ import ( "fmt" "io" "io/fs" - "io/ioutil" "os" "github.com/spf13/cobra" @@ -163,7 +162,7 @@ func processFile(config *fmtCommandConfig, filename string, in io.Reader, out io perm = fi.Mode().Perm() } - src, err := ioutil.ReadAll(in) + src, err := io.ReadAll(in) if err != nil { return err } @@ -185,7 +184,7 @@ func processFile(config *fmtCommandConfig, filename string, in io.Reader, out io if err != nil { return fmt.Errorf("error creating backup file %q: %v", filename+".", err) } - err = ioutil.WriteFile(filename, res, perm) + err = os.WriteFile(filename, res, perm) if err != nil { os.Rename(bakname, filename) diff --git a/internal/commands/fmt_test.go b/internal/commands/fmt_test.go index 59dfe700..d4f477ab 100644 --- a/internal/commands/fmt_test.go +++ b/internal/commands/fmt_test.go @@ -17,7 +17,6 @@ package commands import ( "bytes" "fmt" - "io/ioutil" "os" "path/filepath" "regexp" @@ -181,11 +180,11 @@ func TestDoFmt(t *testing.T) { } func TestFormatYaml(t *testing.T) { - var testfile, err = ioutil.ReadFile("testdata/test.yml") + var testfile, err = os.ReadFile("testdata/test.yml") require.Nil(t, err) o, err := formatYaml(testfile) require.Nil(t, err) - e, err := ioutil.ReadFile("testdata/test.yml.formatted") + e, err := os.ReadFile("testdata/test.yml.formatted") require.Nil(t, err) if !bytes.Equal(o, e) { t.Errorf("Expected %q, got %q", string(e), string(o)) @@ -214,11 +213,11 @@ func TestFormatYaml(t *testing.T) { } func TestFormatJsonnet(t *testing.T) { - var testfile, err = ioutil.ReadFile("testdata/test.libsonnet") + var testfile, err = os.ReadFile("testdata/test.libsonnet") require.Nil(t, err) o, err := formatJsonnet(testfile) require.Nil(t, err) - e, err := ioutil.ReadFile("testdata/test.libsonnet.formatted") + e, err := os.ReadFile("testdata/test.libsonnet.formatted") require.Nil(t, err) if !bytes.Equal(o, e) { t.Errorf("Expected %q, got %q", string(e), string(o)) @@ -228,11 +227,11 @@ func TestFormatJsonnet(t *testing.T) { } func TestFormatJSON(t *testing.T) { - var testfile, err = ioutil.ReadFile("testdata/test.json/test.json") + var testfile, err = os.ReadFile("testdata/test.json/test.json") require.Nil(t, err) o, err := formatJSON(testfile) require.Nil(t, err) - e, err := ioutil.ReadFile("testdata/test.json/test.json.formatted") + e, err := os.ReadFile("testdata/test.json/test.json.formatted") require.Nil(t, err) if !bytes.Equal(o, e) { t.Errorf("Expected %q, got %q", string(e), string(o)) @@ -273,7 +272,7 @@ func TestProcessFile(t *testing.T) { var config = fmtCommandConfig{} var err = processFile(&config, test.input, nil, &b) require.Nil(t, err) - e, err := ioutil.ReadFile(test.output) + e, err := os.ReadFile(test.output) require.Nil(t, err) var o = b.Bytes() if !bytes.Equal(e, o) { @@ -285,7 +284,7 @@ func TestProcessFile(t *testing.T) { // Adapted from https://golang.org/src/cmd/gofmt/gofmt_test.go func TestBackupFile(t *testing.T) { - dir, err := ioutil.TempDir("", "qbecfmt_test") + dir, err := os.MkdirTemp("", "qbecfmt_test") if err != nil { t.Fatal(err) } diff --git a/internal/commands/fmtutil.go b/internal/commands/fmtutil.go index 14cfeb39..d0b4a1ca 100644 --- a/internal/commands/fmtutil.go +++ b/internal/commands/fmtutil.go @@ -20,7 +20,6 @@ import ( "encoding/json" "fmt" "io" - "io/ioutil" "os" "path/filepath" "runtime" @@ -180,7 +179,7 @@ const chmodSupported = runtime.GOOS != "windows" // the chosen file name. func backupFile(filename string, data []byte, perm os.FileMode) (string, error) { // create backup file - f, err := ioutil.TempFile(filepath.Dir(filename), filepath.Base(filename)) + f, err := os.CreateTemp(filepath.Dir(filename), filepath.Base(filename)) if err != nil { return "", err } diff --git a/internal/commands/init.go b/internal/commands/init.go index c3846140..d50fe34c 100644 --- a/internal/commands/init.go +++ b/internal/commands/init.go @@ -20,7 +20,6 @@ import ( "bytes" "fmt" "html/template" - "io/ioutil" "os" "path/filepath" @@ -146,7 +145,7 @@ func writeTemplateFile(file string, t *template.Template, data interface{}) erro if err := t.Execute(&w, data); err != nil { return fmt.Errorf("unable to expand template for file %s, %v", file, err) } - if err := ioutil.WriteFile(file, w.Bytes(), 0644); err != nil { + if err := os.WriteFile(file, w.Bytes(), 0644); err != nil { return err } sio.Noticeln("wrote", file) @@ -204,7 +203,7 @@ func writeFiles(dir string, app model.QbecApp, config initCommandConfig) error { return fmt.Errorf("yaml marshal: %v", err) } file := filepath.Join(dir, "qbec.yaml") - if err := ioutil.WriteFile(file, b, 0644); err != nil { + if err := os.WriteFile(file, b, 0644); err != nil { return err } sio.Noticeln("wrote", file) diff --git a/internal/commands/lint.go b/internal/commands/lint.go index dff0f4a6..75385a5e 100644 --- a/internal/commands/lint.go +++ b/internal/commands/lint.go @@ -17,8 +17,8 @@ import ( "encoding/json" "fmt" "io/fs" - "io/ioutil" "net/url" + "os" "strings" "github.com/pkg/errors" @@ -125,7 +125,7 @@ func (p *linter) Process(path string, f fs.FileInfo) (outErr error) { defer func() { p.printError(outErr) }() - b, err := ioutil.ReadFile(path) + b, err := os.ReadFile(path) if err != nil { return err } diff --git a/internal/eval/eval_test.go b/internal/eval/eval_test.go index 2bc3d4eb..a15454b9 100644 --- a/internal/eval/eval_test.go +++ b/internal/eval/eval_test.go @@ -19,7 +19,6 @@ package eval import ( "encoding/json" "fmt" - "io/ioutil" "os" "path/filepath" "testing" @@ -462,7 +461,7 @@ func TestEvalPostProcessor(t *testing.T) { }, } - tmpDir, err := ioutil.TempDir("", "pp*") + tmpDir, err := os.MkdirTemp("", "pp*") require.NoError(t, err) defer os.RemoveAll(tmpDir) count := 0 @@ -471,7 +470,7 @@ func TestEvalPostProcessor(t *testing.T) { count++ ctx := decorate(Context{}) file := filepath.Join(tmpDir, fmt.Sprintf("f%03d.libsonnet", count)) - err := ioutil.WriteFile(file, []byte(test.code), 0644) + err := os.WriteFile(file, []byte(test.code), 0644) require.NoError(t, err) pp := postProc{ctx: ctx, file: file} ret, err := pp.run(obj) diff --git a/internal/model/app.go b/internal/model/app.go index 16cfb6dc..04788494 100644 --- a/internal/model/app.go +++ b/internal/model/app.go @@ -19,7 +19,7 @@ package model import ( "fmt" - "io/ioutil" + "io" "net/http" "os" "path/filepath" @@ -88,7 +88,7 @@ func downloadEnvFile(url string) ([]byte, error) { if res.StatusCode != http.StatusOK { return nil, fmt.Errorf("status : %s", res.Status) } - payload, err := ioutil.ReadAll(res.Body) + payload, err := io.ReadAll(res.Body) if err != nil { return nil, err } @@ -103,7 +103,7 @@ func readEnvFile(file string) ([]byte, error) { } return b, nil } - return ioutil.ReadFile(file) + return os.ReadFile(file) } func loadEnvFiles(app *QbecApp, additionalFiles []string, v *validator) error { @@ -153,7 +153,7 @@ func loadEnvFiles(app *QbecApp, additionalFiles []string, v *validator) error { // NewApp returns an app loading its details from the supplied file. func NewApp(file string, envFiles []string, tag string) (*App, error) { - b, err := ioutil.ReadFile(file) + b, err := os.ReadFile(file) if err != nil { return nil, err } diff --git a/internal/model/app_test.go b/internal/model/app_test.go index c63be1a5..bb5bf8fd 100644 --- a/internal/model/app_test.go +++ b/internal/model/app_test.go @@ -21,7 +21,6 @@ import ( "errors" "fmt" "io/fs" - "io/ioutil" "net/http" "net/http/httptest" "os" @@ -376,7 +375,7 @@ func TestHttpEnvFiles(t *testing.T) { reset := setPwd(t, "testdata/http-app") defer reset() s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { - b, err := ioutil.ReadFile("envs.yaml") + b, err := os.ReadFile("envs.yaml") if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return @@ -385,13 +384,13 @@ func TestHttpEnvFiles(t *testing.T) { })) defer s.Close() - b, err := ioutil.ReadFile("qbec-template.yaml") + b, err := os.ReadFile("qbec-template.yaml") tmpl, err := template.New("qbec").Parse(string(b)) require.NoError(t, err) var buf bytes.Buffer err = tmpl.Execute(&buf, map[string]interface{}{"URL": s.URL}) require.NoError(t, err) - err = ioutil.WriteFile("qbec.yaml", buf.Bytes(), 0640) + err = os.WriteFile("qbec.yaml", buf.Bytes(), 0640) require.NoError(t, err) app, err := NewApp("qbec.yaml", nil, "") require.NoError(t, err) diff --git a/internal/remote/k8smeta/meta_test.go b/internal/remote/k8smeta/meta_test.go index f31b3d4c..c6507f84 100644 --- a/internal/remote/k8smeta/meta_test.go +++ b/internal/remote/k8smeta/meta_test.go @@ -19,7 +19,7 @@ package k8smeta import ( "encoding/json" "fmt" - "io/ioutil" + "os" "path/filepath" "strings" "testing" @@ -59,7 +59,7 @@ func (d *disco) ServerResourcesForGroupVersion(groupVersion string) (*metav1.API func getServerMetadata(t *testing.T, verbosity int) *Resources { var d disco - b, err := ioutil.ReadFile(filepath.Join("testdata", "metadata.json")) + b, err := os.ReadFile(filepath.Join("testdata", "metadata.json")) require.Nil(t, err) err = json.Unmarshal(b, &d) require.Nil(t, err) @@ -72,7 +72,7 @@ func getServerMetadata(t *testing.T, verbosity int) *Resources { } func loadObject(t *testing.T, file string) model.K8sObject { - b, err := ioutil.ReadFile(filepath.Join("testdata", file)) + b, err := os.ReadFile(filepath.Join("testdata", file)) require.Nil(t, err) var d map[string]interface{} err = json.Unmarshal(b, &d) diff --git a/internal/remote/k8smeta/schema_test.go b/internal/remote/k8smeta/schema_test.go index d117780e..3c1f44e2 100644 --- a/internal/remote/k8smeta/schema_test.go +++ b/internal/remote/k8smeta/schema_test.go @@ -18,21 +18,21 @@ package k8smeta import ( "context" - "io/ioutil" + "os" "path/filepath" "testing" - "github.com/golang/protobuf/proto" openapi_v2 "github.com/googleapis/gnostic/openapiv2" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "google.golang.org/protobuf/proto" "k8s.io/apimachinery/pkg/runtime/schema" ) type sd struct{} func (d sd) OpenAPISchema() (*openapi_v2.Document, error) { - b, err := ioutil.ReadFile(filepath.Join("testdata", "swagger-2.0.0.pb-v1")) + b, err := os.ReadFile(filepath.Join("testdata", "swagger-2.0.0.pb-v1")) if err != nil { return nil, err } diff --git a/internal/remote/patch.go b/internal/remote/patch.go index 87613cea..34f136e6 100644 --- a/internal/remote/patch.go +++ b/internal/remote/patch.go @@ -116,10 +116,10 @@ func deleteEmpty(parent map[string]interface{}, key string) { // contains empty objects. It makes an assumption that there is actually no reason an empty object // needs to be updated for a Kubernetes resource considering that the server would already have an object // there on initial create if needed. Things considered empty will be of the form: -// {} -// { metadata: { labels: {}, annotations: {} } -// { metadata: { labels: {}, annotations: {} }, spec: { foo: { bar: {} } } } // +// {} +// { metadata: { labels: {}, annotations: {} } +// { metadata: { labels: {}, annotations: {} }, spec: { foo: { bar: {} } } } func isEmptyPatch(patch []byte) bool { var root map[string]interface{} err := json.Unmarshal(patch, &root) diff --git a/internal/remote/pristine_test.go b/internal/remote/pristine_test.go index 25e32ff9..8407036c 100644 --- a/internal/remote/pristine_test.go +++ b/internal/remote/pristine_test.go @@ -16,7 +16,7 @@ package remote import ( "encoding/base64" - "io/ioutil" + "os" "path/filepath" "testing" @@ -67,7 +67,7 @@ func TestUnzipNegative(t *testing.T) { } func loadFile(t *testing.T, file string) *unstructured.Unstructured { - b, err := ioutil.ReadFile(filepath.Join("testdata", "pristine", file)) + b, err := os.ReadFile(filepath.Join("testdata", "pristine", file)) require.Nil(t, err) var data map[string]interface{} err = yaml.Unmarshal(b, &data) diff --git a/internal/types/status_test.go b/internal/types/status_test.go index 3e5194f7..aad4e144 100644 --- a/internal/types/status_test.go +++ b/internal/types/status_test.go @@ -16,7 +16,7 @@ package types import ( "encoding/json" - "io/ioutil" + "os" "path/filepath" "regexp" "strconv" @@ -37,7 +37,7 @@ func TestObjectStatus(t *testing.T) { } func load(t *testing.T, file string) *unstructured.Unstructured { - b, err := ioutil.ReadFile(file) + b, err := os.ReadFile(file) require.Nil(t, err) var data map[string]interface{} err = json.Unmarshal(b, &data) diff --git a/internal/vmexternals/externals.go b/internal/vmexternals/externals.go index 9e0764ed..7574c71f 100644 --- a/internal/vmexternals/externals.go +++ b/internal/vmexternals/externals.go @@ -20,7 +20,6 @@ import ( "bufio" "bytes" "fmt" - "io/ioutil" "os" "strings" @@ -110,7 +109,7 @@ func getValues(ret map[string]UserVal, name string, s strFiles, fn func(value st if len(parts) == 1 { return fmt.Errorf("%s-file no filename specified for %s", name, s) } - b, err := ioutil.ReadFile(parts[1]) + b, err := os.ReadFile(parts[1]) if err != nil { return err } @@ -118,7 +117,7 @@ func getValues(ret map[string]UserVal, name string, s strFiles, fn func(value st return nil } processList := func(l string) error { - b, err := ioutil.ReadFile(l) + b, err := os.ReadFile(l) if err != nil { return err } diff --git a/vm/internal/importers/data-source.go b/vm/internal/importers/data-source.go index a9261a34..452caac4 100644 --- a/vm/internal/importers/data-source.go +++ b/vm/internal/importers/data-source.go @@ -44,7 +44,9 @@ type DataSourceImporter struct { // NewDataSourceImporter returns an importer that can resolve paths for the specified datasource. // It processes entries of the form -// data://{name}[/{path-to-be-resolved}] +// +// data://{name}[/{path-to-be-resolved}] +// // If no path is provided, it is set to "/" func NewDataSourceImporter(source datasource.DataSource) *DataSourceImporter { exact := fmt.Sprintf("%s://%s", dsPrefix, source.Name()) diff --git a/vm/internal/importers/glob.go b/vm/internal/importers/glob.go index 1cb6a2b8..3f2d0cd6 100644 --- a/vm/internal/importers/glob.go +++ b/vm/internal/importers/glob.go @@ -73,23 +73,22 @@ type globEntry struct { // // That is, given the following directory structure: // -// lib -// - a.json -// - b.json -// caller -// - c.libsonnet +// lib +// - a.json +// - b.json +// caller +// - c.libsonnet // // where c.libsonnet has the following contents // -// import 'glob-import:../lib/*.json' +// import 'glob-import:../lib/*.json' // // evaluating `c.libsonnet` will return jsonnet code of the following form: // -// { -// '../lib/a.json': import '../lib/a.json', -// '../lib/b.json': import '../lib/b.json', -// } -// +// { +// '../lib/a.json': import '../lib/a.json', +// '../lib/b.json': import '../lib/b.json', +// } type GlobImporter struct { innerVerb string prefix string diff --git a/vm/internal/importers/glob_test.go b/vm/internal/importers/glob_test.go index 103ab6c6..fe0da5a6 100644 --- a/vm/internal/importers/glob_test.go +++ b/vm/internal/importers/glob_test.go @@ -19,7 +19,6 @@ package importers import ( "encoding/json" "fmt" - "io/ioutil" "os" "path/filepath" "testing" @@ -47,7 +46,7 @@ type outputData map[string]interface{} func generateFile(t *testing.T, virtFile string, code string) (outFile string) { file := virtFile + ".generated" - err := ioutil.WriteFile(file, []byte(code), 0644) + err := os.WriteFile(file, []byte(code), 0644) require.NoError(t, err) return file } diff --git a/vm/vars_test.go b/vm/vars_test.go index ebfd7a9b..b8565d10 100644 --- a/vm/vars_test.go +++ b/vm/vars_test.go @@ -1,17 +1,17 @@ /* - Copyright 2021 Splunk Inc. +Copyright 2021 Splunk Inc. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. */ package vm