Skip to content

Commit

Permalink
Library v2
Browse files Browse the repository at this point in the history
  • Loading branch information
matbme committed Dec 16, 2023
1 parent 8c7e398 commit 41eb272
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion cmd/pkgManagers.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (

"github.com/spf13/cobra"

"github.com/vanilla-os/apx/core"
"github.com/vanilla-os/apx/v2/core"
"github.com/vanilla-os/orchid/cmdr"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"fmt"

"github.com/spf13/cobra"
"github.com/vanilla-os/apx/core"
"github.com/vanilla-os/apx/v2/core"
"github.com/vanilla-os/orchid/cmdr"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/stacks.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (

"github.com/spf13/cobra"

"github.com/vanilla-os/apx/core"
"github.com/vanilla-os/apx/v2/core"
"github.com/vanilla-os/orchid/cmdr"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/subsyStems.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (

"github.com/spf13/cobra"

"github.com/vanilla-os/apx/core"
"github.com/vanilla-os/apx/v2/core"
"github.com/vanilla-os/orchid/cmdr"
)

Expand Down
2 changes: 1 addition & 1 deletion core/apx.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package core

import (
"github.com/vanilla-os/apx/settings"
"github.com/vanilla-os/apx/v2/settings"
)

var apx *Apx
Expand Down
8 changes: 4 additions & 4 deletions core/pkgManager.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ package core

import (
"errors"
"io/ioutil"
"io"
"os"
"path/filepath"

Expand Down Expand Up @@ -72,7 +72,7 @@ func loadPkgManagerFromPath(path string) (*PkgManager, error) {
return nil, errors.New("package manager not found")
}

data, err := ioutil.ReadAll(f)
data, err := io.ReadAll(f)
if err != nil {
return nil, err
}
Expand All @@ -93,7 +93,7 @@ func (pkgManager *PkgManager) Save() error {
}

filePath := filepath.Join(apx.Cnf.UserPkgManagersPath, pkgManager.Name+".yaml")
err = ioutil.WriteFile(filePath, data, 0644)
err = os.WriteFile(filePath, data, 0644)
return err
}

Expand Down Expand Up @@ -145,7 +145,7 @@ func ListPkgManagers() []*PkgManager {
func listPkgManagersFromPath(path string) []*PkgManager {
pkgManagers := make([]*PkgManager, 0)

files, err := ioutil.ReadDir(path)
files, err := os.ReadDir(path)
if err != nil {
return pkgManagers
}
Expand Down
10 changes: 5 additions & 5 deletions core/stack.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ package core

import (
"errors"
"io/ioutil"
"io"
"os"
"path/filepath"

Expand Down Expand Up @@ -56,7 +56,7 @@ func LoadStackFromPath(path string) (*Stack, error) {
return nil, errors.New("stack not found")
}

data, err := ioutil.ReadAll(f)
data, err := io.ReadAll(f)
if err != nil {
return nil, err
}
Expand All @@ -77,7 +77,7 @@ func (stack *Stack) Save() error {
}

filePath := filepath.Join(apx.Cnf.UserStacksPath, stack.Name+".yaml")
err = ioutil.WriteFile(filePath, data, 0644)
err = os.WriteFile(filePath, data, 0644)
return err
}

Expand Down Expand Up @@ -117,7 +117,7 @@ func (stack *Stack) Export(path string) error {
return err
}

err = ioutil.WriteFile(filePath, data, 0644)
err = os.WriteFile(filePath, data, 0644)
if err != nil {
return err
}
Expand Down Expand Up @@ -170,7 +170,7 @@ func ListStackForPkgManager(pkgManager string) []*Stack {
func listStacksFromPath(path string) []*Stack {
stacks := make([]*Stack, 0)

files, err := ioutil.ReadDir(path)
files, err := os.ReadDir(path)
if err != nil {
return stacks
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/vanilla-os/apx
module github.com/vanilla-os/apx/v2

go 1.18

Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"embed"
"os"

"github.com/vanilla-os/apx/cmd"
"github.com/vanilla-os/apx/core"
"github.com/vanilla-os/apx/v2/cmd"
"github.com/vanilla-os/apx/v2/core"
"github.com/vanilla-os/orchid/cmdr"
)

Expand Down

0 comments on commit 41eb272

Please sign in to comment.