Skip to content

Commit

Permalink
with bun
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaalrazzak committed Oct 2, 2024
1 parent f1a42c5 commit 1d2d799
Show file tree
Hide file tree
Showing 26 changed files with 437 additions and 817 deletions.
28 changes: 3 additions & 25 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,25 +1,3 @@
# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
#
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Dependency directories (remove the comment below to include it)
# vendor/

# Go workspace file
go.work
go.work.sum

# env file
.env
*.s3db
.idea
.env
29 changes: 0 additions & 29 deletions .idea/dataSources.xml

This file was deleted.

9 changes: 0 additions & 9 deletions .idea/e-campus-be.iml

This file was deleted.

2 changes: 1 addition & 1 deletion .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions .idea/sqldialects.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ test:

fmt:
gofmt -w -s ./
goimports -w -local github.com/go-bun/bun-starter-kit ./
goimports -w -local ecampus-be ./
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# bun starter kit

[![build workflow](https://github.com/go-bun/bun-starter-kit/actions/workflows/build.yml/badge.svg)](https://github.com/go-bun/bun-starter-kit/actions)
[![build workflow](https://ecampus-be/actions/workflows/build.yml/badge.svg)](https://ecampus-be/actions)

Bun starter kit consists of:

Expand All @@ -18,7 +18,7 @@ API built with Bun starter kit.
To start using this kit, clone the repo:

```shell
git clone https://github.com/go-bun/bun-starter-kit.git
git clone https://ecampus-be.git
```

Make sure you have correct information in `app/config/test.yaml` and then run migrations (database
Expand Down
2 changes: 1 addition & 1 deletion bunapp/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package bunapp
import (
"net/http"

"github.com/go-bun/bun-starter-kit/httputil/httperror"
"ecampus-be/httputil/httperror"
"github.com/uptrace/bunrouter"
"github.com/uptrace/bunrouter/extra/bunrouterotel"
"github.com/uptrace/bunrouter/extra/reqlog"
Expand Down
8 changes: 4 additions & 4 deletions cmd/bun/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"strings"
"time"

"github.com/go-bun/bun-starter-kit/bunapp"
"github.com/go-bun/bun-starter-kit/cmd/bun/migrations"
_ "github.com/go-bun/bun-starter-kit/ecampus"
"github.com/go-bun/bun-starter-kit/httputil"
"ecampus-be/bunapp"
"ecampus-be/cmd/bun/migrations"
_ "ecampus-be/ecampus"

Check failure on line 13 in cmd/bun/main.go

View workflow job for this annotation

GitHub Actions / lint

could not import ecampus-be/ecampus (-: # ecampus-be/ecampus
"ecampus-be/httputil"
"github.com/uptrace/bun/migrate"

"github.com/urfave/cli/v2"
Expand Down
4 changes: 2 additions & 2 deletions cmd/bun/migrations/20210505110026_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package migrations

import (
"context"
"github.com/go-bun/bun-starter-kit/ecampus"
"ecampus-be/ecampus"

Check failure on line 5 in cmd/bun/migrations/20210505110026_init.go

View workflow job for this annotation

GitHub Actions / lint

could not import ecampus-be/ecampus (-: # ecampus-be/ecampus

"github.com/go-bun/bun-starter-kit/bunapp"
"ecampus-be/bunapp"
"github.com/uptrace/bun"
"github.com/uptrace/bun/dbfixture"
)
Expand Down
53 changes: 0 additions & 53 deletions config/config.go

This file was deleted.

126 changes: 0 additions & 126 deletions database/database.go

This file was deleted.

2 changes: 1 addition & 1 deletion ecampus/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package ecampus
import (
"context"

"github.com/go-bun/bun-starter-kit/bunapp"
"ecampus-be/bunapp"
)

func init() {
Expand Down
4 changes: 2 additions & 2 deletions ecampus/user_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/go-bun/bun-starter-kit/ecampus/helpers"
"ecampus-be/ecampus/helpers"
"net/http"

"github.com/bwmarrin/snowflake"
"github.com/go-bun/bun-starter-kit/bunapp"
"ecampus-be/bunapp"
"github.com/uptrace/bunrouter"
)

Expand Down
6 changes: 3 additions & 3 deletions ecampus/user_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"net/http/httptest"
"testing"

"github.com/go-bun/bun-starter-kit/bunapp"
"github.com/go-bun/bun-starter-kit/ecampus"
"github.com/go-bun/bun-starter-kit/testbed"
"ecampus-be/bunapp"
"ecampus-be/ecampus"

Check failure on line 8 in ecampus/user_handler_test.go

View workflow job for this annotation

GitHub Actions / lint

could not import ecampus-be/ecampus (-: # ecampus-be/ecampus
"ecampus-be/testbed"
"github.com/stretchr/testify/require"
"github.com/uptrace/bun/dbfixture"
)
Expand Down
2 changes: 1 addition & 1 deletion ecampus/welcome_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net/http"
"text/template"

"github.com/go-bun/bun-starter-kit/bunapp"
"ecampus-be/bunapp"
"github.com/uptrace/bunrouter"
)

Expand Down
2 changes: 1 addition & 1 deletion ecampus/welcome_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"net/http/httptest"
"testing"

"github.com/go-bun/bun-starter-kit/testbed"
"ecampus-be/testbed"
"github.com/stretchr/testify/require"
)

Expand Down
Loading

0 comments on commit 1d2d799

Please sign in to comment.