Skip to content

Commit 1cf751c

Browse files
committed
Small godoc fixes
Signed-off-by: Filip Petrov <[email protected]>
1 parent 5f6c503 commit 1cf751c

File tree

10 files changed

+28
-15
lines changed

10 files changed

+28
-15
lines changed

example/app/application.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
package app
33

44
import (
5-
"github.com/go-autowire/autowire/pkg"
65
"log"
76

7+
"github.com/go-autowire/autowire/pkg"
8+
89
"github.com/go-autowire/autowire/example/configuration"
910
"github.com/go-autowire/autowire/example/service"
1011
)

example/autowire_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
package example
22

33
import (
4-
"github.com/go-autowire/autowire/example/app"
5-
"github.com/go-autowire/autowire/pkg"
6-
"github.com/go-autowire/autowire/pkg/atesting"
74
"log"
85
"math/big"
96
"testing"
7+
8+
"github.com/go-autowire/autowire/example/app"
9+
"github.com/go-autowire/autowire/pkg"
10+
"github.com/go-autowire/autowire/pkg/atesting"
1011
)
1112

1213
type TestPaymentServiceTest struct {

pkg/atesting/testing.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ package atesting
33

44
import (
55
"container/list"
6-
"github.com/go-autowire/autowire/pkg"
7-
"github.com/go-autowire/autowire/pkg/internal"
86
"log"
97
"reflect"
8+
9+
"github.com/go-autowire/autowire/pkg"
10+
"github.com/go-autowire/autowire/pkg/internal"
1011
)
1112

1213
// Spy Function is replacing object field with the one provided in the function as a variadic arguments.

pkg/atesting/testing_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
package atesting_test
22

33
import (
4+
"testing"
5+
46
"github.com/go-autowire/autowire/pkg"
57
"github.com/go-autowire/autowire/pkg/atesting"
68
"github.com/stretchr/testify/assert"
7-
"testing"
89
)
910

1011
type FooEr interface {

pkg/autowire.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
package pkg
22

33
import (
4-
"github.com/go-autowire/autowire/pkg/internal"
54
"io"
65
"log"
76
"reflect"
87
"regexp"
98
"strings"
9+
10+
"github.com/go-autowire/autowire/pkg/internal"
1011
)
1112

1213
var (

pkg/autowire_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ package pkg
22

33
import (
44
"fmt"
5+
"reflect"
6+
"testing"
7+
58
"github.com/go-autowire/autowire/pkg/internal"
69
"github.com/go-autowire/autowire/pkg/internal/fake"
710
"github.com/stretchr/testify/assert"
8-
"reflect"
9-
"testing"
1011
)
1112

1213
const (

pkg/internal/doc.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// Package internal holds unexported api code
2+
package internal

pkg/internal/profile.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,18 @@ import (
66
"strings"
77
)
88

9-
type profile uint64
9+
// Profile represents enum type
10+
type Profile uint64
1011

1112
const (
12-
Production profile = iota
13+
// Production profile
14+
Production Profile = iota
15+
// Testing profile
1316
Testing
1417
)
1518

16-
func GetProfile() profile {
19+
// GetProfile function returns current profile
20+
func GetProfile() Profile {
1721
args := os.Args
1822
programName := args[0][strings.LastIndex(args[0], "/"):]
1923
if result, _ := regexp.MatchString("/.*[Tt]est", programName); result {

pkg/internal/profile_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ import (
77
func Test_Profile(t *testing.T) {
88
profile := GetProfile()
99
if profile != Testing {
10-
t.Errorf("Expected profile testing found active")
10+
t.Errorf("Expected Profile testing found active")
1111
}
1212
}

pkg/internal/reflect_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
package internal
22

33
import (
4-
"github.com/stretchr/testify/assert"
54
"reflect"
65
"testing"
6+
7+
"github.com/stretchr/testify/assert"
78
)
89

910
const unexportedField = "unexported"

0 commit comments

Comments
 (0)