Skip to content

Commit

Permalink
move from internal to pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
richardjennings committed May 2, 2024
1 parent e5fd33f commit 8ea40a5
Show file tree
Hide file tree
Showing 24 changed files with 36 additions and 36 deletions.
2 changes: 1 addition & 1 deletion cmd/add.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cmd

import (
"github.com/richardjennings/mygit/internal/mygit"
"github.com/richardjennings/mygit/pkg/mygit"
"github.com/spf13/cobra"
"log"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/branch.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cmd

import (
"github.com/richardjennings/mygit/internal/mygit"
"github.com/richardjennings/mygit/pkg/mygit"
"github.com/spf13/cobra"
"log"
"os"
Expand Down
2 changes: 1 addition & 1 deletion cmd/commit.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cmd
import (
"encoding/hex"
"fmt"
"github.com/richardjennings/mygit/internal/mygit"
"github.com/richardjennings/mygit/pkg/mygit"
"github.com/spf13/cobra"
"log"
"os"
Expand Down
2 changes: 1 addition & 1 deletion cmd/init.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cmd

import (
"github.com/richardjennings/mygit/internal/mygit"
"github.com/richardjennings/mygit/pkg/mygit"
"github.com/spf13/cobra"
"log"
)
Expand Down
4 changes: 2 additions & 2 deletions cmd/log.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package cmd

import (
"github.com/richardjennings/mygit/internal/mygit"
"github.com/richardjennings/mygit/internal/mygit/config"
"github.com/richardjennings/mygit/pkg/mygit"
"github.com/richardjennings/mygit/pkg/mygit/config"
"github.com/spf13/cobra"
"log"
"os"
Expand Down
2 changes: 1 addition & 1 deletion cmd/ls-files.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package cmd

import (
"fmt"
"github.com/richardjennings/mygit/internal/mygit"
"github.com/richardjennings/mygit/pkg/mygit"
"github.com/spf13/cobra"
"log"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package cmd

import (
"fmt"
"github.com/richardjennings/mygit/internal/mygit"
"github.com/richardjennings/mygit/pkg/mygit"
"github.com/spf13/cobra"
"log"
"os"
Expand Down
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cmd

import (
"github.com/richardjennings/mygit/internal/mygit/config"
"github.com/richardjennings/mygit/pkg/mygit/config"
"github.com/spf13/cobra"
"log"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package cmd

import (
"fmt"
"github.com/richardjennings/mygit/internal/mygit"
"github.com/richardjennings/mygit/pkg/mygit"
"github.com/spf13/cobra"
"os"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/switch.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package cmd

import (
"fmt"
"github.com/richardjennings/mygit/internal/mygit"
"github.com/richardjennings/mygit/pkg/mygit"
"github.com/spf13/cobra"
"log"
"os"
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions internal/mygit/gfs/file.go → pkg/mygit/gfs/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"bytes"
"encoding/hex"
"fmt"
"github.com/richardjennings/mygit/internal/mygit/config"
"github.com/richardjennings/mygit/internal/mygit/ignore"
"github.com/richardjennings/mygit/pkg/mygit/config"
"github.com/richardjennings/mygit/pkg/mygit/ignore"
"os"
"path/filepath"
"strings"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ignore

import (
"github.com/richardjennings/mygit/internal/mygit/config"
"github.com/richardjennings/mygit/pkg/mygit/config"
"path/filepath"
"strings"
)
Expand Down
4 changes: 2 additions & 2 deletions internal/mygit/index/index.go → pkg/mygit/index/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"encoding/binary"
"errors"
"fmt"
"github.com/richardjennings/mygit/internal/mygit/config"
"github.com/richardjennings/mygit/internal/mygit/gfs"
"github.com/richardjennings/mygit/pkg/mygit/config"
"github.com/richardjennings/mygit/pkg/mygit/gfs"
"io"
"os"
"path/filepath"
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package index
import (
"encoding/binary"
"errors"
"github.com/richardjennings/mygit/internal/mygit/config"
"github.com/richardjennings/mygit/pkg/mygit/config"
"os"
)

Expand Down
6 changes: 3 additions & 3 deletions internal/mygit/index/status.go → pkg/mygit/index/status.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package index

import (
"github.com/richardjennings/mygit/internal/mygit/config"
"github.com/richardjennings/mygit/internal/mygit/gfs"
"github.com/richardjennings/mygit/internal/mygit/objects"
"github.com/richardjennings/mygit/pkg/mygit/config"
"github.com/richardjennings/mygit/pkg/mygit/gfs"
"github.com/richardjennings/mygit/pkg/mygit/objects"
)

// Status returns a FileSet containing all files from commit, index and working directory
Expand Down
10 changes: 5 additions & 5 deletions internal/mygit/mygit.go → pkg/mygit/mygit.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package mygit
import (
"errors"
"fmt"
"github.com/richardjennings/mygit/internal/mygit/config"
"github.com/richardjennings/mygit/internal/mygit/gfs"
"github.com/richardjennings/mygit/internal/mygit/index"
"github.com/richardjennings/mygit/internal/mygit/objects"
"github.com/richardjennings/mygit/internal/mygit/refs"
"github.com/richardjennings/mygit/pkg/mygit/config"
"github.com/richardjennings/mygit/pkg/mygit/gfs"
"github.com/richardjennings/mygit/pkg/mygit/index"
"github.com/richardjennings/mygit/pkg/mygit/objects"
"github.com/richardjennings/mygit/pkg/mygit/refs"
"io"
"log"
"os"
Expand Down
8 changes: 4 additions & 4 deletions internal/mygit/mygit_test.go → pkg/mygit/mygit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package mygit
import (
"bytes"
"fmt"
"github.com/richardjennings/mygit/internal/mygit/config"
"github.com/richardjennings/mygit/internal/mygit/gfs"
"github.com/richardjennings/mygit/internal/mygit/objects"
"github.com/richardjennings/mygit/internal/mygit/refs"
"github.com/richardjennings/mygit/pkg/mygit/config"
"github.com/richardjennings/mygit/pkg/mygit/gfs"
"github.com/richardjennings/mygit/pkg/mygit/objects"
"github.com/richardjennings/mygit/pkg/mygit/refs"
"github.com/stretchr/testify/assert"
"io/fs"
"os"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package objects

import (
"fmt"
"github.com/richardjennings/mygit/internal/mygit/config"
"github.com/richardjennings/mygit/internal/mygit/gfs"
"github.com/richardjennings/mygit/pkg/mygit/config"
"github.com/richardjennings/mygit/pkg/mygit/gfs"
"io"
"path/filepath"
"strings"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"encoding/hex"
"errors"
"fmt"
"github.com/richardjennings/mygit/internal/mygit/config"
"github.com/richardjennings/mygit/internal/mygit/gfs"
"github.com/richardjennings/mygit/pkg/mygit/config"
"github.com/richardjennings/mygit/pkg/mygit/gfs"
"io"
"os"
"path/filepath"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"encoding/hex"
"errors"
"fmt"
"github.com/richardjennings/mygit/internal/mygit/config"
"github.com/richardjennings/mygit/internal/mygit/refs"
"github.com/richardjennings/mygit/pkg/mygit/config"
"github.com/richardjennings/mygit/pkg/mygit/refs"
"io"
"io/fs"
"os"
Expand Down
2 changes: 1 addition & 1 deletion internal/mygit/refs/refs.go → pkg/mygit/refs/refs.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"encoding/hex"
"errors"
"fmt"
"github.com/richardjennings/mygit/internal/mygit/config"
"github.com/richardjennings/mygit/pkg/mygit/config"
"io/fs"
"os"
"path/filepath"
Expand Down

0 comments on commit 8ea40a5

Please sign in to comment.