Move pkg to cmd/nvidia-container-toolkit

This change moves the pkg folder to `cmd/nvidia-container-toolkit` to
better match go best practices. This allows, for example, for the
`cmd/nvidia-container-toolkit` to be go installed.

The only package included in `pkg` was `main`.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar 2021-06-08 15:20:17 +02:00
parent f25698e96e
commit f72b79cc2a
7 changed files with 2 additions and 3 deletions

View File

@ -21,17 +21,16 @@ LIB_VERSION := 1.5.0
LIB_TAG ?= LIB_TAG ?=
GOLANG_VERSION := 1.16.3 GOLANG_VERSION := 1.16.3
GOLANG_PKG_PATH := github.com/NVIDIA/nvidia-container-toolkit/pkg MODULE := github.com/NVIDIA/nvidia-container-toolkit
# By default run all native docker-based targets # By default run all native docker-based targets
docker-native: docker-native:
include $(CURDIR)/docker/docker.mk include $(CURDIR)/docker/docker.mk
binary: binary:
go build -ldflags "-s -w" -o "$(LIB_NAME)" $(GOLANG_PKG_PATH) go build -ldflags "-s -w" -o "$(LIB_NAME)" $(MODULE)/cmd/$(LIB_NAME)
# Define the check targets for the Golang codebase # Define the check targets for the Golang codebase
MODULE := .
.PHONY: check fmt assert-fmt ineffassign lint misspell vet .PHONY: check fmt assert-fmt ineffassign lint misspell vet
check: assert-fmt lint misspell vet check: assert-fmt lint misspell vet
fmt: fmt: