google / google/go-tpm

reduce repetitive, nested structs by proving a defaults package

Open
#303 1 comment 0 reactions 0 assignees View on GitHub
tpmdirect
Dominant language
Go
Stars
673
Forks
188
PR merge metrics
No merged PRs in 30d

Description

#300 had

> Nested Structs make writing code confusing

#300 suggested a number of ideas here.

* Using tags/sizing and reducing the number of nesting done
* Add more default templates users can use. For more specific structs, such as tpmu.PublicParams adding all most commonly used would be nice to have for users. For broader structs like tpmt.Public, having examples to follow should suffice.
* Add a way to pick common combinations of tpma.Object aside for manually setting true for each specific field.

Contributor guide

Open the contributing guide

Research direction

Start by reading issue #300 and locating the tpmu.PublicParams, tpmt.Public, and tpma.Object structs mentioned here. Compare the proposed defaults, tags or sizing changes, and common combinations before defining a focused scope; done should mean one agreed defaults-package design with clear examples and validation criteria.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.