Skip to content

Commit

Permalink
update directory structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Muhammad Ichsan R authored and Muhammad Ichsan R committed Sep 12, 2017
1 parent cd96254 commit f942738
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 21 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Test first for your liking

Run the app

go run main.go router.go servicecontainer.go
go get github.com/mattn/go-sqlite3

And visit

Expand Down
5 changes: 3 additions & 2 deletions controllers/PlayerController.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package controllers
import (
"encoding/json"
"net/http"
"service-pattern-go/helpers"
"service-pattern-go/interfaces"
"strconv"

"github.com/irahardianto/service-pattern-go/helpers"
"github.com/irahardianto/service-pattern-go/interfaces"

"github.com/go-chi/chi"
)

Expand Down
7 changes: 4 additions & 3 deletions controllers/PlayerController_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package controllers
import (
"encoding/json"
"net/http/httptest"
"service-pattern-go/interfaces/mocks"
"service-pattern-go/models"
"service-pattern-go/viewmodels"

"github.com/irahardianto/service-pattern-go/interfaces/mocks"
"github.com/irahardianto/service-pattern-go/models"
"github.com/irahardianto/service-pattern-go/viewmodels"

"testing"

Expand Down
4 changes: 2 additions & 2 deletions helpers/PlayerHelper.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package helpers

import (
"service-pattern-go/models"
"service-pattern-go/viewmodels"
"github.com/irahardianto/service-pattern-go/models"
"github.com/irahardianto/service-pattern-go/viewmodels"
)

type PlayerHelper struct{}
Expand Down
2 changes: 1 addition & 1 deletion interfaces/IPlayerRepository.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package interfaces

import (
"service-pattern-go/models"
"github.com/irahardianto/service-pattern-go/models"
)

type IPlayerRepository interface {
Expand Down
2 changes: 1 addition & 1 deletion interfaces/IPlayerService.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package interfaces

import (
"service-pattern-go/models"
"github.com/irahardianto/service-pattern-go/models"
)

type IPlayerService interface {
Expand Down
7 changes: 4 additions & 3 deletions repositories/PlayerRepository.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package repositories

import (
"encoding/json"
"service-pattern-go/helpers"
"service-pattern-go/infrastructures"
"service-pattern-go/models"

"github.com/irahardianto/service-pattern-go/helpers"
"github.com/irahardianto/service-pattern-go/infrastructures"
"github.com/irahardianto/service-pattern-go/models"

_ "github.com/jinzhu/gorm/dialects/sqlite"
)
Expand Down
Binary file added service-pattern-go
Binary file not shown.
9 changes: 5 additions & 4 deletions servicecontainer.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package main

import (
"service-pattern-go/controllers"
"service-pattern-go/infrastructures"
"service-pattern-go/repositories"
"service-pattern-go/services"
"sync"

"github.com/irahardianto/service-pattern-go/controllers"
"github.com/irahardianto/service-pattern-go/infrastructures"
"github.com/irahardianto/service-pattern-go/repositories"
"github.com/irahardianto/service-pattern-go/services"
)

type IServiceContainer interface {
Expand Down
4 changes: 2 additions & 2 deletions services/PlayerService.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package services

import (
"service-pattern-go/interfaces"
"service-pattern-go/models"
"github.com/irahardianto/service-pattern-go/interfaces"
"github.com/irahardianto/service-pattern-go/models"
)

type PlayerService struct {
Expand Down
5 changes: 3 additions & 2 deletions services/PlayerService_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package services

import (
"service-pattern-go/interfaces/mocks"
"service-pattern-go/models"
"testing"

"github.com/irahardianto/service-pattern-go/interfaces/mocks"
"github.com/irahardianto/service-pattern-go/models"

"github.com/stretchr/testify/assert"
)

Expand Down

0 comments on commit f942738

Please sign in to comment.