Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Golang 1.17 compat #337

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Golang 1.17 compat #337

wants to merge 2 commits into from

Conversation

elezar
Copy link
Member

@elezar elezar commented Feb 5, 2024

Some customers need to build the components of the NVIDIA Container Toolkit from source using Golang 1.17.

This MR defines some minor change that allow the project to be built using Go 1.17, with an internal/errors package being used to provide basic errors.Join functionality. This is the only feature we currently use from Go 1.20.

Migrated from https://gitlab.com/nvidia/container-toolkit/container-toolkit/-/merge_requests/516

Copy link
Collaborator

@ArangoGutierrez ArangoGutierrez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only a nit, the rest works for me

@@ -0,0 +1,27 @@
/**
# Copyright 2023 NVIDIA CORPORATION
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

24

//go:build !go1.20

/**
# Copyright 2023 NVIDIA CORPORATION
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

24

//go:build go1.20

/**
# Copyright 2023 NVIDIA CORPORATION
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants