diff options
author | Rasmus Dahlberg <rasmus.dahlberg@kau.se> | 2020-10-30 20:40:17 +0100 |
---|---|---|
committer | Rasmus Dahlberg <rasmus.dahlberg@kau.se> | 2020-10-30 20:40:17 +0100 |
commit | f367d220ff99eaee7debb234c3234de6c781359c (patch) | |
tree | 49fda266aaf121e725780d2b7e2d6eb70710c74c /server/testdata/entry/main.go | |
parent | 5426f3bcd1a5ae4fc4b3b831b41c0d667a17e525 (diff) |
refactor types and documentation
Structured files a bit better, added more documentation, switched to
pointers as default (unless specifically motivated not to do so), and
encapsulated TLS (un)marshaling for the respective types that use it.
Diffstat (limited to 'server/testdata/entry/main.go')
-rw-r--r-- | server/testdata/entry/main.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/server/testdata/entry/main.go b/server/testdata/entry/main.go index a849c50..7ab6d4d 100644 --- a/server/testdata/entry/main.go +++ b/server/testdata/entry/main.go @@ -8,7 +8,6 @@ import ( "io/ioutil" "github.com/golang/glog" - "github.com/google/certificate-transparency-go/tls" "github.com/system-transparency/stfe" ) @@ -26,10 +25,9 @@ func main() { checksum := hasher.Sum(nil) // Create and serialize an StItem of type checksum_v1 - item := stfe.NewChecksumV1([]byte(*name), checksum) - serialized, err := tls.Marshal(item) + serialized, err := stfe.NewChecksumV1([]byte(*name), checksum).Marshal() if err != nil { - glog.Fatalf("tls marshal failed: %v", err) + glog.Fatalf("%v", err) } // Store the serialized item in *dir/name |