Skip to content

Commit

Permalink
update entitlements to go1.20 (RedHatInsights#163)
Browse files Browse the repository at this point in the history
* update entitlements to go1.20
* add whitespace to avoid bug: golang/go#58370

---------

Co-authored-by: Daniel Agbay <Daniel Agbay>
  • Loading branch information
dagbay-rh authored Jan 17, 2024
1 parent 4942e1e commit 67128e1
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Use go-toolset as the builder image
# Once built, copys GO executable to a smaller image and runs it from there
# FROM registry.redhat.io/ubi8/go-toolset as builder
FROM quay.io/projectquay/golang:1.19 as builder
FROM quay.io/projectquay/golang:1.20 as builder

WORKDIR /go/src/app

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ make

If your local version differs from what entitlements is using, you can download the desired version of go here: [go.dev/doc/manage-install](https://go.dev/doc/manage-install), and then pass the path to the go binary to all make commands like so:
```sh
make GO=~/go/bin/go1.19
make GO=~/go/bin/go1.20
```

## Certificates and Configuration
Expand Down
2 changes: 1 addition & 1 deletion ams/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,4 +329,4 @@ func isSearchStrValid(val *string) bool {

func validateOrgIdPattern(orgId string) (match bool, err error) {
return regexp.MatchString("^[a-zA-Z0-9]+$", orgId)
}
}
2 changes: 1 addition & 1 deletion ams/query_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ func (builder *QueryBuilder) And() *QueryBuilder {
func (builder *QueryBuilder) Build() string {
logger.Log.WithFields(logrus.Fields{"ams_search_query":builder.query}).Debug("built ams search query")
return builder.query
}
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/RedHatInsights/entitlements-api-go

go 1.19
go 1.20

require (
github.com/766b/chi-logger v0.0.0-20180309043024-d2679d398ce4
Expand Down
3 changes: 3 additions & 0 deletions pr_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ export APP_NAME="entitlements" # name of app-sre "application" folder this comp
export COMPONENT_NAME="entitlements-api-go" # name of app-sre "resourceTemplate" in deploy.yaml for this component
export IMAGE="quay.io/cloudservices/entitlements-api-go" # the image location on quay

echo "*** GO version ***"
go version

# Install bonfire repo/initialize
CICD_URL=https://raw.githubusercontent.com/RedHatInsights/bonfire/master/cicd
curl -s $CICD_URL/bootstrap.sh > .cicd_bootstrap.sh && source .cicd_bootstrap.sh
Expand Down

0 comments on commit 67128e1

Please sign in to comment.