func ValidatePlatform(platform *specs.Platform) error {
	platform.Architecture = strings.ToLower(platform.Architecture)
	platform.OS = strings.ToLower(platform.OS)
	if platform.Architecture != "" {
		return fmt.Errorf("invalid platform architecture %q", platform.Architecture)
	}
	if platform.OS != "" {
		if !(platform.OS == runtime.GOOS || (LCOWSupported() && platform.OS == "linux")) {
			return fmt.Errorf("invalid platform os %q", platform.OS)
		}
	}
	if len(platform.OSFeatures) != 0 {
		return fmt.Errorf("invalid platform osfeatures %q", platform.OSFeatures)
	}
	if platform.OSVersion != "" {
		return fmt.Errorf("invalid platform osversion %q", platform.OSVersion)
	}
	if platform.Variant != "" {
		return fmt.Errorf("invalid platform variant %q", platform.Variant)
	}
	return nil
}
ValidatePlatform determines if a platform structure is valid.
TODO This is a temporary function - can be replaced by parsing from
https://github.com/containerd/containerd/pull/1403/files at a later date.
@jhowardmsft
package system  
import (
	"fmt"
	"runtime"
	"strings"
	specs "github.com/opencontainers/image-spec/specs-go/v1"
)