github.com/Microsoft/azure-vhd-utils@v0.0.0-20230613175315-7c30a3748a1b/vhdcore/footer/vhdFileFormatVersion.go (about)

     1  package footer
     2  
     3  // VhdFileFormatVersion represents the version of the specification used in creating
     4  // the vhd. The version is stored in the vhd footer in big-endian format.
     5  // This is a 4 byte value - most-significant two bytes are for the major version.
     6  // The least-significant two bytes are the minor version
     7  //
     8  type VhdFileFormatVersion uint32
     9  
    10  // VhdFileFormatVersionDefault represents the currently supported vhd specification version.
    11  //
    12  const VhdFileFormatVersionDefault VhdFileFormatVersion = 0x00010000
    13  
    14  // VhdFileFormatVersionNone represents invalid version
    15  //
    16  const VhdFileFormatVersionNone VhdFileFormatVersion = 0
    17  
    18  // IsSupported returns true if this instance represents a supported vhd specification
    19  // version.
    20  //
    21  func (v VhdFileFormatVersion) IsSupported() bool {
    22  	return v == VhdFileFormatVersionDefault
    23  }