ax(ueps): expand MarshalAndSign comment to full usage example with error handling
AX Principle 2: comments show concrete usage with realistic values, not minimal call-site only. Single-line comment omitted error handling and downstream use — now shows the complete call pattern. Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
parent
af8f82f95a
commit
ea40c035b5
1 changed files with 2 additions and 0 deletions
|
|
@ -61,6 +61,8 @@ func NewPacketBuilder(intentID uint8, payload []byte) *PacketBuilder {
|
|||
}
|
||||
|
||||
// frame, err := builder.MarshalAndSign([]byte("my-shared-secret"))
|
||||
// if err != nil { return nil, err }
|
||||
// conn.Write(frame) // send signed frame over network
|
||||
func (builder *PacketBuilder) MarshalAndSign(sharedSecret []byte) ([]byte, error) {
|
||||
frameBuffer := new(bytes.Buffer)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue