Skip to content

Commit

Permalink
refactor: ⚡ new project structrue
Browse files Browse the repository at this point in the history
  • Loading branch information
Aimerny committed May 30, 2024
1 parent 230dbc9 commit 1bd9247
Show file tree
Hide file tree
Showing 33 changed files with 31 additions and 32 deletions.
1 change: 0 additions & 1 deletion .github/workflows/go-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ jobs:
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
workdir: src/
version: latest
args: release --clean
env:
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
src/conf.json
src/session_id
conf.json
session_id
dist/
2 changes: 1 addition & 1 deletion src/.goreleaser.yml → .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ release:
draft: true
replace_existing_artifacts: true
builds:
- main: example/example.go
- main: app/example/example.go
id: kook-go
env:
- CGO_ENABLED=0
Expand Down
2 changes: 1 addition & 1 deletion .release-please/.release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"src": "0.2.1"
"app": "0.2.1"
}
2 changes: 1 addition & 1 deletion .release-please/release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"pull-request-title-pattern": "chore${scope}: 🔖 release${component} ${version}",
"separate-pull-requests": true,
"packages": {
"src": {
".": {
"release-type": "go",
"include-v-in-tag": true
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package action

import (
"github.com/aimerny/kook-go/common"
"github.com/aimerny/kook-go/core/helper"
"github.com/aimerny/kook-go/app/common"
"github.com/aimerny/kook-go/app/core/helper"
log "github.com/sirupsen/logrus"
"testing"
)
Expand Down
4 changes: 2 additions & 2 deletions src/core/action/base.go → app/core/action/base.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package action

import (
"github.com/aimerny/kook-go/common"
"github.com/aimerny/kook-go/core/helper"
"github.com/aimerny/kook-go/app/common"
"github.com/aimerny/kook-go/app/core/helper"
log "github.com/sirupsen/logrus"
"io"
)
Expand Down
4 changes: 2 additions & 2 deletions src/core/action/channel.go → app/core/action/channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package action

import (
"fmt"
"github.com/aimerny/kook-go/common"
"github.com/aimerny/kook-go/core/model"
"github.com/aimerny/kook-go/app/common"
"github.com/aimerny/kook-go/app/core/model"
jsoniter "github.com/json-iterator/go"
log "github.com/sirupsen/logrus"
)
Expand Down
4 changes: 2 additions & 2 deletions src/core/action/guild.go → app/core/action/guild.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package action

import (
"fmt"
"github.com/aimerny/kook-go/common"
"github.com/aimerny/kook-go/core/model"
"github.com/aimerny/kook-go/app/common"
"github.com/aimerny/kook-go/app/core/model"
jsoniter "github.com/json-iterator/go"
log "github.com/sirupsen/logrus"
)
Expand Down
4 changes: 2 additions & 2 deletions src/core/action/message.go → app/core/action/message.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package action

import (
"github.com/aimerny/kook-go/common"
"github.com/aimerny/kook-go/core/model"
"github.com/aimerny/kook-go/app/common"
"github.com/aimerny/kook-go/app/core/model"
)

func MessageList() {
Expand Down
2 changes: 1 addition & 1 deletion src/core/event/handler.go → app/core/event/handler.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package event

import (
"github.com/aimerny/kook-go/core/model"
"github.com/aimerny/kook-go/app/core/model"
)

type BaseEventHandler struct{}
Expand Down
2 changes: 1 addition & 1 deletion src/core/event/manager.go → app/core/event/manager.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package event

import (
"github.com/aimerny/kook-go/core/model"
"github.com/aimerny/kook-go/app/core/model"
jsoniter "github.com/json-iterator/go"
log "github.com/sirupsen/logrus"
"time"
Expand Down
2 changes: 1 addition & 1 deletion src/core/event/queue.go → app/core/event/queue.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package event

import (
"github.com/aimerny/kook-go/core/model"
"github.com/aimerny/kook-go/app/core/model"
"math"
)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/core/session/handler.go → app/core/session/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package session

import (
"context"
"github.com/aimerny/kook-go/core/helper"
"github.com/aimerny/kook-go/core/model"
"github.com/aimerny/kook-go/app/core/helper"
"github.com/aimerny/kook-go/app/core/model"
"github.com/mitchellh/mapstructure"
log "github.com/sirupsen/logrus"
"time"
Expand Down
6 changes: 3 additions & 3 deletions src/core/session/session.go → app/core/session/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"compress/zlib"
"context"
"errors"
"github.com/aimerny/kook-go/core/event"
"github.com/aimerny/kook-go/core/helper"
"github.com/aimerny/kook-go/core/model"
"github.com/aimerny/kook-go/app/core/event"
"github.com/aimerny/kook-go/app/core/helper"
"github.com/aimerny/kook-go/app/core/model"
"github.com/avast/retry-go/v4"
"github.com/gorilla/websocket"
"github.com/jasonlvhit/gocron"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"context"
"encoding/json"
"fmt"
"github.com/aimerny/kook-go/common"
"github.com/aimerny/kook-go/core/helper"
"github.com/aimerny/kook-go/core/model"
"github.com/aimerny/kook-go/app/common"
"github.com/aimerny/kook-go/app/core/helper"
"github.com/aimerny/kook-go/app/core/model"
"github.com/gorilla/websocket"
jsoniter "github.com/json-iterator/go"
log "github.com/sirupsen/logrus"
Expand Down
File renamed without changes.
10 changes: 5 additions & 5 deletions src/example/example.go → app/example/example.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package main

import (
"github.com/aimerny/kook-go/common"
"github.com/aimerny/kook-go/core/action"
"github.com/aimerny/kook-go/core/event"
"github.com/aimerny/kook-go/core/model"
"github.com/aimerny/kook-go/core/session"
"github.com/aimerny/kook-go/app/common"
"github.com/aimerny/kook-go/app/core/action"
"github.com/aimerny/kook-go/app/core/event"
"github.com/aimerny/kook-go/app/core/model"
"github.com/aimerny/kook-go/app/core/session"
log "github.com/sirupsen/logrus"
)

Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 1bd9247

Please sign in to comment.