Skip to content

Commit

Permalink
changes on env file.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahsa committed Jan 8, 2024
1 parent 3dd8794 commit 9cc76d3
Show file tree
Hide file tree
Showing 4 changed files with 156 additions and 10 deletions.
1 change: 0 additions & 1 deletion clients/harbor-client/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ require (
github.com/ghodss/yaml v1.0.0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/gorilla/mux v1.8.1 // indirect
github.com/joho/godotenv v1.5.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
Expand Down
2 changes: 0 additions & 2 deletions clients/harbor-client/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
Expand Down
7 changes: 0 additions & 7 deletions clients/harbor-client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (

"github.com/containers/image/docker"
"github.com/containers/image/types"
"github.com/joho/godotenv"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
)
Expand Down Expand Up @@ -44,11 +43,6 @@ func pullImage(imageRef types.ImageReference) {
}

func main() {
err := godotenv.Load()
if err != nil {
log.Println("Error loading .env file:", err)
}

imageRefStr := os.Getenv("IMAGE_REFERENCE")
if imageRefStr == "" {
log.Fatal("IMAGE_REFERENCE environment variable not set")
Expand All @@ -72,7 +66,6 @@ func main() {

ctx, cancel := context.WithCancel(context.Background())

// Handle signals for graceful shutdown
signalCh := make(chan os.Signal, 1)
signal.Notify(signalCh, syscall.SIGINT, syscall.SIGTERM)

Expand Down
Loading

0 comments on commit 9cc76d3

Please sign in to comment.