From 44c1f328adb16aaa949bb58a6966db679ad7931c Mon Sep 17 00:00:00 2001 From: Ervin Oro Date: Wed, 29 Nov 2017 17:36:13 +0200 Subject: [PATCH] Make unknown changes --- graph.go | 2 +- odb.go | 2 +- settings_test.go | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/graph.go b/graph.go index e5d7732..bc2319c 100644 --- a/graph.go +++ b/graph.go @@ -17,7 +17,7 @@ func (repo *Repository) DescendantOf(commit, ancestor *Oid) (bool, error) { return false, MakeGitError(ret) } - return (ret > 0), nil + return ret > 0, nil } func (repo *Repository) AheadBehind(local, upstream *Oid) (ahead, behind int, err error) { diff --git a/odb.go b/odb.go index a728cd3..63c2618 100644 --- a/odb.go +++ b/odb.go @@ -236,7 +236,7 @@ func (object *OdbObject) Data() (data []byte) { len := int(C.git_odb_object_size(object.ptr)) - sliceHeader := (*reflect.SliceHeader)((unsafe.Pointer(&blob))) + sliceHeader := (*reflect.SliceHeader)(unsafe.Pointer(&blob)) sliceHeader.Cap = len sliceHeader.Len = len sliceHeader.Data = uintptr(c_blob) diff --git a/settings_test.go b/settings_test.go index 3a4ce0a..595d076 100644 --- a/settings_test.go +++ b/settings_test.go @@ -11,9 +11,9 @@ type pathPair struct { func TestSearchPath(t *testing.T) { paths := []pathPair{ - pathPair{ConfigLevelSystem, "/tmp/system"}, - pathPair{ConfigLevelGlobal, "/tmp/global"}, - pathPair{ConfigLevelXDG, "/tmp/xdg"}, + {ConfigLevelSystem, "/tmp/system"}, + {ConfigLevelGlobal, "/tmp/global"}, + {ConfigLevelXDG, "/tmp/xdg"}, } for _, pair := range paths {