From fa1236f4341f186d35a5df1efd8862b5407cd1d5 Mon Sep 17 00:00:00 2001 From: Andrew Ayer Date: Wed, 8 Jun 2016 15:57:56 -0700 Subject: [PATCH] Use a switch statement instead of an if statement This will make it cleaner to handle other extension types --- precerts.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/precerts.go b/precerts.go index d3c7b38..dbc2151 100644 --- a/precerts.go +++ b/precerts.go @@ -131,7 +131,9 @@ func ReconstructPrecertTBS (tbs *TBSCertificate) (*TBSCertificate, error) { } for _, ext := range tbs.Extensions { - if !ext.Id.Equal(oidExtensionSCT) { + switch { + case ext.Id.Equal(oidExtensionSCT): + default: precertTBS.Extensions = append(precertTBS.Extensions, ext) } }