Skip to content

Commit 1479e9e

Browse files
author
Miguel Molina
committed
change imports for v1.0 release
1 parent 7c38928 commit 1479e9e

29 files changed

+73
-67
lines changed

.travis.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ language: go
22

33
go:
44
- 1.7
5+
- 1.8
56
- tip
67

78
matrix:
@@ -21,8 +22,12 @@ before_script:
2122
- psql -c 'create database kallax_test;' -U postgres
2223

2324
install:
24-
- go get -t -v .
25-
- go get -t -v ./generator/...
25+
- rm -rf $GOPATH/src/gopkg.in/src-d
26+
- mkdir -p $GOPATH/src/gopkg.in/src-d
27+
- mv $PWD $GOPATH/src/gopkg.in/src-d/go-kallax.v1
28+
- cd $GOPATH/src/gopkg.in/src-d/go-kallax.v1
29+
- go get -v -t .
30+
- go get -v -t ./generator/...
2631

2732
script:
2833
- make test

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ test:
2020
done; \
2121
go install ./generator/...; \
2222
go generate ./tests/...; \
23+
git diff --no-prefix -U1000; \
2324
if [ `git status | grep 'Changes not staged for commit' | wc -l` != '0' ]; then \
2425
echo 'There are differences between the commited tests/kallax.go and the one generated right now'; \
2526
exit 2; \

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<img src="https://cdn.rawgit.com/src-d/go-kallax/master/kallax.svg" width="400" />
22
=============================
33

4-
[![GoDoc](https://godoc.org/github.com/src-d/go-kallax?status.svg)](https://godoc.org/github.com/src-d/go-kallax) [![Build Status](https://travis-ci.org/src-d/go-kallax.svg?branch=master)](https://travis-ci.org/src-d/go-kallax) [![codecov](https://codecov.io/gh/src-d/go-kallax/branch/master/graph/badge.svg)](https://codecov.io/gh/src-d/go-kallax) [![Go Report Card](https://goreportcard.com/badge/github.com/src-d/go-kallax)](https://goreportcard.com/report/github.com/src-d/go-kallax) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
4+
[![GoDoc](https://godoc.org/gopkg.in/src-d/go-kallax.v1?status.svg)](https://godoc.org/gopkg.in/src-d/go-kallax.v1) [![Build Status](https://travis-ci.org/src-d/go-kallax.svg?branch=master)](https://travis-ci.org/src-d/go-kallax) [![codecov](https://codecov.io/gh/src-d/go-kallax/branch/master/graph/badge.svg)](https://codecov.io/gh/src-d/go-kallax) [![Go Report Card](https://goreportcard.com/badge/github.com/src-d/go-kallax)](https://goreportcard.com/report/github.com/src-d/go-kallax) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
55

66

77
Kallax is a PostgreSQL typesafe ORM for the Go language.
@@ -42,7 +42,7 @@ Support for arrays of all basic Go types and all JSON and arrays operators is pr
4242
The recommended way to install `kallax` is:
4343

4444
```
45-
go get -u github.com/src-d/kallax/...
45+
go get -u gopkg.in/src-d/kallax.v1/...
4646
```
4747

4848
> *kallax* includes a binary tool used by [go generate](http://blog.golang.org/generate),

doc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
// for example, `sql.NullInt64`.
1111
// Support for arrays of all basic Go types and all JSON and arrays operators is
1212
// provided as well.
13-
package kallax
13+
package kallax // import "gopkg.in/src-d/go-kallax.v1"

generator/cli/kallax/cmd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"os"
77
"path/filepath"
88

9-
"github.com/src-d/go-kallax/generator"
9+
"gopkg.in/src-d/go-kallax.v1/generator"
1010

1111
"gopkg.in/urfave/cli.v1"
1212
)

generator/generator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Package generator implements the processor of source code and generator of
22
// kallax models based on Go source code.
3-
package generator
3+
package generator // import "gopkg.in/src-d/go-kallax.v1/generator"
44

55
import (
66
"fmt"

generator/processor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717

1818
const (
1919
// BaseModel is the type name of the kallax base model.
20-
BaseModel = "github.com/src-d/go-kallax.Model"
20+
BaseModel = "gopkg.in/src-d/go-kallax.v1.Model"
2121
//URL is the type name of the net/url.URL.
2222
URL = "url.URL"
2323
)

generator/processor_test.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func (s *ProcessorSuite) TestInlineStruct() {
2222
fixtureSrc := `
2323
package fixture
2424
25-
import "github.com/src-d/go-kallax"
25+
import "gopkg.in/src-d/go-kallax.v1"
2626
2727
type Foo struct {}
2828
@@ -42,7 +42,7 @@ func (s *ProcessorSuite) TestTags() {
4242
fixtureSrc := `
4343
package fixture
4444
45-
import "github.com/src-d/go-kallax"
45+
import "gopkg.in/src-d/go-kallax.v1"
4646
4747
type Foo struct {
4848
kallax.Model
@@ -59,7 +59,7 @@ func (s *ProcessorSuite) TestRecursiveModel() {
5959
fixtureSrc := `
6060
package fixture
6161
62-
import "github.com/src-d/go-kallax"
62+
import "gopkg.in/src-d/go-kallax.v1"
6363
6464
type Recur struct {
6565
kallax.Model
@@ -80,7 +80,7 @@ func (s *ProcessorSuite) TestDeepRecursiveStruct() {
8080
fixtureSrc := `
8181
package fixture
8282
83-
import "github.com/src-d/go-kallax"
83+
import "gopkg.in/src-d/go-kallax.v1"
8484
8585
type Recur struct {
8686
kallax.Model
@@ -109,7 +109,7 @@ func (s *ProcessorSuite) TestIsEventPresent() {
109109
fixtureSrc := `
110110
package fixture
111111
112-
import "github.com/src-d/go-kallax"
112+
import "gopkg.in/src-d/go-kallax.v1"
113113
114114
type Foo struct {
115115
kallax.Model
@@ -148,7 +148,7 @@ func (s *ProcessorSuite) TestProcessField() {
148148
fixtureSrc := `
149149
package fixture
150150
151-
import "github.com/src-d/go-kallax"
151+
import "gopkg.in/src-d/go-kallax.v1"
152152
import "database/sql/driver"
153153
154154
type BasicAlias string
@@ -246,7 +246,7 @@ func (s *ProcessorSuite) TestCtor() {
246246
fixtureSrc := `
247247
package fixture
248248
249-
import "github.com/src-d/go-kallax"
249+
import "gopkg.in/src-d/go-kallax.v1"
250250
251251
type Foo struct {
252252
kallax.Model
@@ -269,7 +269,7 @@ func (s *ProcessorSuite) TestSQLTypeIsInterface() {
269269
fixtureSrc := `
270270
package fixture
271271
272-
import "github.com/src-d/go-kallax"
272+
import "gopkg.in/src-d/go-kallax.v1"
273273
import "database/sql/driver"
274274
275275
type Foo struct {
@@ -298,7 +298,7 @@ func (s *ProcessorSuite) TestIsSQLType() {
298298
fixtureSrc := `
299299
package fixture
300300
301-
import "github.com/src-d/go-kallax"
301+
import "gopkg.in/src-d/go-kallax.v1"
302302
303303
type SQLTypeFixture struct {
304304
kallax.Model
@@ -340,7 +340,7 @@ func (s *ProcessorSuite) processFixture(source string) *Package {
340340
}
341341

342342
func (s *ProcessorSuite) TestDo() {
343-
p := NewProcessor(filepath.Join(goPath, "src", "github.com/src-d/go-kallax"), []string{"README.md"})
343+
p := NewProcessor(filepath.Join(goPath, "src", "gopkg.in/src-d/go-kallax.v1"), []string{"README.md"})
344344
pkg, err := p.Do()
345345
s.NotNil(pkg)
346346
s.NoError(err)
@@ -350,7 +350,7 @@ func (s *ProcessorSuite) TestIsModel() {
350350
src := `
351351
package fixture
352352
353-
import "github.com/src-d/go-kallax"
353+
import "gopkg.in/src-d/go-kallax.v1"
354354
355355
type Bar struct {
356356
kallax.Model
@@ -392,7 +392,7 @@ func (s *ProcessorSuite) TestIsEmbedded() {
392392
src := `
393393
package fixture
394394
395-
import "github.com/src-d/go-kallax"
395+
import "gopkg.in/src-d/go-kallax.v1"
396396
397397
type Bar struct {
398398
kallax.Model

generator/template.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ func printDocumentWithNumbers(code string) {
425425
}
426426

427427
func loadTemplateText(filename string) string {
428-
filename = filepath.Join(build.Default.GOPATH, "src/github.com/src-d/go-kallax/generator", filename)
428+
filename = filepath.Join(build.Default.GOPATH, "src/gopkg.in/src-d/go-kallax.v1/generator", filename)
429429
f, err := os.Open(filename)
430430
if err != nil {
431431
panic(err)

generator/template_test.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ return kallax.VirtualColumn("foo_id", r, new(kallax.NumericID)), nil
7171
const baseTpl = `
7272
package fixture
7373
74-
import "github.com/src-d/go-kallax"
74+
import "gopkg.in/src-d/go-kallax.v1"
7575
import "net/url"
7676
7777
type Rel struct {
@@ -143,7 +143,7 @@ func (s *TemplateSuite) TestGenColumnValues() {
143143
s.processSource(`
144144
package fixture
145145
146-
import "github.com/src-d/go-kallax"
146+
import "gopkg.in/src-d/go-kallax.v1"
147147
import "net/url"
148148
149149
type Aliased string
@@ -201,7 +201,7 @@ func (s *TemplateSuite) TestGenModelColumns() {
201201
const jsonBaseTpl = `
202202
package fixture
203203
204-
import "github.com/src-d/go-kallax"
204+
import "gopkg.in/src-d/go-kallax.v1"
205205
import "net/url"
206206
207207
type Rel struct {
@@ -337,7 +337,7 @@ func (s *TemplateSuite) TestGenTypeName() {
337337
s.processSource(`
338338
package fixture
339339
340-
import "github.com/src-d/go-kallax"
340+
import "gopkg.in/src-d/go-kallax.v1"
341341
import "net/url"
342342
343343
type Foo struct {
@@ -372,7 +372,7 @@ func (s *TemplateSuite) TestIsPtrSlice() {
372372
s.processSource(`
373373
package fixture
374374
375-
import "github.com/src-d/go-kallax"
375+
import "gopkg.in/src-d/go-kallax.v1"
376376
import "net/url"
377377
378378
type Foo struct {
@@ -425,8 +425,8 @@ func (s *ProcessorSuite) TestFindableTypeName() {
425425
426426
import "time"
427427
import "net/url"
428-
import "github.com/src-d/go-kallax"
429-
import "github.com/src-d/go-kallax/tests/fixtures"
428+
import "gopkg.in/src-d/go-kallax.v1"
429+
import "gopkg.in/src-d/go-kallax.v1/tests/fixtures"
430430
431431
type mainFixture struct {
432432
kallax.Model
@@ -522,8 +522,8 @@ func (s *ProcessorSuite) TestLookupValid() {
522522
523523
import "time"
524524
import "net/url"
525-
import "github.com/src-d/go-kallax"
526-
import "github.com/src-d/go-kallax/tests/fixtures"
525+
import "gopkg.in/src-d/go-kallax.v1"
526+
import "gopkg.in/src-d/go-kallax.v1/tests/fixtures"
527527
528528
type mainFixture struct {
529529
kallax.Model
@@ -638,8 +638,8 @@ func (s *ProcessorSuite) TestShortName() {
638638
639639
import "time"
640640
import "net/url"
641-
import "github.com/src-d/go-kallax"
642-
import "github.com/src-d/go-kallax/tests/fixtures"
641+
import "gopkg.in/src-d/go-kallax.v1"
642+
import "gopkg.in/src-d/go-kallax.v1/tests/fixtures"
643643
644644
type mainFixture struct {
645645
kallax.Model

0 commit comments

Comments
 (0)