Skip to content

Commit

Permalink
fix: update main.go to follow golang dir standards structure
Browse files Browse the repository at this point in the history
  • Loading branch information
redhatrises committed Jun 27, 2023
1 parent d7eb47b commit b12a949
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ COPY go.sum go.sum
RUN go mod download

# Copy the go source
COPY main.go main.go
COPY cmd/main.go cmd/main.go
COPY version/ version/
COPY apis/ apis/
COPY controllers/ controllers/
Expand All @@ -27,7 +27,7 @@ COPY pkg/ pkg/
RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -tags \
"exclude_graphdriver_devicemapper exclude_graphdriver_btrfs containers_image_openpgp" \
--ldflags="-X 'github.com/crowdstrike/falcon-operator/version.Version=${VERSION}'" \
-o manager main.go
-o manager cmd/main.go

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,11 @@ build: manifests generate fmt vet ## Build manager binary.
go build -a \
-tags "exclude_graphdriver_devicemapper exclude_graphdriver_btrfs containers_image_openpgp" \
--ldflags="-X 'github.com/crowdstrike/falcon-operator/version.Version=$(VERSION)'" \
-o bin/manager main.go
-o bin/manager cmd/main.go

.PHONY: run
run: manifests generate fmt vet ## Run a controller from your host.
go run ./main.go
go run ./cmd/main.go

# If you wish built the manager image targeting other platforms you can use the --platform flag.
# (i.e. docker build --platform linux/arm64 ). However, you must enable docker buildKit for it.
Expand Down
File renamed without changes.

0 comments on commit b12a949

Please sign in to comment.