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
37 changed files with 41 additions and 41 deletions

View File

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

View File

@@ -4,7 +4,7 @@ import (
"math" "math"
"sort" "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 // 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" "sort"
"strings" "strings"
"github.com/src-d/enry" "github.com/src-d/enry/v2"
"github.com/src-d/enry/data" "github.com/src-d/enry/v2/data"
) )
var ( var (

View File

@@ -6,8 +6,8 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"github.com/src-d/enry/data" "github.com/src-d/enry/v2/data"
"github.com/src-d/enry/regex" "github.com/src-d/enry/v2/regex"
) )
// OtherLanguage is used as a zero value when a function can not return a specific language. // 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" "path/filepath"
"testing" "testing"
"github.com/src-d/enry/data" "github.com/src-d/enry/v2/data"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "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 // Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data 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 // Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data 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 // Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data package data
@@ -6,7 +6,7 @@ package data
import ( import (
"regexp" "regexp"
"github.com/src-d/enry/data/rule" "github.com/src-d/enry/v2/data/rule"
) )
var ContentHeuristics = map[string]*Heuristics{ 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 // Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data 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 // Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data 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 // Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data 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 // Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data package data

View File

@@ -1,6 +1,6 @@
package data 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. // Heuristics implements a rule-based content matching engine.

View File

@@ -4,8 +4,8 @@ import (
"regexp" "regexp"
"testing" "testing"
"github.com/src-d/enry/v2/data/rule"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/src-d/enry/data/rule"
) )
var testContentHeuristics = map[string]*Heuristics{ 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 // Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data 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 // Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data 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 // Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data 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 // Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data 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 go 1.12

View File

@@ -3,7 +3,7 @@ package data
import ( import (
"regexp" "regexp"
"github.com/src-d/enry/data/rule" "github.com/src-d/enry/v2/data/rule"
) )
var ContentHeuristics = map[string]*Heuristics{ 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 }} // Extracted from github/linguist commit: {{ getCommit }}

View File

@@ -12,7 +12,7 @@ import (
"strconv" "strconv"
"text/template" "text/template"
"github.com/src-d/enry/internal/tokenizer" "github.com/src-d/enry/v2/internal/tokenizer"
) )
type samplesFrequencies struct { 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 // Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data 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 // Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data 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 // Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data package data
@@ -6,7 +6,7 @@ package data
import ( import (
"regexp" "regexp"
"github.com/src-d/enry/data/rule" "github.com/src-d/enry/v2/data/rule"
) )
var ContentHeuristics = map[string]*Heuristics{ 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 // Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data 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 // Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data 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 // Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data 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 // Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data 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 // Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data 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 // Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data 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 // Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data 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 // Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
package data package data

View File

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

View File

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

View File

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

View File

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