Skip to content

Commit

Permalink
refactor: 移动pureftpd类型定义
Browse files Browse the repository at this point in the history
  • Loading branch information
devhaozi committed Jun 14, 2024
1 parent 2f56241 commit 5b54232
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 64 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
CGO_ENABLED: 0
GOOS: linux
GOARCH: ${{ matrix.goarch }}
run: go build -ldflags '-s -w --extldflags "-static"' -o panel-${{ matrix.goarch }}
run: go build -ldflags '-s -w --extldflags "-static"' -tags='nomsgpack' -o panel-${{ matrix.goarch }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ build:
extends: .go_cache
script:
- go mod download
- CGO_ENABLED=0 go build -ldflags '-s -w --extldflags "-static"' -o panel
- CGO_ENABLED=0 go build -ldflags '-s -w --extldflags "-static"' -tags='nomsgpack' -o panel
artifacts:
name: "panel"
paths:
Expand Down
2 changes: 2 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ builds:
- v2
ldflags:
- -s -w --extldflags "-static"
tags:
- nomsgpack

upx:
- enabled: true
Expand Down
7 changes: 7 additions & 0 deletions config/app.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package config

import (
"path/filepath"

"github.com/goravel/framework/auth"
"github.com/goravel/framework/cache"
"github.com/goravel/framework/console"
Expand All @@ -17,6 +19,7 @@ import (
"github.com/goravel/framework/queue"
"github.com/goravel/framework/route"
"github.com/goravel/framework/schedule"
"github.com/goravel/framework/support"
"github.com/goravel/framework/support/carbon"
"github.com/goravel/framework/testing"
"github.com/goravel/framework/translation"
Expand Down Expand Up @@ -70,6 +73,10 @@ func init() {
// the language folders that are provided through your application.
"fallback_locale": "zh_CN",

// Application Translation Path
//
"lang_path": filepath.Join(support.RootPath, "lang"),

// Encryption Key
//
// 32 character string, otherwise these encrypted strings
Expand Down
5 changes: 4 additions & 1 deletion config/database.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package config

import (
"path/filepath"

"github.com/goravel/framework/facades"
"github.com/goravel/framework/support"
)

func init() {
Expand All @@ -14,7 +17,7 @@ func init() {
"connections": map[string]any{
"panel": map[string]any{
"driver": "sqlite",
"database": config.Env("DB_FILE", "/www/panel/storage/panel.db"),
"database": config.Env("DB_FILE", filepath.Join(support.RootPath, "storage/panel.db")),
"prefix": "",
"singular": false, // Table name is singular
},
Expand Down
5 changes: 4 additions & 1 deletion config/filesystems.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package config

import (
"path/filepath"

"github.com/goravel/framework/facades"
"github.com/goravel/framework/support"
)

func init() {
Expand All @@ -24,7 +27,7 @@ func init() {
"disks": map[string]any{
"local": map[string]any{
"driver": "local",
"root": "/www/panel/storage",
"root": filepath.Join(support.RootPath, "storage"),
},
},
})
Expand Down
7 changes: 5 additions & 2 deletions config/http.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
package config

import (
"path/filepath"

"github.com/goravel/framework/contracts/route"
"github.com/goravel/framework/facades"
"github.com/goravel/framework/support"
ginfacades "github.com/goravel/gin/facades"
)

Expand Down Expand Up @@ -39,9 +42,9 @@ func init() {
// SSL Certificate
"ssl": map[string]any{
// ca.pem
"cert": config.Env("APP_SSL_CERT", "/www/panel/storage/ssl.crt"),
"cert": config.Env("APP_SSL_CERT", filepath.Join(support.RootPath, "storage/ssl.crt")),
// ca.key
"key": config.Env("APP_SSL_KEY", "/www/panel/storage/ssl.key"),
"key": config.Env("APP_SSL_KEY", filepath.Join(support.RootPath, "storage/ssl.key")),
},
},
})
Expand Down
24 changes: 9 additions & 15 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/docker/go-connections v0.5.0
github.com/go-resty/resty/v2 v2.13.1
github.com/gookit/validate v1.5.2
github.com/goravel/framework v1.14.1-0.20240608091017-72e9e3621f24
github.com/goravel/framework v1.14.1
github.com/goravel/gin v1.2.1
github.com/gorilla/websocket v1.5.2
github.com/libdns/alidns v1.0.3
Expand All @@ -34,11 +34,7 @@ require (
filippo.io/edwards25519 v1.1.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.2 // indirect
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.0.1 // indirect
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
github.com/Azure/go-autorest/autorest/adal v0.9.22 // indirect
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
github.com/Azure/go-autorest/logger v0.2.1 // indirect
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect
github.com/KyleBanks/depth v1.2.1 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/andybalholm/brotli v1.1.0 // indirect
Expand Down Expand Up @@ -89,9 +85,7 @@ require (
github.com/go-sql-driver/mysql v1.8.1 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
github.com/golang-migrate/migrate/v4 v4.17.1 // indirect
github.com/golang-module/carbon/v2 v2.3.12 // indirect
github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect
github.com/golang-sql/sqlexp v0.1.0 // indirect
Expand All @@ -106,8 +100,6 @@ require (
github.com/gookit/goutil v0.6.15 // indirect
github.com/goravel/file-rotatelogs/v2 v2.4.2 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgservicefile v0.0.0-20231201235250-de7065d80cb9 // indirect
Expand All @@ -121,7 +113,6 @@ require (
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
github.com/klauspost/pgzip v1.2.6 // indirect
github.com/leodido/go-urn v1.4.0 // indirect
github.com/lib/pq v1.10.9 // indirect
github.com/lithammer/fuzzysearch v1.1.8 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
Expand All @@ -132,8 +123,10 @@ require (
github.com/microsoft/go-mssqldb v1.6.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/moby/term v0.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
github.com/muesli/cancelreader v0.2.2 // indirect
github.com/muesli/termenv v0.15.2 // indirect
Expand Down Expand Up @@ -184,7 +177,6 @@ require (
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/otel/sdk v1.22.0 // indirect
go.opentelemetry.io/otel/trace v1.24.0 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/arch v0.8.0 // indirect
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect
Expand All @@ -200,14 +192,16 @@ require (
google.golang.org/protobuf v1.34.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
gorm.io/driver/mysql v1.5.6 // indirect
gorm.io/driver/postgres v1.5.7 // indirect
gorm.io/driver/mysql v1.5.7 // indirect
gorm.io/driver/postgres v1.5.9 // indirect
gorm.io/driver/sqlserver v1.5.3 // indirect
gorm.io/gorm v1.25.10 // indirect
gorm.io/plugin/dbresolver v1.5.1 // indirect
gorm.io/plugin/dbresolver v1.5.2 // indirect
gotest.tools/v3 v3.5.0 // indirect
modernc.org/libc v1.37.6 // indirect
modernc.org/mathutil v1.6.0 // indirect
modernc.org/memory v1.7.2 // indirect
modernc.org/sqlite v1.28.0 // indirect
)

replace github.com/goravel/framework => github.com/TheTNB/framework v0.0.0-20240614113834-959d526f683d
Loading

0 comments on commit 5b54232

Please sign in to comment.