Add offline option to scan and configtest (#588)
Add offline option to scan and configtest
This commit is contained in:
		@@ -103,6 +103,8 @@ type Config struct {
 | 
			
		||||
 | 
			
		||||
	SSHNative      bool
 | 
			
		||||
	ContainersOnly bool
 | 
			
		||||
	Fast           bool
 | 
			
		||||
	Offline        bool
 | 
			
		||||
	Deep           bool
 | 
			
		||||
	SkipBroken     bool
 | 
			
		||||
 | 
			
		||||
@@ -198,6 +200,16 @@ func (c Config) ValidateOnScan() bool {
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	numTrue := 0
 | 
			
		||||
	for _, b := range []bool{c.Fast, c.Offline, c.Deep} {
 | 
			
		||||
		if b {
 | 
			
		||||
			numTrue++
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	if numTrue != 1 {
 | 
			
		||||
		errs = append(errs, fmt.Errorf("Specify only one of -fast, -fast-offline, -deep"))
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	_, err := valid.ValidateStruct(c)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		errs = append(errs, err)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user