Skip to content

Commit

Permalink
update pkg name
Browse files Browse the repository at this point in the history
Signed-off-by: Stephanie <[email protected]>
  • Loading branch information
yangcao77 committed Oct 18, 2022
1 parent b0befbe commit 3a0b7e5
Show file tree
Hide file tree
Showing 43 changed files with 84 additions and 83 deletions.
1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ github.com/devfile/api/v2 v2.0.0-20220117162434-6e6e6a8bc14c/go.mod h1:d99eTN6Qx
github.com/devfile/api/v2 v2.2.0 h1:3Mwl/dtT508oU4pNt/v4G8vqvjoZqi9LOInXCNwKMoc=
github.com/devfile/api/v2 v2.2.0/go.mod h1:dN7xFrOVG+iPqn4UKGibXLd5oVsdE8XyK9OEb5JL3aI=
github.com/devfile/library v1.2.1-0.20211104222135-49d635cb492f/go.mod h1:uFZZdTuRqA68FVe/JoJHP92CgINyQkyWnM2Qyiim+50=
github.com/devfile/library v1.2.1-0.20220308191614-f0f7e11b17de h1:jImHtiAxjyul1UkPmf6C3EMS5wqNz+k84LKkCXkeqws=
github.com/devfile/library v1.2.1-0.20220308191614-f0f7e11b17de/go.mod h1:GSPfJaBg0+bBjBHbwBE5aerJLH6tWGQu2q2rHYd9czM=
github.com/devfile/registry-support/index/generator v0.0.0-20220222194908-7a90a4214f3e/go.mod h1:iRPBxs+ZjfLEduVXpCCIOzdD2588Zv9OCs/CcXMcCCY=
github.com/devfile/registry-support/index/generator v0.0.0-20220527155645-8328a8a883be h1:tCdIUbJ1eZV/jRa1gjs3dPZsbTjRibDqwRqIK4HCI9k=
Expand Down
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import (
"reflect"
"strings"

devfilepkg "github.com/devfile/library/pkg/devfile"
"github.com/devfile/library/pkg/devfile/parser"
v2 "github.com/devfile/library/pkg/devfile/parser/data/v2"
"github.com/devfile/library/pkg/devfile/parser/data/v2/common"
devfilepkg "github.com/devfile/library/v2/pkg/devfile"
"github.com/devfile/library/v2/pkg/devfile/parser"
v2 "github.com/devfile/library/v2/pkg/devfile/parser/data/v2"
"github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common"
)

func main() {
Expand Down
6 changes: 3 additions & 3 deletions pkg/devfile/generator/generators.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import (
"fmt"

v1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2"
"github.com/devfile/library/pkg/devfile/parser"
"github.com/devfile/library/pkg/devfile/parser/data/v2/common"
"github.com/devfile/library/pkg/util"
"github.com/devfile/library/v2/pkg/devfile/parser"
"github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common"
"github.com/devfile/library/v2/pkg/util"
buildv1 "github.com/openshift/api/build/v1"
imagev1 "github.com/openshift/api/image/v1"
routev1 "github.com/openshift/api/route/v1"
Expand Down
10 changes: 5 additions & 5 deletions pkg/devfile/generator/generators_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ import (

v1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2"
"github.com/devfile/api/v2/pkg/attributes"
"github.com/devfile/library/pkg/devfile/parser"
"github.com/devfile/library/pkg/devfile/parser/data"
"github.com/devfile/library/pkg/devfile/parser/data/v2/common"
"github.com/devfile/library/pkg/testingutil"
"github.com/devfile/library/pkg/util"
"github.com/devfile/library/v2/pkg/devfile/parser"
"github.com/devfile/library/v2/pkg/devfile/parser/data"
"github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common"
"github.com/devfile/library/v2/pkg/testingutil"
"github.com/devfile/library/v2/pkg/util"
"github.com/golang/mock/gomock"

corev1 "k8s.io/api/core/v1"
Expand Down
4 changes: 2 additions & 2 deletions pkg/devfile/generator/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"strings"

v1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2"
"github.com/devfile/library/pkg/devfile/parser"
"github.com/devfile/library/pkg/devfile/parser/data/v2/common"
"github.com/devfile/library/v2/pkg/devfile/parser"
"github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common"
buildv1 "github.com/openshift/api/build/v1"
routev1 "github.com/openshift/api/route/v1"
appsv1 "k8s.io/api/apps/v1"
Expand Down
8 changes: 4 additions & 4 deletions pkg/devfile/generator/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ import (
"testing"

"github.com/devfile/api/v2/pkg/attributes"
"github.com/devfile/library/pkg/devfile/parser"
"github.com/devfile/library/pkg/devfile/parser/data"
"github.com/devfile/library/pkg/devfile/parser/data/v2/common"
"github.com/devfile/library/pkg/testingutil"
"github.com/devfile/library/v2/pkg/devfile/parser"
"github.com/devfile/library/v2/pkg/devfile/parser/data"
"github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common"
"github.com/devfile/library/v2/pkg/testingutil"
"github.com/golang/mock/gomock"
buildv1 "github.com/openshift/api/build/v1"

Expand Down
4 changes: 2 additions & 2 deletions pkg/devfile/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ package devfile

import (
"github.com/devfile/api/v2/pkg/validation/variables"
"github.com/devfile/library/pkg/devfile/parser"
"github.com/devfile/library/pkg/devfile/validate"
"github.com/devfile/library/v2/pkg/devfile/parser"
"github.com/devfile/library/v2/pkg/devfile/validate"
)

// ParseFromURLAndValidate func parses the devfile data from the url
Expand Down
4 changes: 2 additions & 2 deletions pkg/devfile/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
"testing"

"github.com/devfile/api/v2/pkg/validation/variables"
"github.com/devfile/library/pkg/devfile/parser"
"github.com/devfile/library/pkg/devfile/parser/data/v2/common"
"github.com/devfile/library/v2/pkg/devfile/parser"
"github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common"
)

func TestParseDevfileAndValidate(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/devfile/parser/configurables.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package parser

import (
v1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2"
"github.com/devfile/library/pkg/devfile/parser/data/v2/common"
"github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion pkg/devfile/parser/context/apiVersion.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"fmt"
"strings"

"github.com/devfile/library/pkg/devfile/parser/data"
"github.com/devfile/library/v2/pkg/devfile/parser/data"
"github.com/pkg/errors"
"k8s.io/klog"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/devfile/parser/context/content.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"bytes"
"unicode"

"github.com/devfile/library/pkg/util"
"github.com/devfile/library/v2/pkg/util"
"github.com/pkg/errors"
"k8s.io/klog"
"sigs.k8s.io/yaml"
Expand Down
2 changes: 1 addition & 1 deletion pkg/devfile/parser/context/content_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"os"
"testing"

"github.com/devfile/library/pkg/testingutil/filesystem"
"github.com/devfile/library/v2/pkg/testingutil/filesystem"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions pkg/devfile/parser/context/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"path/filepath"
"strings"

"github.com/devfile/library/pkg/testingutil/filesystem"
"github.com/devfile/library/pkg/util"
"github.com/devfile/library/v2/pkg/testingutil/filesystem"
"github.com/devfile/library/v2/pkg/util"
"k8s.io/klog"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/devfile/parser/context/fakecontext.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

package parser

import "github.com/devfile/library/pkg/testingutil/filesystem"
import "github.com/devfile/library/v2/pkg/testingutil/filesystem"

func FakeContext(fs filesystem.Filesystem, absPath string) DevfileCtx {
return DevfileCtx{
Expand Down
2 changes: 1 addition & 1 deletion pkg/devfile/parser/context/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

package parser

import "github.com/devfile/library/pkg/testingutil/filesystem"
import "github.com/devfile/library/v2/pkg/testingutil/filesystem"

// GetFs returns the filesystem object
func (d *DevfileCtx) GetFs() filesystem.Filesystem {
Expand Down
2 changes: 1 addition & 1 deletion pkg/devfile/parser/context/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package parser
import (
"fmt"

"github.com/devfile/library/pkg/devfile/parser/data"
"github.com/devfile/library/v2/pkg/devfile/parser/data"
"github.com/pkg/errors"
"github.com/xeipuuv/gojsonschema"
"k8s.io/klog"
Expand Down
2 changes: 1 addition & 1 deletion pkg/devfile/parser/context/schema_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"github.com/stretchr/testify/assert"
"testing"

v200 "github.com/devfile/library/pkg/devfile/parser/data/v2/2.0.0"
v200 "github.com/devfile/library/v2/pkg/devfile/parser/data/v2/2.0.0"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions pkg/devfile/parser/data/helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"strings"
"testing"

v2 "github.com/devfile/library/pkg/devfile/parser/data/v2"
v200 "github.com/devfile/library/pkg/devfile/parser/data/v2/2.0.0"
v2 "github.com/devfile/library/v2/pkg/devfile/parser/data/v2"
v200 "github.com/devfile/library/v2/pkg/devfile/parser/data/v2/2.0.0"
)

func TestNewDevfileData(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/devfile/parser/data/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
v1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2"
"github.com/devfile/api/v2/pkg/attributes"
devfilepkg "github.com/devfile/api/v2/pkg/devfile"
"github.com/devfile/library/pkg/devfile/parser/data/v2/common"
"github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common"
)

// Generate mock interfaces for DevfileData by executing the following cmd in pkg/devfile/parser/data
Expand Down
2 changes: 1 addition & 1 deletion pkg/devfile/parser/data/mock_interface.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/devfile/parser/data/v2/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package v2
import (
"fmt"
v1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2"
"github.com/devfile/library/pkg/devfile/parser/data/v2/common"
"github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common"
"reflect"
"strings"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/devfile/parser/data/v2/commands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

v1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2"
"github.com/devfile/api/v2/pkg/attributes"
"github.com/devfile/library/pkg/devfile/parser/data/v2/common"
"github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/devfile/parser/data/v2/components.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"strings"

v1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2"
"github.com/devfile/library/pkg/devfile/parser/data/v2/common"
"github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common"
)

// GetComponents returns the slice of Component objects parsed from the Devfile
Expand Down
4 changes: 2 additions & 2 deletions pkg/devfile/parser/data/v2/components_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (

v1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2"
"github.com/devfile/api/v2/pkg/attributes"
"github.com/devfile/library/pkg/devfile/parser/data/v2/common"
"github.com/devfile/library/pkg/testingutil"
"github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common"
"github.com/devfile/library/v2/pkg/testingutil"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/devfile/parser/data/v2/containers.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"strings"

v1alpha2 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2"
"github.com/devfile/library/pkg/devfile/parser/data/v2/common"
"github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common"
corev1 "k8s.io/api/core/v1"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/devfile/parser/data/v2/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package v2
import (
"fmt"
v1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2"
"github.com/devfile/library/pkg/devfile/parser/data/v2/common"
"github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common"
"strings"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/devfile/parser/data/v2/projects.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package v2
import (
"fmt"
v1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2"
"github.com/devfile/library/pkg/devfile/parser/data/v2/common"
"github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common"
"reflect"
"strings"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/devfile/parser/data/v2/projects_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

v1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2"
"github.com/devfile/api/v2/pkg/attributes"
"github.com/devfile/library/pkg/devfile/parser/data/v2/common"
"github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common"
"github.com/kylelemons/godebug/pretty"
"github.com/stretchr/testify/assert"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/devfile/parser/data/v2/volumes.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"strings"

v1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2"
"github.com/devfile/library/pkg/devfile/parser/data/v2/common"
"github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common"
)

// AddVolumeMounts adds the volume mounts to the specified container component
Expand Down
2 changes: 1 addition & 1 deletion pkg/devfile/parser/data/v2/volumes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"testing"

v1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2"
"github.com/devfile/library/pkg/testingutil"
"github.com/devfile/library/v2/pkg/testingutil"
"github.com/stretchr/testify/assert"
)

Expand Down
8 changes: 4 additions & 4 deletions pkg/devfile/parser/data/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ package data
import (
"reflect"

v2 "github.com/devfile/library/pkg/devfile/parser/data/v2"
v200 "github.com/devfile/library/pkg/devfile/parser/data/v2/2.0.0"
v210 "github.com/devfile/library/pkg/devfile/parser/data/v2/2.1.0"
v220 "github.com/devfile/library/pkg/devfile/parser/data/v2/2.2.0"
v2 "github.com/devfile/library/v2/pkg/devfile/parser/data/v2"
v200 "github.com/devfile/library/v2/pkg/devfile/parser/data/v2/2.0.0"
v210 "github.com/devfile/library/v2/pkg/devfile/parser/data/v2/2.1.0"
v220 "github.com/devfile/library/v2/pkg/devfile/parser/data/v2/2.2.0"
)

// SupportedApiVersions stores the supported devfile API versions
Expand Down
4 changes: 2 additions & 2 deletions pkg/devfile/parser/devfileobj.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
package parser

import (
devfileCtx "github.com/devfile/library/pkg/devfile/parser/context"
"github.com/devfile/library/pkg/devfile/parser/data"
devfileCtx "github.com/devfile/library/v2/pkg/devfile/parser/context"
"github.com/devfile/library/v2/pkg/devfile/parser/data"
)

// Default filenames for create devfile
Expand Down
8 changes: 4 additions & 4 deletions pkg/devfile/parser/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ import (
"path"
"strings"

devfileCtx "github.com/devfile/library/pkg/devfile/parser/context"
"github.com/devfile/library/pkg/devfile/parser/data"
"github.com/devfile/library/pkg/devfile/parser/data/v2/common"
"github.com/devfile/library/pkg/util"
devfileCtx "github.com/devfile/library/v2/pkg/devfile/parser/context"
"github.com/devfile/library/v2/pkg/devfile/parser/data"
"github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common"
"github.com/devfile/library/v2/pkg/util"
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/tools/clientcmd"
"k8s.io/klog"
Expand Down
10 changes: 5 additions & 5 deletions pkg/devfile/parser/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import (
v1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2"
"github.com/devfile/api/v2/pkg/attributes"
devfilepkg "github.com/devfile/api/v2/pkg/devfile"
devfileCtx "github.com/devfile/library/pkg/devfile/parser/context"
"github.com/devfile/library/pkg/devfile/parser/data"
v2 "github.com/devfile/library/pkg/devfile/parser/data/v2"
"github.com/devfile/library/pkg/devfile/parser/data/v2/common"
"github.com/devfile/library/pkg/testingutil"
devfileCtx "github.com/devfile/library/v2/pkg/devfile/parser/context"
"github.com/devfile/library/v2/pkg/devfile/parser/data"
v2 "github.com/devfile/library/v2/pkg/devfile/parser/data/v2"
"github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common"
"github.com/devfile/library/v2/pkg/testingutil"
"github.com/kylelemons/godebug/pretty"
"github.com/stretchr/testify/assert"
"io/ioutil"
Expand Down
2 changes: 1 addition & 1 deletion pkg/devfile/parser/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"fmt"
"io"

"github.com/devfile/library/pkg/util"
"github.com/devfile/library/v2/pkg/util"
"github.com/pkg/errors"
"github.com/spf13/afero"
"gopkg.in/yaml.v3"
Expand Down
2 changes: 1 addition & 1 deletion pkg/devfile/parser/reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"reflect"
"testing"

"github.com/devfile/library/pkg/util"
"github.com/devfile/library/v2/pkg/util"
"github.com/spf13/afero"
"github.com/stretchr/testify/assert"
)
Expand Down
4 changes: 2 additions & 2 deletions pkg/devfile/parser/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ package parser
import (
v1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2"
apiAttributes "github.com/devfile/api/v2/pkg/attributes"
"github.com/devfile/library/pkg/devfile/parser/data/v2/common"
"github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common"
"sigs.k8s.io/yaml"

"github.com/devfile/library/pkg/testingutil/filesystem"
"github.com/devfile/library/v2/pkg/testingutil/filesystem"
"github.com/pkg/errors"
"k8s.io/klog"
)
Expand Down
Loading

0 comments on commit 3a0b7e5

Please sign in to comment.