chore: rename package to be able to go install

This commit is contained in:
Technofab 2022-12-05 16:02:30 +01:00
parent 538ff9c6f6
commit 507039ecc0
No known key found for this signature in database
GPG key ID: A0AA746B951C8830
31 changed files with 104 additions and 99 deletions

View file

@ -17,7 +17,7 @@ package actions
import (
"context"
"github.com/storyicon/powerproto/pkg/util/logger"
"github.com/TECHNOFAB11/powerproto/pkg/util/logger"
)
// CommonOptions is common options of action

View file

@ -20,14 +20,15 @@ import (
"github.com/pkg/errors"
"github.com/storyicon/powerproto/pkg/consts"
"github.com/storyicon/powerproto/pkg/util"
"github.com/storyicon/powerproto/pkg/util/logger"
"github.com/TECHNOFAB11/powerproto/pkg/consts"
"github.com/TECHNOFAB11/powerproto/pkg/util"
"github.com/TECHNOFAB11/powerproto/pkg/util/logger"
)
// ActionCopy is used to copy directory or file from src to dest
// Its args prototype is:
// args: (src string, dest string)
//
// args: (src string, dest string)
func ActionCopy(ctx context.Context, log logger.Logger, args []string, options *CommonOptions) error {
if len(args) != 2 || util.ContainsEmpty(args...) {
return errors.Errorf("expected length of args is 3, but received %d", len(args))

View file

@ -21,14 +21,15 @@ import (
"github.com/pkg/errors"
"github.com/storyicon/powerproto/pkg/consts"
"github.com/storyicon/powerproto/pkg/util"
"github.com/storyicon/powerproto/pkg/util/logger"
"github.com/TECHNOFAB11/powerproto/pkg/consts"
"github.com/TECHNOFAB11/powerproto/pkg/util"
"github.com/TECHNOFAB11/powerproto/pkg/util/logger"
)
// ActionMove is used to move directory or file from src to dest
// Its args prototype is:
// args: (src string, dest string)
//
// args: (src string, dest string)
func ActionMove(ctx context.Context, log logger.Logger, args []string, options *CommonOptions) error {
if len(args) != 2 || util.ContainsEmpty(args...) {
return errors.Errorf("expected length of args is 3, but received %d", len(args))

View file

@ -21,13 +21,14 @@ import (
"github.com/pkg/errors"
"github.com/storyicon/powerproto/pkg/consts"
"github.com/storyicon/powerproto/pkg/util/logger"
"github.com/TECHNOFAB11/powerproto/pkg/consts"
"github.com/TECHNOFAB11/powerproto/pkg/util/logger"
)
// ActionRemove is used to delete directories or files
// Its args prototype is:
// args: (path ...string)
//
// args: (path ...string)
func ActionRemove(ctx context.Context, log logger.Logger, args []string, options *CommonOptions) error {
for _, arg := range args {
if filepath.IsAbs(arg) {

View file

@ -23,14 +23,16 @@ import (
"github.com/pkg/errors"
"github.com/storyicon/powerproto/pkg/consts"
"github.com/storyicon/powerproto/pkg/util"
"github.com/storyicon/powerproto/pkg/util/logger"
"github.com/TECHNOFAB11/powerproto/pkg/consts"
"github.com/TECHNOFAB11/powerproto/pkg/util"
"github.com/TECHNOFAB11/powerproto/pkg/util/logger"
)
// ActionReplace is used to replace text in bulk
// Its args prototype is:
// args: (pattern string, from string, to string)
//
// args: (pattern string, from string, to string)
//
// pattern is used to match files
func ActionReplace(ctx context.Context, log logger.Logger, args []string, options *CommonOptions) error {
if len(args) != 3 {

View file

@ -17,7 +17,7 @@ package actionmanager
import (
"fmt"
"github.com/storyicon/powerproto/pkg/util/command"
"github.com/TECHNOFAB11/powerproto/pkg/util/command"
)
// ErrPostShell defines the post shell command error

View file

@ -19,10 +19,10 @@ import (
"fmt"
"path/filepath"
"github.com/storyicon/powerproto/pkg/component/actionmanager/actions"
"github.com/storyicon/powerproto/pkg/configs"
"github.com/storyicon/powerproto/pkg/util/command"
"github.com/storyicon/powerproto/pkg/util/logger"
"github.com/TECHNOFAB11/powerproto/pkg/component/actionmanager/actions"
"github.com/TECHNOFAB11/powerproto/pkg/configs"
"github.com/TECHNOFAB11/powerproto/pkg/util/command"
"github.com/TECHNOFAB11/powerproto/pkg/util/logger"
)
// ActionManager is used to manage actions