diff options
| author | mo khan <mo@mokhan.ca> | 2025-05-28 21:27:37 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-05-28 21:27:37 -0600 |
| commit | 0a96d6e1482ffb5f9224b4103193eac4340b728a (patch) | |
| tree | 96c00fa1f1fafb5750f3aa6badf2d8316b97de53 /vendor/github.com/containerd/errdefs/pkg/internal | |
| parent | cf1050dba0f0b0b26d18ce45ae2c8821153759bd (diff) | |
chore: update modules
Diffstat (limited to 'vendor/github.com/containerd/errdefs/pkg/internal')
| -rw-r--r-- | vendor/github.com/containerd/errdefs/pkg/internal/cause/cause.go | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/vendor/github.com/containerd/errdefs/pkg/internal/cause/cause.go b/vendor/github.com/containerd/errdefs/pkg/internal/cause/cause.go new file mode 100644 index 0000000..d88756b --- /dev/null +++ b/vendor/github.com/containerd/errdefs/pkg/internal/cause/cause.go @@ -0,0 +1,33 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +// Package cause is used to define root causes for errors +// common to errors packages like grpc and http. +package cause + +import "fmt" + +type ErrUnexpectedStatus struct { + Status int +} + +const UnexpectedStatusPrefix = "unexpected status " + +func (e ErrUnexpectedStatus) Error() string { + return fmt.Sprintf("%s%d", UnexpectedStatusPrefix, e.Status) +} + +func (ErrUnexpectedStatus) Unknown() {} |
