Skip to content

Commit

Permalink
chore: include region value in output
Browse files Browse the repository at this point in the history
  • Loading branch information
thisislawatts authored and j-luong committed Nov 28, 2024
1 parent 8897687 commit 402a8cf
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions cliv2/cmd/cliv2/logheader.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (

"github.com/snyk/go-application-framework/pkg/auth"
"github.com/snyk/go-application-framework/pkg/configuration"
localworkflows "github.com/snyk/go-application-framework/pkg/local_workflows"
"github.com/snyk/go-application-framework/pkg/networking"
"github.com/snyk/go-application-framework/pkg/networking/fips"

Expand Down Expand Up @@ -109,6 +110,12 @@ func writeLogHeader(config configuration.Configuration, networkAccess networking
tablePrint("Version", cliv2.GetFullVersion()+" "+buildType)
tablePrint("Platform", userAgent)
tablePrint("API", config.GetString(configuration.API_URL))

region, err := localworkflows.DetermineRegionFromUrl(config.GetString(configuration.API_URL))
if err == nil {
tablePrint("Region", region)
}

tablePrint("Cache", config.GetString(configuration.CACHE_PATH))
tablePrint("Organization", org)
tablePrint("Insecure HTTPS", insecureHTTPS)
Expand Down
2 changes: 1 addition & 1 deletion cliv2/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ require (
github.com/snyk/cli-extension-sbom v0.0.0-20241016065306-0df2be5b3b8f
github.com/snyk/container-cli v0.0.0-20240821111304-7ca1c415a5d7
github.com/snyk/error-catalog-golang-public v0.0.0-20241030160523-0aa643bb7069
github.com/snyk/go-application-framework v0.0.0-20241121110320-ec6ffc91558a
github.com/snyk/go-application-framework v0.0.0-20241128111948-07c460117921
github.com/snyk/go-httpauth v0.0.0-20240307114523-1f5ea3f55c65
github.com/snyk/snyk-iac-capture v0.6.5
github.com/snyk/snyk-ls v0.0.0-20241121152915-97e7af8d285c
Expand Down
4 changes: 2 additions & 2 deletions cliv2/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -760,8 +760,8 @@ github.com/snyk/container-cli v0.0.0-20240821111304-7ca1c415a5d7 h1:Zn5BcV76oFAb
github.com/snyk/container-cli v0.0.0-20240821111304-7ca1c415a5d7/go.mod h1:38w+dcAQp9eG3P5t2eNS9eG0reut10AeJjLv5lJ5lpM=
github.com/snyk/error-catalog-golang-public v0.0.0-20241030160523-0aa643bb7069 h1:Oj/BJAEMEuBjTAQ72UYB4tR0IZKOB2ZtdDnAnJDL1BM=
github.com/snyk/error-catalog-golang-public v0.0.0-20241030160523-0aa643bb7069/go.mod h1:Ytttq7Pw4vOCu9NtRQaOeDU2dhBYUyNBe6kX4+nIIQ4=
github.com/snyk/go-application-framework v0.0.0-20241121110320-ec6ffc91558a h1:JBeM7V7srT5dmF7w0Y06TDxwoU+j0GG3W5YEVfKbnA0=
github.com/snyk/go-application-framework v0.0.0-20241121110320-ec6ffc91558a/go.mod h1:GekIT38VeZQiDw/Ot9Qn0s2kxVR1TXMw6gcaaAiKsVg=
github.com/snyk/go-application-framework v0.0.0-20241128111948-07c460117921 h1:9rBEB8Zfcgr3n8/1owhcrS+K3Ry+1XOcj7xlGojvr2s=
github.com/snyk/go-application-framework v0.0.0-20241128111948-07c460117921/go.mod h1:GekIT38VeZQiDw/Ot9Qn0s2kxVR1TXMw6gcaaAiKsVg=
github.com/snyk/go-httpauth v0.0.0-20240307114523-1f5ea3f55c65 h1:CEQuYv0Go6MEyRCD3YjLYM2u3Oxkx8GpCpFBd4rUTUk=
github.com/snyk/go-httpauth v0.0.0-20240307114523-1f5ea3f55c65/go.mod h1:88KbbvGYlmLgee4OcQ19yr0bNpXpOr2kciOthaSzCAg=
github.com/snyk/policy-engine v0.31.3 h1:FepCg6QN/X8uvxYjF+WwB2aiBPJB+NENDgKQeI/FwLg=
Expand Down

0 comments on commit 402a8cf

Please sign in to comment.