github.com/cilium/cilium@v1.16.2/test/controlplane/suite/flags.go (about)

     1  // SPDX-License-Identifier: Apache-2.0
     2  // Copyright Authors of Cilium
     3  
     4  package suite
     5  
     6  import (
     7  	"flag"
     8  
     9  	"github.com/cilium/cilium/pkg/logging"
    10  )
    11  
    12  // Flags common to controlplane tests.
    13  var (
    14  	FlagUpdate = flag.Bool("update", false, "Update golden test files")
    15  	FlagDebug  = flag.Bool("debug", false, "Enable debug logging")
    16  )
    17  
    18  func ParseFlags() {
    19  	flag.Parse()
    20  	if *FlagDebug {
    21  		logging.SetLogLevelToDebug()
    22  	}
    23  }