MCPcopy
hub / github.com/skip2/go-qrcode / versionInfo

Method versionInfo

version.go:2938–2947  ·  view source on GitHub ↗

versionInfo returns the 18-bit Version Information value for a QR Code. Version Information is applicable only to QR Codes versions 7-40 inclusive. nil is returned if Version Information is not required.

()

Source from the content-addressed store, hash-verified

2936// Version Information is applicable only to QR Codes versions 7-40 inclusive.
2937// nil is returned if Version Information is not required.
2938func (v qrCodeVersion) versionInfo() *bitset.Bitset {
2939 if v.version < 7 {
2940 return nil
2941 }
2942
2943 result := bitset.New()
2944 result.AppendUint32(versionBitSequence[v.version], 18)
2945
2946 return result
2947}
2948
2949// numDataBits returns the data capacity in bits.
2950func (v qrCodeVersion) numDataBits() int {

Callers 2

TestVersionInfoFunction · 0.95
addVersionInfoMethod · 0.80

Calls 2

NewFunction · 0.92
AppendUint32Method · 0.80

Tested by 1

TestVersionInfoFunction · 0.76