Skip to content

Commit

Permalink
Rename GetAttestation to ReadAttestation
Browse files Browse the repository at this point in the history
Internal naming guidelines say to avoid "Get" unless meant for http
GET requests.

Signed-off-by: Dionna Glaze <[email protected]>
  • Loading branch information
deeglaze committed Feb 2, 2024
1 parent da94f91 commit 5349ff7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tools/check/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ func main() {
die(errors.New("cannot specify both -check_crl=true and -network=false"))
}

attestation, err := report.GetAttestation(*infile, *inform)
attestation, err := report.ReadAttestation(*infile, *inform)
if err != nil {
die(err)
}
Expand Down
4 changes: 2 additions & 2 deletions tools/lib/report/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ func ParseAttestation(b []byte, inform string) (*spb.Attestation, error) {
return nil, errors.New("internal error")
}

// GetAttestation reads an attestation report from a file.
func GetAttestation(infile, inform string) (*spb.Attestation, error) {
// ReadAttestation reads an attestation report from a file.
func ReadAttestation(infile, inform string) (*spb.Attestation, error) {
var in io.Reader
var f *os.File
if infile == "-" {
Expand Down
2 changes: 1 addition & 1 deletion tools/show/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func main() {
logger.Init("", false, false, os.Stderr)
flag.Parse()

attestation, err := report.GetAttestation(*infile, *inform)
attestation, err := report.ReadAttestation(*infile, *inform)
if err != nil {
logger.Fatal(err)
}
Expand Down

0 comments on commit 5349ff7

Please sign in to comment.