From 12f3f0abc76db4319de8036959dc3a6d060838fe Mon Sep 17 00:00:00 2001
From: Nik <njunger@uwaterloo.ca>
Date: Wed, 6 Jun 2018 00:39:36 -0400
Subject: [PATCH] Minor format and vet fixes

---
 doc_test.go | 6 +++++-
 utils.go    | 4 ++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/doc_test.go b/doc_test.go
index 4dce3a6..14bcdc1 100644
--- a/doc_test.go
+++ b/doc_test.go
@@ -50,7 +50,11 @@ func Example() {
 }
 
 // This example displays an element in a variety of formats.
-func ExampleElement_Format(element *pbc.Element) {
+func ExampleElement_Format() {
+	var element *pbc.Element
+
+	// ...populate element...
+
 	fmt.Printf("%v", element)    // Print in PBC format
 	fmt.Printf("%s", element)    // Same as above
 	fmt.Printf("%36v", element)  // Print in PBC format, base 36
diff --git a/utils.go b/utils.go
index d41b365..1af0252 100644
--- a/utils.go
+++ b/utils.go
@@ -81,8 +81,8 @@ func SetRandomProvider(provider RandomSource) {
 
 //export goGenerateRandom
 func goGenerateRandom(out, limit unsafe.Pointer) {
-	outMpz := &mpz{i: *(*C.mpz_t)(out) }
-	limitMpz := &mpz{i: *(*C.mpz_t)(limit) }
+	outMpz := &mpz{i: *(*C.mpz_t)(out)}
+	limitMpz := &mpz{i: *(*C.mpz_t)(limit)}
 	r := randomProvider.Rand(mpz2big(limitMpz))
 	big2thisMpz(r, outMpz)
 }
-- 
GitLab