Skip to content

Commit

Permalink
refactor: 新年快乐
Browse files Browse the repository at this point in the history
  • Loading branch information
devhaozi committed Jan 1, 2025
1 parent c88d2ba commit 8b0e7bc
Show file tree
Hide file tree
Showing 161 changed files with 525 additions and 525 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ jobs:
GOARCH: ${{ matrix.goarch }}
run: |
LDFLAGS="-s -w --extldflags '-static'"
LDFLAGS="${LDFLAGS} -X 'github.com/TheTNB/panel/internal/app.Version=${VERSION}'"
LDFLAGS="${LDFLAGS} -X 'github.com/TheTNB/panel/internal/app.BuildTime=${BUILD_TIME}'"
LDFLAGS="${LDFLAGS} -X 'github.com/TheTNB/panel/internal/app.CommitHash=${COMMIT_HASH}'"
LDFLAGS="${LDFLAGS} -X 'github.com/TheTNB/panel/internal/app.GoVersion=${GO_VERSION}'"
LDFLAGS="${LDFLAGS} -X 'github.com/TheTNB/panel/internal/app.BuildID=${BUILD_ID}'"
LDFLAGS="${LDFLAGS} -X 'github.com/TheTNB/panel/internal/app.BuildUser=${BUILD_USER}'"
LDFLAGS="${LDFLAGS} -X 'github.com/TheTNB/panel/internal/app.BuildHost=${BUILD_HOST}'"
LDFLAGS="${LDFLAGS} -X 'github.com/tnb-labs/panel/internal/app.Version=${VERSION}'"
LDFLAGS="${LDFLAGS} -X 'github.com/tnb-labs/panel/internal/app.BuildTime=${BUILD_TIME}'"
LDFLAGS="${LDFLAGS} -X 'github.com/tnb-labs/panel/internal/app.CommitHash=${COMMIT_HASH}'"
LDFLAGS="${LDFLAGS} -X 'github.com/tnb-labs/panel/internal/app.GoVersion=${GO_VERSION}'"
LDFLAGS="${LDFLAGS} -X 'github.com/tnb-labs/panel/internal/app.BuildID=${BUILD_ID}'"
LDFLAGS="${LDFLAGS} -X 'github.com/tnb-labs/panel/internal/app.BuildUser=${BUILD_USER}'"
LDFLAGS="${LDFLAGS} -X 'github.com/tnb-labs/panel/internal/app.BuildHost=${BUILD_HOST}'"
go build -ldflags "${LDFLAGS}" -o web-${{ matrix.goarch }} ./cmd/web
go build -ldflags "${LDFLAGS}" -o cli-${{ matrix.goarch }} ./cmd/cli
- name: Compress ${{ matrix.goarch }}
Expand Down
28 changes: 14 additions & 14 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ builds:
- arm64
ldflags:
- -s -w --extldflags "-static"
- -X 'github.com/TheTNB/panel/internal/app.Version={{ .Version }}'
- -X 'github.com/TheTNB/panel/internal/app.BuildTime={{ .Now.Format "2006-01-02 15:04:05 MST" }}'
- -X 'github.com/TheTNB/panel/internal/app.CommitHash={{ .ShortCommit }}'
- -X 'github.com/TheTNB/panel/internal/app.GoVersion={{ .Env.GOVERSION }}'
- -X 'github.com/TheTNB/panel/internal/app.BuildID={{ .Env.GITHUB_RUN_ID }}'
- -X 'github.com/TheTNB/panel/internal/app.BuildUser={{ .Env.USER }}'
- -X 'github.com/TheTNB/panel/internal/app.BuildHost={{ .Env.HOSTNAME }}'
- -X 'github.com/tnb-labs/panel/internal/app.Version={{ .Version }}'
- -X 'github.com/tnb-labs/panel/internal/app.BuildTime={{ .Now.Format "2006-01-02 15:04:05 MST" }}'
- -X 'github.com/tnb-labs/panel/internal/app.CommitHash={{ .ShortCommit }}'
- -X 'github.com/tnb-labs/panel/internal/app.GoVersion={{ .Env.GOVERSION }}'
- -X 'github.com/tnb-labs/panel/internal/app.BuildID={{ .Env.GITHUB_RUN_ID }}'
- -X 'github.com/tnb-labs/panel/internal/app.BuildUser={{ .Env.USER }}'
- -X 'github.com/tnb-labs/panel/internal/app.BuildHost={{ .Env.HOSTNAME }}'
- id: cli
main: ./cmd/cli
binary: cli
Expand All @@ -33,13 +33,13 @@ builds:
- arm64
ldflags:
- -s -w --extldflags "-static"
- -X 'github.com/TheTNB/panel/internal/app.Version={{ .Version }}'
- -X 'github.com/TheTNB/panel/internal/app.BuildTime={{ .Now.Format "2006-01-02 15:04:05 MST" }}'
- -X 'github.com/TheTNB/panel/internal/app.CommitHash={{ .ShortCommit }}'
- -X 'github.com/TheTNB/panel/internal/app.GoVersion={{ .Env.GOVERSION }}'
- -X 'github.com/TheTNB/panel/internal/app.BuildID={{ .Env.GITHUB_RUN_ID }}'
- -X 'github.com/TheTNB/panel/internal/app.BuildUser={{ .Env.USER }}'
- -X 'github.com/TheTNB/panel/internal/app.BuildHost={{ .Env.HOSTNAME }}'
- -X 'github.com/tnb-labs/panel/internal/app.Version={{ .Version }}'
- -X 'github.com/tnb-labs/panel/internal/app.BuildTime={{ .Now.Format "2006-01-02 15:04:05 MST" }}'
- -X 'github.com/tnb-labs/panel/internal/app.CommitHash={{ .ShortCommit }}'
- -X 'github.com/tnb-labs/panel/internal/app.GoVersion={{ .Env.GOVERSION }}'
- -X 'github.com/tnb-labs/panel/internal/app.BuildID={{ .Env.GITHUB_RUN_ID }}'
- -X 'github.com/tnb-labs/panel/internal/app.BuildUser={{ .Env.USER }}'
- -X 'github.com/tnb-labs/panel/internal/app.BuildHost={{ .Env.HOSTNAME }}'

upx:
- enabled: true
Expand Down
2 changes: 1 addition & 1 deletion .mockery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ outpkg: "{{.PackageName}}"
filename: "{{.InterfaceName}}.go"
all: True
packages:
github.com/TheTNB/panel/internal/biz:
github.com/tnb-labs/panel/internal/biz:
config:
recursive: True
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<h1 align="center" style="font-size: 40px">耗子面板</h1>

<p align="center">
<a href="https://github.com/TheTNB/panel/releases"><img src="https://img.shields.io/github/release/TheTNB/panel.svg"></a>
<a href="https://github.com/TheTNB/panel/actions"><img src="https://github.com/TheTNB/panel/actions/workflows/test.yml/badge.svg"></a>
<a href="https://goreportcard.com/report/github.com/TheTNB/panel"><img src="https://goreportcard.com/badge/github.com/TheTNB/panel"></a>
<a href="https://img.shields.io/github/license/TheTNB/panel"><img src="https://img.shields.io/github/license/TheTNB/panel"></a>
<a href="https://app.fossa.com/projects/git%2Bgithub.com%2FTheTNB%2Fpanel?ref=badge_shield"><img src="https://app.fossa.com/api/projects/git%2Bgithub.com%2FTheTNB%2Fpanel.svg?type=shield" alt="FOSSA Status"></a>
<a href="https://github.com/tnb-labs/panel/releases"><img src="https://img.shields.io/github/release/tnb-labs/panel.svg"></a>
<a href="https://github.com/tnb-labs/panel/actions"><img src="https://github.com/tnb-labs/panel/actions/workflows/test.yml/badge.svg"></a>
<a href="https://goreportcard.com/report/github.com/tnb-labs/panel"><img src="https://goreportcard.com/badge/github.com/tnb-labs/panel"></a>
<a href="https://img.shields.io/github/license/tnb-labs/panel"><img src="https://img.shields.io/github/license/tnb-labs/panel"></a>
<a href="https://app.fossa.com/projects/git%2Bgithub.com%2Ftnb-labs%2Fpanel?ref=badge_shield"><img src="https://app.fossa.com/api/projects/git%2Bgithub.com%2Ftnb-labs%2Fpanel.svg?type=shield" alt="FOSSA Status"></a>
</p>

企业级全能服务器运维管理面板。简单轻量,高效运维。
Expand Down Expand Up @@ -62,16 +62,16 @@

<p align="center">
<a target="_blank" href="https://afdian.com/a/tnblabs">
<img alt="sponsors" src="https://github.com/TheTNB/sponsor/blob/main/sponsors.svg?raw=true"/>
<img alt="sponsors" src="https://github.com/tnb-labs/sponsor/blob/main/sponsors.svg?raw=true"/>
</a>
</p>

## Star 历史

<a href="https://star-history.com/#TheTNB/panel&Date">
<a href="https://star-history.com/#tnb-labs/panel&Date">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=TheTNB/panel&type=Date&theme=dark" />
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=TheTNB/panel&type=Date" />
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=TheTNB/panel&type=Date" />
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=tnb-labs/panel&type=Date&theme=dark" />
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=tnb-labs/panel&type=Date" />
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=tnb-labs/panel&type=Date" />
</picture>
</a>
20 changes: 10 additions & 10 deletions README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<h1 align="center" style="font-size: 40px">Rat Panel</h1>

<p align="center">
<a href="https://github.com/TheTNB/panel/releases"><img src="https://img.shields.io/github/release/TheTNB/panel.svg"></a>
<a href="https://github.com/TheTNB/panel/actions"><img src="https://github.com/TheTNB/panel/actions/workflows/test.yml/badge.svg"></a>
<a href="https://goreportcard.com/report/github.com/TheTNB/panel"><img src="https://goreportcard.com/badge/github.com/TheTNB/panel"></a>
<a href="https://img.shields.io/github/license/TheTNB/panel"><img src="https://img.shields.io/github/license/TheTNB/panel"></a>
<a href="https://app.fossa.com/projects/git%2Bgithub.com%2FTheTNB%2Fpanel?ref=badge_shield"><img src="https://app.fossa.com/api/projects/git%2Bgithub.com%2FTheTNB%2Fpanel.svg?type=shield" alt="FOSSA Status"></a>
<a href="https://github.com/tnb-labs/panel/releases"><img src="https://img.shields.io/github/release/tnb-labs/panel.svg"></a>
<a href="https://github.com/tnb-labs/panel/actions"><img src="https://github.com/tnb-labs/panel/actions/workflows/test.yml/badge.svg"></a>
<a href="https://goreportcard.com/report/github.com/tnb-labs/panel"><img src="https://goreportcard.com/badge/github.com/tnb-labs/panel"></a>
<a href="https://img.shields.io/github/license/tnb-labs/panel"><img src="https://img.shields.io/github/license/tnb-labs/panel"></a>
<a href="https://app.fossa.com/projects/git%2Bgithub.com%2Ftnb-labs%2Fpanel?ref=badge_shield"><img src="https://app.fossa.com/api/projects/git%2Bgithub.com%2Ftnb-labs%2Fpanel.svg?type=shield" alt="FOSSA Status"></a>
</p>

Enterprise-level all-in-one server operation and maintenance management panel. Simple and lightweight, efficient operation and maintenance.
Expand Down Expand Up @@ -62,16 +62,16 @@ If the Rat Panel is helpful to you, welcome to sponsor us, also thanks to the fo

<p align="center">
<a target="_blank" href="https://afdian.com/a/tnblabs">
<img alt="sponsors" src="https://github.com/TheTNB/sponsor/blob/main/sponsors.svg?raw=true"/>
<img alt="sponsors" src="https://github.com/tnb-labs/sponsor/blob/main/sponsors.svg?raw=true"/>
</a>
</p>

## Star History

<a href="https://star-history.com/#TheTNB/panel&Date">
<a href="https://star-history.com/#tnb-labs/panel&Date">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=TheTNB/panel&type=Date&theme=dark" />
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=TheTNB/panel&type=Date" />
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=TheTNB/panel&type=Date" />
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=tnb-labs/panel&type=Date&theme=dark" />
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=tnb-labs/panel&type=Date" />
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=tnb-labs/panel&type=Date" />
</picture>
</a>
10 changes: 5 additions & 5 deletions cmd/cli/wire.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ package main
import (
"github.com/google/wire"

"github.com/TheTNB/panel/internal/app"
"github.com/TheTNB/panel/internal/bootstrap"
"github.com/TheTNB/panel/internal/data"
"github.com/TheTNB/panel/internal/route"
"github.com/TheTNB/panel/internal/service"
"github.com/tnb-labs/panel/internal/app"
"github.com/tnb-labs/panel/internal/bootstrap"
"github.com/tnb-labs/panel/internal/data"
"github.com/tnb-labs/panel/internal/route"
"github.com/tnb-labs/panel/internal/service"
)

// initCli init command line.
Expand Down
10 changes: 5 additions & 5 deletions cmd/cli/wire_gen.go

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

16 changes: 8 additions & 8 deletions cmd/web/wire.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ package main
import (
"github.com/google/wire"

"github.com/TheTNB/panel/internal/app"
"github.com/TheTNB/panel/internal/apps"
"github.com/TheTNB/panel/internal/bootstrap"
"github.com/TheTNB/panel/internal/data"
"github.com/TheTNB/panel/internal/http/middleware"
"github.com/TheTNB/panel/internal/job"
"github.com/TheTNB/panel/internal/route"
"github.com/TheTNB/panel/internal/service"
"github.com/tnb-labs/panel/internal/app"
"github.com/tnb-labs/panel/internal/apps"
"github.com/tnb-labs/panel/internal/bootstrap"
"github.com/tnb-labs/panel/internal/data"
"github.com/tnb-labs/panel/internal/http/middleware"
"github.com/tnb-labs/panel/internal/job"
"github.com/tnb-labs/panel/internal/route"
"github.com/tnb-labs/panel/internal/service"
)

// initWeb init application.
Expand Down
52 changes: 26 additions & 26 deletions cmd/web/wire_gen.go

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

4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/TheTNB/panel
module github.com/tnb-labs/panel

go 1.23

Expand Down Expand Up @@ -90,5 +90,5 @@ require (

replace (
github.com/libdns/tencentcloud => github.com/devhaozi/tencentcloud v0.0.0-20241129095955-7d4e898ce504
github.com/mholt/acmez/v3 => github.com/TheTNB/acmez/v3 v3.0.0-20241217024017-a2f2c48efdcc
github.com/mholt/acmez/v3 => github.com/tnb-labs/acmez/v3 v3.0.0-20241217024017-a2f2c48efdcc
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
github.com/TheTNB/acmez/v3 v3.0.0-20241217024017-a2f2c48efdcc h1:Nh7pc2CKHFF1lg+38slGKgJZ4A8cG30ERs7pwK/+V6Y=
github.com/TheTNB/acmez/v3 v3.0.0-20241217024017-a2f2c48efdcc/go.mod h1:L1wOU06KKvq7tswuMDwKdcHeKpFFgkppZy/y0DFxagQ=
github.com/bddjr/hlfhr v1.3.6 h1:XautNR6Vomud8SGh1V1Yjoj1L4YblsNM0ZUwZ7r3q4U=
github.com/bddjr/hlfhr v1.3.6/go.mod h1:oyIv4Q9JpCgZFdtH3KyTNWp7YYRWl4zl8k4ozrMAB4g=
github.com/beevik/ntp v1.4.3 h1:PlbTvE5NNy4QHmA4Mg57n7mcFTmr1W1j3gcK7L1lqho=
Expand Down Expand Up @@ -147,6 +145,8 @@ github.com/tklauser/go-sysconf v0.3.14 h1:g5vzr9iPFFz24v2KZXs/pvpvh8/V9Fw6vQK5ZZ
github.com/tklauser/go-sysconf v0.3.14/go.mod h1:1ym4lWMLUOhuBOPGtRcJm7tEGX4SCYNEEEtghGG/8uY=
github.com/tklauser/numcpus v0.8.0 h1:Mx4Wwe/FjZLeQsK/6kt2EOepwwSl7SmJrK5bV/dXYgY=
github.com/tklauser/numcpus v0.8.0/go.mod h1:ZJZlAY+dmR4eut8epnzf0u/VwodKmryxR8txiloSqBE=
github.com/tnb-labs/acmez/v3 v3.0.0-20241217024017-a2f2c48efdcc h1:DjqfrS/10NQOqx8yFtPcNfbAN5wrjnYgaub+ZQXPHEY=
github.com/tnb-labs/acmez/v3 v3.0.0-20241217024017-a2f2c48efdcc/go.mod h1:L1wOU06KKvq7tswuMDwKdcHeKpFFgkppZy/y0DFxagQ=
github.com/tufanbarisyildirim/gonginx v0.0.0-20241225173012-5cc15aab65bd h1:PYNV7LTzEzZ4lousHUM2yaDO2zI3FNt9NA0iuGrbK7w=
github.com/tufanbarisyildirim/gonginx v0.0.0-20241225173012-5cc15aab65bd/go.mod h1:hdMWBc1+TyB6G5ZZBBgPWQ8cjRZ6zpYdhal0uu6E9QM=
github.com/urfave/cli/v3 v3.0.0-beta1 h1:6DTaaUarcM0wX7qj5Hcvs+5Dm3dyUTBbEwIWAjcw9Zg=
Expand Down
2 changes: 1 addition & 1 deletion internal/app/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/knadh/koanf/v2"
"github.com/robfig/cron/v3"

"github.com/TheTNB/panel/pkg/queue"
"github.com/tnb-labs/panel/pkg/queue"
)

type Web struct {
Expand Down
36 changes: 18 additions & 18 deletions internal/apps/apps.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@ import (
"github.com/go-chi/chi/v5"
"github.com/google/wire"

"github.com/TheTNB/panel/internal/apps/benchmark"
"github.com/TheTNB/panel/internal/apps/docker"
"github.com/TheTNB/panel/internal/apps/fail2ban"
"github.com/TheTNB/panel/internal/apps/frp"
"github.com/TheTNB/panel/internal/apps/gitea"
"github.com/TheTNB/panel/internal/apps/memcached"
"github.com/TheTNB/panel/internal/apps/mysql"
"github.com/TheTNB/panel/internal/apps/nginx"
"github.com/TheTNB/panel/internal/apps/php"
"github.com/TheTNB/panel/internal/apps/phpmyadmin"
"github.com/TheTNB/panel/internal/apps/podman"
"github.com/TheTNB/panel/internal/apps/postgresql"
"github.com/TheTNB/panel/internal/apps/pureftpd"
"github.com/TheTNB/panel/internal/apps/redis"
"github.com/TheTNB/panel/internal/apps/rsync"
"github.com/TheTNB/panel/internal/apps/s3fs"
"github.com/TheTNB/panel/internal/apps/supervisor"
"github.com/TheTNB/panel/internal/apps/toolbox"
"github.com/tnb-labs/panel/internal/apps/benchmark"
"github.com/tnb-labs/panel/internal/apps/docker"
"github.com/tnb-labs/panel/internal/apps/fail2ban"
"github.com/tnb-labs/panel/internal/apps/frp"
"github.com/tnb-labs/panel/internal/apps/gitea"
"github.com/tnb-labs/panel/internal/apps/memcached"
"github.com/tnb-labs/panel/internal/apps/mysql"
"github.com/tnb-labs/panel/internal/apps/nginx"
"github.com/tnb-labs/panel/internal/apps/php"
"github.com/tnb-labs/panel/internal/apps/phpmyadmin"
"github.com/tnb-labs/panel/internal/apps/podman"
"github.com/tnb-labs/panel/internal/apps/postgresql"
"github.com/tnb-labs/panel/internal/apps/pureftpd"
"github.com/tnb-labs/panel/internal/apps/redis"
"github.com/tnb-labs/panel/internal/apps/rsync"
"github.com/tnb-labs/panel/internal/apps/s3fs"
"github.com/tnb-labs/panel/internal/apps/supervisor"
"github.com/tnb-labs/panel/internal/apps/toolbox"
)

var ProviderSet = wire.NewSet(
Expand Down
2 changes: 1 addition & 1 deletion internal/apps/benchmark/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

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

"github.com/TheTNB/panel/internal/service"
"github.com/tnb-labs/panel/internal/service"
)

type App struct {
Expand Down
6 changes: 3 additions & 3 deletions internal/apps/docker/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (

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

"github.com/TheTNB/panel/internal/service"
"github.com/TheTNB/panel/pkg/io"
"github.com/TheTNB/panel/pkg/systemctl"
"github.com/tnb-labs/panel/internal/service"
"github.com/tnb-labs/panel/pkg/io"
"github.com/tnb-labs/panel/pkg/systemctl"
)

type App struct{}
Expand Down
10 changes: 5 additions & 5 deletions internal/apps/fail2ban/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import (
"github.com/go-rat/utils/str"
"github.com/spf13/cast"

"github.com/TheTNB/panel/internal/app"
"github.com/TheTNB/panel/internal/biz"
"github.com/TheTNB/panel/internal/service"
"github.com/TheTNB/panel/pkg/io"
"github.com/TheTNB/panel/pkg/shell"
"github.com/tnb-labs/panel/internal/app"
"github.com/tnb-labs/panel/internal/biz"
"github.com/tnb-labs/panel/internal/service"
"github.com/tnb-labs/panel/pkg/io"
"github.com/tnb-labs/panel/pkg/shell"
)

type App struct {
Expand Down
Loading

0 comments on commit 8b0e7bc

Please sign in to comment.