modules: prepare for v2 release

- update go.mod \w v2
 - update all import paths

Signed-off-by: Alexander Bezzubov <bzz@apache.org>
This commit is contained in:
Alexander Bezzubov 2019-04-14 21:28:12 +02:00
parent 453caf7d19
commit 6a5f37e9e2
No known key found for this signature in database
GPG Key ID: 8039F5787EFCD05D
37 changed files with 41 additions and 41 deletions

View File

@ -10,7 +10,7 @@ import (
"path/filepath"
"testing"
"github.com/src-d/enry/data"
"github.com/src-d/enry/v2/data"
)
type sample struct {

View File

@ -4,7 +4,7 @@ import (
"math"
"sort"
"github.com/src-d/enry/internal/tokenizer"
"github.com/src-d/enry/v2/internal/tokenizer"
)
// Classifier is the interface in charge to detect the possible languages of the given content based on a set of

View File

@ -14,8 +14,8 @@ import (
"sort"
"strings"
"github.com/src-d/enry"
"github.com/src-d/enry/data"
"github.com/src-d/enry/v2"
"github.com/src-d/enry/v2/data"
)
var (

View File

@ -6,8 +6,8 @@ import (
"path/filepath"
"strings"
"github.com/src-d/enry/data"
"github.com/src-d/enry/regex"
"github.com/src-d/enry/v2/data"
"github.com/src-d/enry/v2/regex"
)
// OtherLanguage is used as a zero value when a function can not return a specific language.

View File

@ -8,7 +8,7 @@ import (
"path/filepath"
"testing"
"github.com/src-d/enry/data"
"github.com/src-d/enry/v2/data"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/internal/code-generator DO NOT EDIT.
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/internal/code-generator DO NOT EDIT.
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/internal/code-generator DO NOT EDIT.
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data
@ -6,7 +6,7 @@ package data
import (
"regexp"
"github.com/src-d/enry/data/rule"
"github.com/src-d/enry/v2/data/rule"
)
var ContentHeuristics = map[string]*Heuristics{

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/internal/code-generator DO NOT EDIT.
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/internal/code-generator DO NOT EDIT.
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/internal/code-generator DO NOT EDIT.
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/internal/code-generator DO NOT EDIT.
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data

View File

@ -1,6 +1,6 @@
package data
import "github.com/src-d/enry/data/rule"
import "github.com/src-d/enry/v2/data/rule"
// Heuristics implements a rule-based content matching engine.

View File

@ -4,8 +4,8 @@ import (
"regexp"
"testing"
"github.com/src-d/enry/v2/data/rule"
"github.com/stretchr/testify/assert"
"github.com/src-d/enry/data/rule"
)
var testContentHeuristics = map[string]*Heuristics{

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/internal/code-generator DO NOT EDIT.
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/internal/code-generator DO NOT EDIT.
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/internal/code-generator DO NOT EDIT.
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/internal/code-generator DO NOT EDIT.
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data

2
go.mod
View File

@ -1,4 +1,4 @@
module github.com/src-d/enry
module github.com/src-d/enry/v2
go 1.12

View File

@ -3,7 +3,7 @@ package data
import (
"regexp"
"github.com/src-d/enry/data/rule"
"github.com/src-d/enry/v2/data/rule"
)
var ContentHeuristics = map[string]*Heuristics{

View File

@ -1,3 +1,3 @@
// Code generated by github.com/src-d/enry/internal/code-generator DO NOT EDIT.
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: {{ getCommit }}

View File

@ -12,7 +12,7 @@ import (
"strconv"
"text/template"
"github.com/src-d/enry/internal/tokenizer"
"github.com/src-d/enry/v2/internal/tokenizer"
)
type samplesFrequencies struct {

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/internal/code-generator DO NOT EDIT.
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/internal/code-generator DO NOT EDIT.
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/internal/code-generator DO NOT EDIT.
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data
@ -6,7 +6,7 @@ package data
import (
"regexp"
"github.com/src-d/enry/data/rule"
"github.com/src-d/enry/v2/data/rule"
)
var ContentHeuristics = map[string]*Heuristics{

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/internal/code-generator DO NOT EDIT.
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/internal/code-generator DO NOT EDIT.
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/internal/code-generator DO NOT EDIT.
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/internal/code-generator DO NOT EDIT.
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/internal/code-generator DO NOT EDIT.
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/internal/code-generator DO NOT EDIT.
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/internal/code-generator DO NOT EDIT.
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/internal/code-generator DO NOT EDIT.
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data

View File

@ -4,7 +4,7 @@ import (
"io/ioutil"
"log"
"github.com/src-d/enry/internal/code-generator/generator"
"github.com/src-d/enry/v2/internal/code-generator/generator"
)
const (

View File

@ -6,7 +6,7 @@ package tokenizer
import (
"bytes"
"github.com/src-d/enry/regex"
"github.com/src-d/enry/v2/regex"
)
const byteLimit = 100000

View File

@ -4,7 +4,7 @@
package main
import "C"
import "github.com/src-d/enry"
import "github.com/src-d/enry/v2"
//export GetLanguage
func GetLanguage(filename string, content []byte) string {

View File

@ -5,7 +5,7 @@ import (
"path/filepath"
"strings"
"github.com/src-d/enry/data"
"github.com/src-d/enry/v2/data"
)
const binSniffLen = 8000