You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: sbom_flags.go
    path of file: ./repos/trivy/pkg/flag
    
    the code of the file until where you have to start completion: package flag

import (
	"golang.org/x/xerrors"

	"github.co
    
func (f *SBOMFlagGroup) ToOptions() (SBOMOptions, error) {
	if err := parseFlags(f); err != nil {
		return SBOMOptions{}, err
	}

	artifactType := f.ArtifactType.Value()
	sbomFormat := f.SBOMFormat.Value()

	if artifactType != "" || sbomFormat != "" {
		log.Logger.Error("'trivy sbom' is now for scanning SBOM. " +
			"See https://github.com/aquasecurity/trivy/discussions/2407 for the detail")
		return SBOMOptions{}, xerrors.New("'--artifact-type' and '--sbom-format' are no longer available")
	}

	return SBOMOptions{}, nil
}