diff --git a/github/github.go b/github/github.go index faafb54..5907501 100644 --- a/github/github.go +++ b/github/github.go @@ -760,24 +760,12 @@ func cloneRequest(r *http.Request) *http.Request { // Bool is a helper routine that allocates a new bool value // to store v and returns a pointer to it. -func Bool(v bool) *bool { - p := new(bool) - *p = v - return p -} +func Bool(v bool) *bool { return &v } // Int is a helper routine that allocates a new int value // to store v and returns a pointer to it. -func Int(v int) *int { - p := new(int) - *p = v - return p -} +func Int(v int) *int { return &v } // String is a helper routine that allocates a new string value // to store v and returns a pointer to it. -func String(v string) *string { - p := new(string) - *p = v - return p -} +func String(v string) *string { return &v }