summaryrefslogtreecommitdiff
path: root/src/pkg/asn1
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/asn1')
-rw-r--r--src/pkg/asn1/asn1.go12
-rw-r--r--src/pkg/asn1/asn1_test.go16
2 files changed, 7 insertions, 21 deletions
diff --git a/src/pkg/asn1/asn1.go b/src/pkg/asn1/asn1.go
index e89adb272..642a6ad2b 100644
--- a/src/pkg/asn1/asn1.go
+++ b/src/pkg/asn1/asn1.go
@@ -34,18 +34,14 @@ type StructuralError struct {
Msg string;
}
-func (e StructuralError) String() string {
- return "ASN.1 structure error: " + e.Msg;
-}
+func (e StructuralError) String() string { return "ASN.1 structure error: " + e.Msg }
// A SyntaxError suggests that the ASN.1 data is invalid.
type SyntaxError struct {
Msg string;
}
-func (e SyntaxError) String() string {
- return "ASN.1 syntax error: " + e.Msg;
-}
+func (e SyntaxError) String() string { return "ASN.1 syntax error: " + e.Msg }
// We start by dealing with each of the primitive types in turn.
@@ -190,9 +186,7 @@ func parseBase128Int(bytes []byte, initOffset int) (ret, offset int, err os.Erro
// UTCTime
-func isDigit(b byte) bool {
- return '0' <= b && b <= '9';
-}
+func isDigit(b byte) bool { return '0' <= b && b <= '9' }
// twoDigits returns the value of two, base 10 digits.
func twoDigits(bytes []byte, max int) (int, bool) {
diff --git a/src/pkg/asn1/asn1_test.go b/src/pkg/asn1/asn1_test.go
index ca2729225..f9a7106d9 100644
--- a/src/pkg/asn1/asn1_test.go
+++ b/src/pkg/asn1/asn1_test.go
@@ -190,21 +190,13 @@ type parseFieldParametersTest struct {
out fieldParameters;
}
-func newInt(n int) *int {
- return &n;
-}
+func newInt(n int) *int { return &n }
-func newInt64(n int64) *int64 {
- return &n;
-}
+func newInt64(n int64) *int64 { return &n }
-func newString(s string) *string {
- return &s;
-}
+func newString(s string) *string { return &s }
-func newBool(b bool) *bool {
- return &b;
-}
+func newBool(b bool) *bool { return &b }
var parseFieldParametersTestData []parseFieldParametersTest = []parseFieldParametersTest{
parseFieldParametersTest{"", fieldParameters{false, false, nil, nil}},