Moved everything to internal

This commit is contained in:
OLUWADAMILOLA OKUSANYA 2023-11-24 21:17:09 -05:00
parent cb52ddab05
commit f3dede1e33
17 changed files with 26 additions and 23 deletions

2
.gitignore vendored
View File

@ -1 +1,3 @@
**/userdata/* **/userdata/*
examples
tests

View File

@ -2,7 +2,7 @@ package gosimplenpm
import ( import (
"fmt" "fmt"
"gosimplenpm/config" "gosimplenpm/internal/config"
"os" "os"
"github.com/spf13/cobra" "github.com/spf13/cobra"

View File

@ -2,8 +2,8 @@ package gosimplenpm
import ( import (
"fmt" "fmt"
"gosimplenpm/config" "gosimplenpm/internal/config"
"gosimplenpm/handler" "gosimplenpm/internal/handler"
"os" "os"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"

View File

@ -1,8 +1,8 @@
package handler package handler
import ( import (
"gosimplenpm/config" "gosimplenpm/internal/config"
"gosimplenpm/middlewares" "gosimplenpm/internal/middlewares"
"net/http" "net/http"
"time" "time"

View File

@ -8,8 +8,8 @@ import (
"github.com/gorilla/mux" "github.com/gorilla/mux"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
"gosimplenpm/config" "gosimplenpm/internal/config"
"gosimplenpm/storage" "gosimplenpm/internal/storage"
) )
func GetPackage(lg *logrus.Logger, cfg config.Config) http.HandlerFunc { func GetPackage(lg *logrus.Logger, cfg config.Config) http.HandlerFunc {

View File

@ -0,0 +1 @@
package handler

View File

@ -3,9 +3,9 @@ package handler
import ( import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"gosimplenpm/config" "gosimplenpm/internal/config"
"gosimplenpm/serviceidos" "gosimplenpm/internal/serviceidos"
"gosimplenpm/storage" "gosimplenpm/internal/storage"
"net/http" "net/http"
"net/url" "net/url"
"path" "path"

View File

@ -3,9 +3,9 @@ package handler
import ( import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"gosimplenpm/config" "gosimplenpm/internal/config"
"gosimplenpm/serviceidos" "gosimplenpm/internal/serviceidos"
"gosimplenpm/storage" "gosimplenpm/internal/storage"
"net/http" "net/http"
"net/url" "net/url"
"strconv" "strconv"

View File

@ -3,9 +3,9 @@ package handler
import ( import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"gosimplenpm/config" "gosimplenpm/internal/config"
"gosimplenpm/serviceidos" "gosimplenpm/internal/serviceidos"
"gosimplenpm/storage" "gosimplenpm/internal/storage"
"net/http" "net/http"
"net/url" "net/url"
"strconv" "strconv"

View File

@ -3,9 +3,9 @@ package handler
import ( import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"gosimplenpm/config" "gosimplenpm/internal/config"
"gosimplenpm/serviceidos" "gosimplenpm/internal/serviceidos"
"gosimplenpm/storage" "gosimplenpm/internal/storage"
"io" "io"
"net/http" "net/http"
"net/url" "net/url"

View File

@ -2,8 +2,8 @@ package handler
import ( import (
"bytes" "bytes"
"gosimplenpm/config" "gosimplenpm/internal/config"
"gosimplenpm/storage" "gosimplenpm/internal/storage"
"io" "io"
"net/http" "net/http"
"net/url" "net/url"

View File

@ -1,7 +1,7 @@
package middlewares package middlewares
import ( import (
"gosimplenpm/config" "gosimplenpm/internal/config"
"net/http" "net/http"
"strings" "strings"
) )

View File

@ -12,7 +12,7 @@ import (
"path" "path"
"strings" "strings"
"gosimplenpm/serviceidos" "gosimplenpm/internal/serviceidos"
"path/filepath" "path/filepath"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"