mirror of
https://github.com/GoogleContainerTools/kaniko
synced 2026-10-20 20:16:11 +02:00
Update linter and fix errors
* disable linters that are now enabled by default in new version * fix linter errors
This commit is contained in:
@@ -46,7 +46,7 @@ var (
|
||||
func init() {
|
||||
RootCmd.PersistentFlags().StringVarP(&logLevel, "verbosity", "v", constants.DefaultLogLevel, "Log level (debug, info, warn, error, fatal, panic")
|
||||
RootCmd.PersistentFlags().BoolVarP(&force, "force", "", false, "Force building outside of a container")
|
||||
addKanikoOptionsFlags(RootCmd)
|
||||
addKanikoOptionsFlags()
|
||||
addHiddenFlags(RootCmd)
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ var RootCmd = &cobra.Command{
|
||||
}
|
||||
|
||||
// addKanikoOptionsFlags configures opts
|
||||
func addKanikoOptionsFlags(cmd *cobra.Command) {
|
||||
func addKanikoOptionsFlags() {
|
||||
RootCmd.PersistentFlags().StringVarP(&opts.DockerfilePath, "dockerfile", "f", "Dockerfile", "Path to the dockerfile to be built.")
|
||||
RootCmd.PersistentFlags().StringVarP(&opts.SrcContext, "context", "c", "/workspace/", "Path to the dockerfile build context.")
|
||||
RootCmd.PersistentFlags().StringVarP(&opts.Bucket, "bucket", "b", "", "Name of the GCS bucket from which to access build context as tarball.")
|
||||
|
||||
@@ -36,8 +36,8 @@ var (
|
||||
|
||||
func init() {
|
||||
RootCmd.PersistentFlags().StringVarP(&logLevel, "verbosity", "v", constants.DefaultLogLevel, "Log level (debug, info, warn, error, fatal, panic")
|
||||
addKanikoOptionsFlags(RootCmd)
|
||||
addHiddenFlags(RootCmd)
|
||||
addKanikoOptionsFlags()
|
||||
addHiddenFlags()
|
||||
}
|
||||
|
||||
var RootCmd = &cobra.Command{
|
||||
@@ -65,7 +65,7 @@ var RootCmd = &cobra.Command{
|
||||
}
|
||||
|
||||
// addKanikoOptionsFlags configures opts
|
||||
func addKanikoOptionsFlags(cmd *cobra.Command) {
|
||||
func addKanikoOptionsFlags() {
|
||||
RootCmd.PersistentFlags().VarP(&opts.Images, "image", "i", "Image to cache. Set it repeatedly for multiple images.")
|
||||
RootCmd.PersistentFlags().StringVarP(&opts.CacheDir, "cache-dir", "c", "/cache", "Directory of the cache.")
|
||||
RootCmd.PersistentFlags().BoolVarP(&opts.Force, "force", "f", false, "Force cache overwriting.")
|
||||
@@ -73,7 +73,7 @@ func addKanikoOptionsFlags(cmd *cobra.Command) {
|
||||
}
|
||||
|
||||
// addHiddenFlags marks certain flags as hidden from the executor help text
|
||||
func addHiddenFlags(cmd *cobra.Command) {
|
||||
func addHiddenFlags() {
|
||||
RootCmd.PersistentFlags().MarkHidden("azure-container-registry-config")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user