mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-08-02 22:09:49 +00:00
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:
@@ -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 {
|
||||||
|
@@ -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
|
||||||
|
@@ -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 (
|
||||||
|
@@ -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.
|
||||||
|
@@ -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"
|
||||||
|
@@ -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
|
||||||
|
@@ -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
|
||||||
|
@@ -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{
|
||||||
|
@@ -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
|
||||||
|
@@ -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
|
||||||
|
@@ -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
|
||||||
|
@@ -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
|
||||||
|
@@ -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.
|
||||||
|
|
||||||
|
@@ -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{
|
||||||
|
@@ -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
|
||||||
|
@@ -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
|
||||||
|
@@ -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
|
||||||
|
@@ -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
2
go.mod
@@ -1,4 +1,4 @@
|
|||||||
module github.com/src-d/enry
|
module github.com/src-d/enry/v2
|
||||||
|
|
||||||
go 1.12
|
go 1.12
|
||||||
|
|
||||||
|
@@ -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{
|
||||||
|
@@ -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 }}
|
||||||
|
|
||||||
|
@@ -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 {
|
||||||
|
@@ -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
|
||||||
|
@@ -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
|
||||||
|
@@ -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{
|
||||||
|
@@ -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
|
||||||
|
@@ -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
|
||||||
|
@@ -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
|
||||||
|
@@ -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
|
||||||
|
@@ -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
|
||||||
|
@@ -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
|
||||||
|
@@ -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
|
||||||
|
@@ -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
|
||||||
|
@@ -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 (
|
||||||
|
@@ -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
|
||||||
|
@@ -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 {
|
||||||
|
Reference in New Issue
Block a user