mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
Merge pull request #50209 from thaJeztah/pkg_idtools_deprecate
pkg/idtools: deprecate IdentityMapping, Identity.Chown
This commit is contained in:
@@ -304,7 +304,7 @@ linters:
|
||||
- staticcheck
|
||||
|
||||
# FIXME(thaJeztah): ignoring these transitional utilities until BuildKit is vendored with https://github.com/moby/moby/pull/49743
|
||||
- text: "SA1019: idtools\\.(ToUserIdentityMapping|FromUserIdentityMapping) is deprecated"
|
||||
- text: "SA1019: idtools\\.(ToUserIdentityMapping|FromUserIdentityMapping|IdentityMapping) is deprecated"
|
||||
linters:
|
||||
- staticcheck
|
||||
|
||||
|
||||
@@ -108,12 +108,16 @@ type Identity struct {
|
||||
}
|
||||
|
||||
// Chown changes the numeric uid and gid of the named file to id.UID and id.GID.
|
||||
//
|
||||
// Deprecated: this method is deprecated and will be removed in the next release.
|
||||
func (id Identity) Chown(name string) error {
|
||||
return os.Chown(name, id.UID, id.GID)
|
||||
}
|
||||
|
||||
// IdentityMapping contains a mappings of UIDs and GIDs.
|
||||
// The zero value represents an empty mapping.
|
||||
//
|
||||
// Deprecated: this type is deprecated and will be removed in the next release.
|
||||
type IdentityMapping struct {
|
||||
UIDMaps []IDMap `json:"UIDMaps"`
|
||||
GIDMaps []IDMap `json:"GIDMaps"`
|
||||
|
||||
Reference in New Issue
Block a user