forked from mirror/pkger
Fixes high cache miss rate, significant performance increase. Closes #92
This commit is contained in:
parent
c028e66556
commit
efed726c9e
|
@ -8,8 +8,8 @@ import (
|
|||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/gobuffalo/here"
|
||||
"github.com/markbates/pkger"
|
||||
"github.com/markbates/pkger/here"
|
||||
"github.com/markbates/pkger/parser"
|
||||
"github.com/markbates/pkger/pkging/pkgutil"
|
||||
)
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"flag"
|
||||
"os"
|
||||
|
||||
"github.com/gobuffalo/here"
|
||||
"github.com/markbates/pkger/here"
|
||||
"github.com/markbates/pkger/parser"
|
||||
)
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/gobuffalo/here"
|
||||
"github.com/markbates/pkger"
|
||||
"github.com/markbates/pkger/here"
|
||||
)
|
||||
|
||||
type pathCmd struct {
|
||||
|
|
|
@ -8,6 +8,7 @@ type Info = here.Info
|
|||
type Module = here.Module
|
||||
type Path = here.Path
|
||||
|
||||
var Dir = here.Dir
|
||||
var Package = here.Package
|
||||
var Current = here.Current
|
||||
var Here = here.New()
|
||||
var Dir = Here.Dir
|
||||
var Package = Here.Package
|
||||
var Current = Here.Current
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
"sort"
|
||||
"sync"
|
||||
|
||||
"github.com/gobuffalo/here"
|
||||
"github.com/markbates/pkger/here"
|
||||
"github.com/markbates/pkger/pkging"
|
||||
)
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
"sort"
|
||||
"sync"
|
||||
|
||||
"github.com/gobuffalo/here"
|
||||
"github.com/markbates/pkger/here"
|
||||
)
|
||||
|
||||
// Infos wraps sync.Map and uses the following types:
|
||||
|
|
|
@ -3,7 +3,7 @@ package parser
|
|||
import (
|
||||
"encoding/json"
|
||||
|
||||
"github.com/gobuffalo/here"
|
||||
"github.com/markbates/pkger/here"
|
||||
)
|
||||
|
||||
type File struct {
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/gobuffalo/here"
|
||||
"github.com/markbates/pkger/here"
|
||||
)
|
||||
|
||||
var _ Decl = IncludeDecl{}
|
||||
|
|
|
@ -11,7 +11,7 @@ import (
|
|||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/gobuffalo/here"
|
||||
"github.com/markbates/pkger/here"
|
||||
)
|
||||
|
||||
var defaultIgnoredFolders = []string{".", "_", "vendor", "node_modules", "testdata"}
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/gobuffalo/here"
|
||||
"github.com/markbates/pkger/here"
|
||||
"github.com/markbates/pkger/pkging/pkgtest"
|
||||
"github.com/markbates/pkger/pkging/stdos"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
"strconv"
|
||||
"sync"
|
||||
|
||||
"github.com/gobuffalo/here"
|
||||
"github.com/markbates/pkger/here"
|
||||
)
|
||||
|
||||
type Source struct {
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/gobuffalo/here"
|
||||
"github.com/markbates/pkger/here"
|
||||
)
|
||||
|
||||
var _ Decl = WalkDecl{}
|
||||
|
|
2
pkger.go
2
pkger.go
|
@ -6,7 +6,7 @@ import (
|
|||
"path/filepath"
|
||||
"sync"
|
||||
|
||||
"github.com/gobuffalo/here"
|
||||
"github.com/markbates/pkger/here"
|
||||
"github.com/markbates/pkger/pkging"
|
||||
"github.com/markbates/pkger/pkging/stdos"
|
||||
)
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"encoding/hex"
|
||||
"io"
|
||||
|
||||
"github.com/gobuffalo/here"
|
||||
"github.com/markbates/pkger/here"
|
||||
"github.com/markbates/pkger/internal/takeon/github.com/markbates/hepa"
|
||||
"github.com/markbates/pkger/internal/takeon/github.com/markbates/hepa/filters"
|
||||
)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package embed
|
||||
|
||||
import (
|
||||
"github.com/gobuffalo/here"
|
||||
"github.com/markbates/pkger/here"
|
||||
"github.com/markbates/pkger/pkging"
|
||||
)
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"net/http"
|
||||
"os"
|
||||
|
||||
"github.com/gobuffalo/here"
|
||||
"github.com/markbates/pkger/here"
|
||||
)
|
||||
|
||||
type File interface {
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/gobuffalo/here"
|
||||
"github.com/markbates/pkger/here"
|
||||
"github.com/markbates/pkger/pkging"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/gobuffalo/here"
|
||||
"github.com/markbates/pkger/here"
|
||||
"github.com/markbates/pkger/pkging"
|
||||
)
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"github.com/gobuffalo/here"
|
||||
"github.com/markbates/pkger/here"
|
||||
"github.com/markbates/pkger/pkging/mem"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
|
|
@ -3,7 +3,7 @@ package mem
|
|||
import (
|
||||
"encoding/json"
|
||||
|
||||
"github.com/gobuffalo/here"
|
||||
"github.com/markbates/pkger/here"
|
||||
"github.com/markbates/pkger/internal/maps"
|
||||
"github.com/markbates/pkger/pkging"
|
||||
"github.com/markbates/pkger/pkging/embed"
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
"path/filepath"
|
||||
"time"
|
||||
|
||||
"github.com/gobuffalo/here"
|
||||
"github.com/markbates/pkger/here"
|
||||
"github.com/markbates/pkger/pkging"
|
||||
)
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"io/ioutil"
|
||||
"testing"
|
||||
|
||||
"github.com/gobuffalo/here"
|
||||
"github.com/markbates/pkger/here"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/gobuffalo/here"
|
||||
"github.com/markbates/pkger/here"
|
||||
"github.com/markbates/pkger/internal/maps"
|
||||
"github.com/markbates/pkger/pkging"
|
||||
)
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/gobuffalo/here"
|
||||
"github.com/markbates/pkger/here"
|
||||
)
|
||||
|
||||
type Pkger interface {
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/gobuffalo/here"
|
||||
"github.com/markbates/pkger/here"
|
||||
"github.com/markbates/pkger/pkging"
|
||||
)
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/gobuffalo/here"
|
||||
"github.com/markbates/pkger/here"
|
||||
"github.com/markbates/pkger/pkging"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
"path/filepath"
|
||||
"runtime"
|
||||
|
||||
"github.com/gobuffalo/here"
|
||||
"github.com/markbates/pkger/here"
|
||||
)
|
||||
|
||||
type Ref struct {
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"io"
|
||||
"os"
|
||||
|
||||
"github.com/gobuffalo/here"
|
||||
"github.com/markbates/pkger/here"
|
||||
"github.com/markbates/pkger/pkging"
|
||||
)
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/gobuffalo/here"
|
||||
"github.com/markbates/pkger/here"
|
||||
"github.com/markbates/pkger/parser"
|
||||
"github.com/markbates/pkger/pkging/embed"
|
||||
"github.com/markbates/pkger/pkging/mem"
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"os"
|
||||
"path"
|
||||
|
||||
"github.com/gobuffalo/here"
|
||||
"github.com/markbates/pkger/here"
|
||||
"github.com/markbates/pkger/pkging"
|
||||
)
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ package stdos
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/gobuffalo/here"
|
||||
"github.com/markbates/pkger/here"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/gobuffalo/here"
|
||||
"github.com/markbates/pkger/here"
|
||||
"github.com/markbates/pkger/internal/maps"
|
||||
"github.com/markbates/pkger/pkging"
|
||||
)
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/gobuffalo/here"
|
||||
"github.com/markbates/pkger/here"
|
||||
)
|
||||
|
||||
func Wrap(parent, with Pkger) Pkger {
|
||||
|
|
Loading…
Reference in New Issue