More standard Go project directory structure

This commit is contained in:
Gabriel Simmer 2022-07-23 12:57:55 +01:00
parent d9d70c77b6
commit 5ed35c5a90
12 changed files with 19 additions and 27 deletions

View file

@ -3,13 +3,12 @@ package main
import (
"log"
"net/http"
"whitelistmanager/internal/invite"
"whitelistmanager/internal/minecraft"
"whitelistmanager/internal/store"
"whitelistmanager/internal/transport"
"github.com/alexedwards/flow"
"whitelistmanager/invite"
"whitelistmanager/minecraft"
"whitelistmanager/store"
"whitelistmanager/transport"
)
func main() {

View file

@ -11,11 +11,10 @@ import (
"net/http"
"os"
"time"
"whitelistmanager/internal/store"
"golang.org/x/oauth2"
"golang.org/x/oauth2/endpoints"
"whitelistmanager/store"
)
const NoMinecraftOwnership = "minecraft is not owned"

View file

@ -5,8 +5,7 @@ import (
"database/sql"
"errors"
"math/big"
"whitelistmanager/store"
"whitelistmanager/internal/store"
)
const NotOwnerofServer = "user is not owner of server"

View file

@ -3,12 +3,12 @@ package invite_test
import (
"database/sql"
"testing"
"whitelistmanager/internal/invite"
"whitelistmanager/internal/store"
"github.com/golang/mock/gomock"
"whitelistmanager/invite"
mock_store "whitelistmanager/mocks/store"
"whitelistmanager/store"
)
func TestInvite(t *testing.T) {

View file

@ -3,10 +3,9 @@ package minecraft
import (
"errors"
"fmt"
"whitelistmanager/internal/store"
mcrcon "github.com/Kelwing/mc-rcon"
"whitelistmanager/store"
)
const (

View file

@ -10,14 +10,13 @@ import (
"fmt"
"log"
"net/http"
"whitelistmanager/internal/auth"
"whitelistmanager/internal/invite"
"whitelistmanager/internal/minecraft"
"whitelistmanager/internal/store"
"github.com/alexedwards/flow"
"github.com/google/uuid"
"whitelistmanager/auth"
"whitelistmanager/invite"
"whitelistmanager/minecraft"
"whitelistmanager/store"
)
type Handler struct {

View file

@ -12,16 +12,16 @@ import (
"strings"
"testing"
"time"
"whitelistmanager/internal/invite"
"whitelistmanager/internal/store"
"whitelistmanager/internal/transport"
"github.com/alexedwards/flow"
"github.com/golang/mock/gomock"
"whitelistmanager/invite"
mock_invite "whitelistmanager/mocks/invite"
mock_minecraft "whitelistmanager/mocks/minecraft"
mock_store "whitelistmanager/mocks/store"
"whitelistmanager/store"
"whitelistmanager/transport"
)
type invitePayload struct {

View file

@ -6,8 +6,7 @@ package mock_invite
import (
reflect "reflect"
store "whitelistmanager/store"
"whitelistmanager/internal/store"
gomock "github.com/golang/mock/gomock"
)

View file

@ -6,8 +6,7 @@ package mock_minecraft
import (
reflect "reflect"
store "whitelistmanager/store"
"whitelistmanager/internal/store"
gomock "github.com/golang/mock/gomock"
)

View file

@ -6,8 +6,7 @@ package mock_store
import (
reflect "reflect"
store "whitelistmanager/store"
"whitelistmanager/internal/store"
gomock "github.com/golang/mock/gomock"
)