Skip to content

Commit

Permalink
Merge pull request #1 from checkmarble/import-paths
Browse files Browse the repository at this point in the history
updated package imports
  • Loading branch information
augustin-marble authored Mar 23, 2023
2 parents 97bdb3b + 7f68d5b commit 1292df3
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 17 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM golang:1.20.1-alpine as build
FROM golang:1.20 as build

WORKDIR /go/src/app
COPY . .

RUN go mod download
RUN go get

RUN CGO_ENABLED=0 go build -o /go/bin/app -ldflags="-X 'main.version=`git describe --tags --abbrev=0`'"
RUN CGO_ENABLED=0 go build -o /go/bin/app -ldflags="-X 'main.version=`git rev-parse --short HEAD`'"

FROM gcr.io/distroless/static

Expand Down
3 changes: 2 additions & 1 deletion api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import (
"net/http"
"time"

"marble/marble-backend/app"

"github.com/go-chi/chi/v5"
"github.com/go-chi/chi/v5/middleware"
"gitlab.com/marble5/marble-backend-are-poc/app"
)

type API struct {
Expand Down
3 changes: 2 additions & 1 deletion api/handle_decision_get.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ import (
"fmt"
"net/http"

"marble/marble-backend/app"

"github.com/go-chi/chi/v5"
"gitlab.com/marble5/marble-backend-are-poc/app"
)

func (a *API) handleDecisionGet() http.HandlerFunc {
Expand Down
3 changes: 2 additions & 1 deletion api/handle_decision_post.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ import (
"fmt"
"net/http"

"marble/marble-backend/app"

"github.com/davecgh/go-spew/spew"
"gitlab.com/marble5/marble-backend-are-poc/app"
)

func (a *API) handleDecisionPost() http.HandlerFunc {
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module gitlab.com/marble5/marble-backend-are-poc
module marble/marble-backend

go 1.19
go 1.20

require (
github.com/go-chi/chi/v5 v5.0.8
Expand Down
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ import (
"syscall"
"time"

"gitlab.com/marble5/marble-backend-are-poc/api"
"gitlab.com/marble5/marble-backend-are-poc/app"
"gitlab.com/marble5/marble-backend-are-poc/pg_repository"
"marble/marble-backend/api"
"marble/marble-backend/app"
"marble/marble-backend/pg_repository"
)

var version = "local-dev"
var appName = "marble-backend-are-poc"
var appName = "marble/marble-backend"

// embed migrations sql folder
//
Expand Down
2 changes: 1 addition & 1 deletion pg_repository/fill_repository.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package pg_repository

import "gitlab.com/marble5/marble-backend-are-poc/app"
import "marble/marble-backend/app"

func (r *PGRepository) FillOrgWithTestData(orgID string) {

Expand Down
3 changes: 2 additions & 1 deletion pg_repository/handle_decision_read.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import (
"fmt"
"time"

"marble/marble-backend/app"

"github.com/jackc/pgx/v5"
"gitlab.com/marble5/marble-backend-are-poc/app"
)

func (r *PGRepository) GetDecision(orgID string, decisionID string) (decision app.Decision, err error) {
Expand Down
2 changes: 1 addition & 1 deletion pg_repository/handle_decision_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package pg_repository
import (
"context"

"gitlab.com/marble5/marble-backend-are-poc/app"
"marble/marble-backend/app"
)

func (r *PGRepository) StoreDecision(orgID string, decision app.Decision) (id string, err error) {
Expand Down
3 changes: 2 additions & 1 deletion pg_repository/load_organizations.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import (
"context"
"log"

"marble/marble-backend/app"

"github.com/jackc/pgx/v5"
"gitlab.com/marble5/marble-backend-are-poc/app"
)

func (r *PGRepository) LoadOrganizations() {
Expand Down
3 changes: 2 additions & 1 deletion pg_repository/pg_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ import (
"log"
"os"

"marble/marble-backend/app"

"github.com/jackc/pgx/v5/pgxpool"
"github.com/pressly/goose/v3"
"gitlab.com/marble5/marble-backend-are-poc/app"

_ "github.com/jackc/pgx/v5/stdlib"
)
Expand Down

0 comments on commit 1292df3

Please sign in to comment.