More standard Go project directory structure
This commit is contained in:
parent
d9d70c77b6
commit
5ed35c5a90
|
@ -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() {
|
|
@ -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"
|
|
@ -5,8 +5,7 @@ import (
|
|||
"database/sql"
|
||||
"errors"
|
||||
"math/big"
|
||||
|
||||
"whitelistmanager/store"
|
||||
"whitelistmanager/internal/store"
|
||||
)
|
||||
|
||||
const NotOwnerofServer = "user is not owner of server"
|
|
@ -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) {
|
|
@ -3,10 +3,9 @@ package minecraft
|
|||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"whitelistmanager/internal/store"
|
||||
|
||||
mcrcon "github.com/Kelwing/mc-rcon"
|
||||
|
||||
"whitelistmanager/store"
|
||||
)
|
||||
|
||||
const (
|
|
@ -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 {
|
|
@ -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 {
|
|
@ -6,8 +6,7 @@ package mock_invite
|
|||
|
||||
import (
|
||||
reflect "reflect"
|
||||
|
||||
store "whitelistmanager/store"
|
||||
"whitelistmanager/internal/store"
|
||||
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
)
|
||||
|
|
|
@ -6,8 +6,7 @@ package mock_minecraft
|
|||
|
||||
import (
|
||||
reflect "reflect"
|
||||
|
||||
store "whitelistmanager/store"
|
||||
"whitelistmanager/internal/store"
|
||||
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
)
|
||||
|
|
|
@ -6,8 +6,7 @@ package mock_store
|
|||
|
||||
import (
|
||||
reflect "reflect"
|
||||
|
||||
store "whitelistmanager/store"
|
||||
"whitelistmanager/internal/store"
|
||||
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue