docs/generate: remove uses of pkg/errors

While there may be reasons to keep pkg/errors in production code,
we don't need them for this generator code.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2025-02-01 19:49:43 +01:00
parent ecfdf74115
commit 2f795987d6
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C

View File

@ -5,6 +5,7 @@
package main
import (
"errors"
"log"
"os"
@ -12,7 +13,6 @@ import (
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/command/commands"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
)
@ -64,7 +64,7 @@ func gen(opts *options) error {
return err
}
default:
return errors.Errorf("unknown format %q", format)
return errors.New("unknown format: " + format)
}
}