github.com/anchore/syft@v1.4.2-0.20240516191711-1bec1fc5d397/cmd/syft/internal/options/update_check.go (about)

     1  package options
     2  
     3  import "github.com/anchore/fangs"
     4  
     5  type UpdateCheck struct {
     6  	CheckForAppUpdate bool `yaml:"check-for-app-update" json:"check-for-app-update" mapstructure:"check-for-app-update"` // whether to check for an application update on start up or not
     7  }
     8  
     9  func DefaultUpdateCheck() UpdateCheck {
    10  	return UpdateCheck{
    11  		CheckForAppUpdate: true,
    12  	}
    13  }
    14  
    15  func (cfg *UpdateCheck) DescribeFields(descriptions fangs.FieldDescriptionSet) {
    16  	descriptions.Add(&cfg.CheckForAppUpdate, "whether to check for an application update on start up or not")
    17  }