Skip to content

Commit 1934a11

Browse files
committed
feat: rename package name
1 parent 4cc26bf commit 1934a11

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+656
-2173
lines changed

.github/semantic.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Always validate the PR title AND all the commits
2+
titleAndCommits: true

.github/workflows/build.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: build
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
go: ['1.18', '1.22', '1.25']
11+
steps:
12+
- name: Set up Go
13+
uses: actions/setup-go@v6
14+
with:
15+
go-version: ${{ matrix.go }}
16+
17+
- name: Check out code
18+
uses: actions/checkout@v5
19+
20+
- name: Install dependencies
21+
run: |
22+
go mod download
23+
- name: Run Unit tests
24+
run: |
25+
go test -race -covermode atomic -coverprofile=covprofile ./...
26+
- name: Install goveralls
27+
run: go install github.com/mattn/goveralls@latest
28+
- name: Send coverage
29+
env:
30+
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
run: goveralls -coverprofile=covprofile -service=github
32+
33+
semantic-release:
34+
needs: [test]
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v5
38+
- uses: actions/setup-node@v6
39+
with:
40+
node-version: 'lts/*'
41+
42+
- name: Run semantic-release
43+
if: github.repository == 'go-think/think' && github.event_name == 'push'
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
run: npx semantic-release

README.md

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,34 @@
66
<strong>ThinkGo is a lightweight MVC framework written in Go (Golang).</strong>
77
</p>
88
<p align="center">
9-
<a href="https://www.travis-ci.org/forgoer/thinkgo">
9+
<a href="https://www.travis-ci.org/go-think/think">
1010
<img src="https://www.travis-ci.org/forgoer/thinkgo.svg?branch=master" alt="Build Status">
1111
</a>
12-
<a href="https://coveralls.io/github/forgoer/thinkgo">
13-
<img src="https://coveralls.io/repos/github/forgoer/thinkgo/badge.svg" alt="Coverage Status">
12+
<a href="https://coveralls.io/github/go-think/think">
13+
<img src="https://coveralls.io/repos/github/go-think/think/badge.svg" alt="Coverage Status">
1414
</a>
1515
</p>
1616
<p align="center">
17-
<a href="https://goreportcard.com/report/github.com/forgoer/thinkgo">
18-
<img src="https://goreportcard.com/badge/github.com/forgoer/thinkgo" alt="Go Report Card">
17+
<a href="https://goreportcard.com/report/github.com/go-think/think">
18+
<img src="https://goreportcard.com/badge/github.com/go-think/think" alt="Go Report Card">
1919
</a>
20-
<a href="https://codeclimate.com/github/forgoer/thinkgo/maintainability">
20+
<a href="https://codeclimate.com/github/go-think/think/maintainability">
2121
<img src="https://api.codeclimate.com/v1/badges/c315fda3b07b5aef3529/maintainability" />
2222
</a>
23-
<a href="https://godoc.org/github.com/forgoer/thinkgo">
24-
<img src="https://godoc.org/github.com/forgoer/thinkgo?status.svg" alt="GoDoc">
23+
<a href="https://godoc.org/github.com/go-think/think">
24+
<img src="https://godoc.org/github.com/go-think/think?status.svg" alt="GoDoc">
2525
</a>
26-
<a href="https://www.codetriage.com/forgoer/thinkgo">
27-
<img src="https://www.codetriage.com/forgoer/thinkgo/badges/users.svg" alt="Open Source Helpers">
26+
<a href="https://www.codetriage.com/go-think/think">
27+
<img src="https://www.codetriage.com/go-think/think/badges/users.svg" alt="Open Source Helpers">
2828
</a>
2929
<a href="https://gitter.im/think-go/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge">
3030
<img src="https://badges.gitter.im/think-go/community.svg" alt="Join the chat">
3131
</a>
32-
<a href="https://github.com/forgoer/thinkgo/releases">
33-
<img src="https://img.shields.io/github/release/forgoer/thinkgo.svg" alt="Latest Stable Version">
32+
<a href="https://github.com/go-think/think/releases">
33+
<img src="https://img.shields.io/github/release/go-think/think.svg" alt="Latest Stable Version">
3434
</a>
3535
<a href="LICENSE">
36-
<img src="https://img.shields.io/github/license/forgoer/thinkgo.svg" alt="License">
36+
<img src="https://img.shields.io/github/license/go-think/think.svg" alt="License">
3737
</a>
3838
</p>
3939

@@ -43,7 +43,7 @@
4343
The only requirement is the [Go Programming Language](https://golang.org/dl/)
4444

4545
```
46-
go get -u github.com/forgoer/thinkgo
46+
go get -u github.com/go-think/think
4747
```
4848

4949
## Quick start
@@ -54,8 +54,8 @@ package main
5454
import (
5555
"fmt"
5656

57-
"github.com/forgoer/thinkgo"
58-
"github.com/forgoer/thinkgo/think"
57+
"github.com/go-think/think"
58+
"github.com/go-think/think/think"
5959
)
6060

6161
func main() {
@@ -248,8 +248,8 @@ Below is an example of a basic controller class.
248248
package controller
249249

250250
import (
251-
"github.com/forgoer/thinkgo"
252-
"github.com/forgoer/thinkgo/context"
251+
"github.com/go-think/think"
252+
"github.com/go-think/think/context"
253253
)
254254

255255
func Index(req *context.Request) *context.Response {
@@ -426,7 +426,7 @@ type Handler interface {
426426
Once your driver has been implemented, you are ready to register it:
427427

428428
```go
429-
import "github.com/forgoer/thinkgo/session"
429+
import "github.com/go-think/think/session"
430430

431431
session.Extend("my_session", MySessionHandler)
432432
```
@@ -438,7 +438,7 @@ The logger provides the eight logging levels defined in [RFC 5424]( https://tool
438438
#### Basic Usage
439439

440440
```go
441-
import "github.com/forgoer/thinkgo/log"
441+
import "github.com/go-think/log"
442442

443443
log.Debug("log with Debug")
444444
log.Info("log with Info")
@@ -458,12 +458,12 @@ For example, if you wish to use `daily` log files, you can do this:
458458

459459
```go
460460
import (
461-
"github.com/forgoer/thinkgo/log"
462-
"github.com/forgoer/thinkgo/log/handler"
463-
"github.com/forgoer/thinkgo/log/record"
461+
"github.com/go-think/log"
462+
"github.com/go-think/log/handler"
463+
"github.com/go-think/log/record"
464464
)
465465

466-
fh := handler.NewFileHandler("path/to/thinkgo.log", record.INFO)
466+
fh := handler.NewFileHandler("path/to/think.log", record.INFO)
467467

468468
log.GetLogger().PushHandler(fh)
469469
```
@@ -476,18 +476,18 @@ ThinkGo Cache Currently supports redis, memory, and can customize the store adap
476476

477477
```go
478478
import (
479-
"github.com/forgoer/thinkgo/cache"
479+
"github.com/go-think/cache"
480480
"time"
481481
)
482482

483483

484484
var foo string
485485

486486
// Create a cache with memory store
487-
c, _ := cache.Cache(cache.NewMemoryStore("thinkgo"))
487+
c, _ := cache.Cache(cache.NewMemoryStore("think go"))
488488

489489
// Set the value
490-
c.Put("foo", "thinkgo", 10 * time.Minute)
490+
c.Put("foo", "think go", 10 * time.Minute)
491491

492492
// Get the string associated with the key "foo" from the cache
493493
c.Get("foo", &foo)
@@ -506,11 +506,11 @@ cache.Remember("foo", &a, 1*time.Minute, func() interface{} {
506506
})
507507
```
508508

509-
refer to [ThinkGo Cache]( https://github.com/forgoer/thinkgo/tree/master/cache )
509+
refer to [ThinkGo Cache]( https://github.com/go-think/think/tree/master/cache )
510510

511511
## ORM
512512

513-
refer to [ThinkORM]( https://github.com/forgoer/thinkorm )
513+
refer to [ThinkORM]( https://github.com/go-think/think )
514514

515515
## License
516516

@@ -519,5 +519,5 @@ This project is licensed under the [Apache 2.0 license](LICENSE).
519519
## Contact
520520

521521
If you have any issues or feature requests, please contact us. PR is welcomed.
522-
- https://github.com/forgoer/thinkgo/issues
523-
- techqiang@gmail.com
522+
- https://github.com/go-think/think/issues
523+
- leeqvip@gmail.com

think/app.go renamed to app.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
package think
1+
package thinkgo
22

33
import (
4-
"github.com/forgoer/thinkgo/log"
5-
"github.com/forgoer/thinkgo/router"
6-
"github.com/forgoer/thinkgo/view"
4+
"github.com/go-think/think/contract"
5+
"github.com/go-think/think/router"
6+
"github.com/go-think/think/view"
77
)
88

99
// Application the ThinkGo Application
1010
type Application struct {
1111
Env string
1212
Debug bool
13-
Logger *log.Logger
13+
Logger contract.Logger
1414
view *view.View
1515
route *router.Route
1616
}

cache/README.md

Lines changed: 0 additions & 49 deletions
This file was deleted.

cache/cache.go

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)