move tree/ to rootfs/
This commit is contained in:
parent
b76a500f2e
commit
8dedaebcf7
@ -1,15 +0,0 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["tree.go"],
|
||||
importpath = "github.com/motiejus/code/undocker/internal/tree",
|
||||
visibility = ["//src:__subpackages__"],
|
||||
)
|
||||
|
||||
go_test(
|
||||
name = "go_default_test",
|
||||
srcs = ["tree_test.go"],
|
||||
embed = [":go_default_library"],
|
||||
deps = ["@com_github_stretchr_testify//assert:go_default_library"],
|
||||
)
|
11
rootfs/BUILD
11
rootfs/BUILD
@ -5,18 +5,19 @@ go_library(
|
||||
srcs = [
|
||||
"doc.go",
|
||||
"rootfs.go",
|
||||
"tree.go",
|
||||
],
|
||||
importpath = "github.com/motiejus/code/undocker/rootfs",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//src/undocker/internal/tree:go_default_library",
|
||||
"@org_uber_go_multierr//:go_default_library",
|
||||
],
|
||||
deps = ["@org_uber_go_multierr//:go_default_library"],
|
||||
)
|
||||
|
||||
go_test(
|
||||
name = "go_default_test",
|
||||
srcs = ["rootfs_test.go"],
|
||||
srcs = [
|
||||
"rootfs_test.go",
|
||||
"tree_test.go",
|
||||
],
|
||||
embed = [":go_default_library"],
|
||||
deps = [
|
||||
"@com_github_stretchr_testify//assert:go_default_library",
|
||||
|
@ -9,7 +9,6 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/motiejus/code/undocker/internal/tree"
|
||||
"go.uber.org/multierr"
|
||||
)
|
||||
|
||||
@ -194,10 +193,10 @@ func writeFile(tr *tar.Reader, tw *tar.Writer, hdr *tar.Header) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func whiteoutDirs(whreaddir map[string]int, nlayers int) []*tree.Tree {
|
||||
ret := make([]*tree.Tree, nlayers)
|
||||
func whiteoutDirs(whreaddir map[string]int, nlayers int) []*Tree {
|
||||
ret := make([]*Tree, nlayers)
|
||||
for i := range ret {
|
||||
ret[i] = tree.New()
|
||||
ret[i] = New()
|
||||
}
|
||||
for fname, layer := range whreaddir {
|
||||
if layer == 0 {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package tree
|
||||
package rootfs
|
||||
|
||||
import (
|
||||
"path/filepath"
|
@ -1,4 +1,4 @@
|
||||
package tree
|
||||
package rootfs
|
||||
|
||||
import (
|
||||
"testing"
|
Loading…
Reference in New Issue
Block a user