Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

Commit f27c34e

Browse files
committed
golint fixes
1 parent b8e0254 commit f27c34e

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

cmd/dep/godep_importer.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ import (
1717
"github.com/pkg/errors"
1818
)
1919

20-
const godepJsonName = "Godeps.json"
20+
const godepJSONName = "Godeps.json"
2121

2222
type godepImporter struct {
23-
json godepJson
23+
json godepJSON
2424

2525
logger *log.Logger
2626
verbose bool
@@ -35,7 +35,7 @@ func newGodepImporter(logger *log.Logger, verbose bool, sm gps.SourceManager) *g
3535
}
3636
}
3737

38-
type godepJson struct {
38+
type godepJSON struct {
3939
Name string `json:"ImportPath"`
4040
Imports []godepPackage `json:"Deps"`
4141
}
@@ -51,7 +51,7 @@ func (g *godepImporter) Name() string {
5151
}
5252

5353
func (g *godepImporter) HasDepMetadata(dir string) bool {
54-
y := filepath.Join(dir, "Godeps", godepJsonName)
54+
y := filepath.Join(dir, "Godeps", godepJSONName)
5555
if _, err := os.Stat(y); err != nil {
5656
return false
5757
}
@@ -70,7 +70,7 @@ func (g *godepImporter) Import(dir string, pr gps.ProjectRoot) (*dep.Manifest, *
7070

7171
func (g *godepImporter) load(projectDir string) error {
7272
g.logger.Println("Detected godep configuration files...")
73-
j := filepath.Join(projectDir, "Godeps", godepJsonName)
73+
j := filepath.Join(projectDir, "Godeps", godepJSONName)
7474
if g.verbose {
7575
g.logger.Printf(" Loading %s", j)
7676
}

cmd/dep/godep_importer_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func TestGodepConfig_Import(t *testing.T) {
2525
h.TempDir(cacheDir)
2626
h.TempDir("src")
2727
h.TempDir(filepath.Join("src", testGodepProjectRoot))
28-
h.TempCopy(filepath.Join(testGodepProjectRoot, "Godeps", godepJsonName), "godep/Godeps.json")
28+
h.TempCopy(filepath.Join(testGodepProjectRoot, "Godeps", godepJSONName), "godep/Godeps.json")
2929

3030
projectRoot := h.Path(testGodepProjectRoot)
3131
sm, err := gps.NewSourceManager(h.Path(cacheDir))
@@ -68,7 +68,7 @@ func TestGodepConfig_Import(t *testing.T) {
6868

6969
func TestGodepConfig_JsonLoad(t *testing.T) {
7070
// This is same as cmd/dep/testdata/Godeps.json
71-
wantJSON := godepJson{
71+
wantJSON := godepJSON{
7272
Name: "github.com/golang/notexist",
7373
Imports: []godepPackage{
7474
{
@@ -88,7 +88,7 @@ func TestGodepConfig_JsonLoad(t *testing.T) {
8888

8989
ctx := newTestContext(h)
9090

91-
h.TempCopy(filepath.Join(testGodepProjectRoot, "Godeps", godepJsonName), "godep/Godeps.json")
91+
h.TempCopy(filepath.Join(testGodepProjectRoot, "Godeps", godepJSONName), "godep/Godeps.json")
9292

9393
projectRoot := h.Path(testGodepProjectRoot)
9494

@@ -117,7 +117,7 @@ func TestGodepConfig_ConvertProject(t *testing.T) {
117117
defer sm.Release()
118118

119119
g := newGodepImporter(discardLogger, true, sm)
120-
g.json = godepJson{
120+
g.json = godepJSON{
121121
Name: "github.com/foo/bar",
122122
Imports: []godepPackage{
123123
{
@@ -177,7 +177,7 @@ func TestGodepConfig_ConvertProject_EmptyComment(t *testing.T) {
177177
defer sm.Release()
178178

179179
g := newGodepImporter(discardLogger, true, sm)
180-
g.json = godepJson{
180+
g.json = godepJSON{
181181
Name: "github.com/foo/bar",
182182
Imports: []godepPackage{
183183
{
@@ -227,7 +227,7 @@ func TestGodepConfig_ConvertProject_EmptyComment(t *testing.T) {
227227

228228
func TestGodepConfig_Convert_BadInput_EmptyPackageName(t *testing.T) {
229229
g := newGodepImporter(discardLogger, true, nil)
230-
g.json = godepJson{
230+
g.json = godepJSON{
231231
Imports: []godepPackage{{ImportPath: ""}},
232232
}
233233

0 commit comments

Comments
 (0)