ax(ueps): replace variable placeholder with concrete value in writeTLV usage comment
AX Principle 2 requires comments to show concrete usage with realistic values. The writeTLV comment used `intentID` (a variable name) as a placeholder rather than a real value; replaced with `0x01` and added error-capture pattern to show the full call site shape. Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
parent
e08d475c13
commit
00d0e5ed96
1 changed files with 2 additions and 2 deletions
|
|
@ -104,8 +104,8 @@ func (builder *PacketBuilder) MarshalAndSign(sharedSecret []byte) ([]byte, error
|
|||
return frameBuffer.Bytes(), nil
|
||||
}
|
||||
|
||||
// writeTLV(frameBuffer, TagVersion, []byte{0x09})
|
||||
// writeTLV(frameBuffer, TagIntent, []byte{intentID})
|
||||
// if err := writeTLV(buffer, TagVersion, []byte{0x09}); err != nil { return nil, err }
|
||||
// if err := writeTLV(buffer, TagIntent, []byte{0x01}); err != nil { return nil, err }
|
||||
func writeTLV(writer io.Writer, tagType uint8, tagValue []byte) error {
|
||||
// writeTLV(writer, TagVersion, bytes.Repeat([]byte("x"), 256)) → errTLVValueTooLarge
|
||||
if len(tagValue) > 255 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue