Skip to content

Commit

Permalink
Migrate the lib from github.com/lessgo/lessgoext to github.com/henryl…
Browse files Browse the repository at this point in the history
…ee2cn/lessgoext
  • Loading branch information
andeya committed Jan 6, 2017
1 parent 245a485 commit 125cc8e
Show file tree
Hide file tree
Showing 65 changed files with 124 additions and 124 deletions.
58 changes: 29 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Lessgo Web Framework [![GoDoc](https://godoc.org/github.com/lessgo/lessgo?status.svg)](https://godoc.org/github.com/lessgo/lessgo) [![GitHub release](https://img.shields.io/github/release/lessgo/lessgo.svg)](https://github.com/lessgo/lessgo/releases)
# Lessgo Web Framework [![GoDoc](https://godoc.org/github.com/henrylee2cn/lessgo?status.svg)](https://godoc.org/github.com/henrylee2cn/lessgo) [![GitHub release](https://img.shields.io/github/release/henrylee2cn/lessgo.svg)](https://github.com/henrylee2cn/lessgo/releases)

![Lessgo Favicon](https://github.com/lessgo/doc/raw/master/img/favicon.png)
![Lessgo Favicon](https://github.com/henrylee2cn/lessgo_doc/raw/master/img/favicon.png)

## 概述
Lessgo是一款Go语言开发的简单、稳定、高效、灵活的 web开发框架。它的项目组织形式经过精心设计,实现前后端分离、系统与业务分离,完美兼容MVC与MVVC等多种开发模式,非常利于企业级应用与API接口的开发。当然,最值得关注的是它突破性支持运行时路由重建,开发者可在Admin后台轻松配置路由,并实现启用/禁用模块或操作、添加/移除中间件等!同时,它以ApiHandler与ApiMiddleware为项目基本组成单元,可实现编译期或运行时的自由搭配组合,也令开发变得更加灵活富有趣味性。
Expand Down Expand Up @@ -32,38 +32,38 @@ Lessgo是一款Go语言开发的简单、稳定、高效、灵活的 web开发
- 支持热升级
- 另外灵活的扩展包中还包含HOTP、TOTP、UUID以及各种条码生成工具等常用工具包

![Lessgo Server](https://github.com/lessgo/doc/raw/master/img/server.jpg)
![Lessgo Server](https://github.com/lessgo/doc/raw/master/img/admin.png)
![Lessgo Server](https://github.com/henrylee2cn/lessgo_doc/raw/master/img/server.jpg)
![Lessgo Server](https://github.com/henrylee2cn/lessgo_doc/raw/master/img/admin.png)

## 框架下载

```sh
go get -u github.com/lessgo/lessgo
go get -u github.com/lessgo/less
go get -u github.com/lessgo/lessgoext/...
go get -u github.com/henrylee2cn/lessgo
go get -u github.com/henrylee2cn/less
go get -u github.com/henrylee2cn/lessgoext/...
```

## 框架构成
- 核心框架:[lessgo](https://github.com/lessgo/lessgo)
- 框架部署工具:[less](https://github.com/lessgo/less)
- 框架扩展:[lessgoext](https://github.com/lessgo/lessgoext)
- 项目Demo:[demo](https://github.com/lessgo/demo)
- 框架文档 [document](https://github.com/lessgo/doc)
- 核心框架:[lessgo](https://github.com/henrylee2cn/lessgo)
- 框架部署工具:[less](https://github.com/henrylee2cn/less)
- 框架扩展:[lessgoext](https://github.com/henrylee2cn/lessgoext)
- 项目Demo:[demo](https://github.com/henrylee2cn/lessgo_demo)
- 框架文档 [document](https://github.com/henrylee2cn/lessgo_doc)

## 代码示例

- main.go

```go
import (
"github.com/lessgo/lessgo"
"github.com/lessgo/lessgoext/swagger"
"github.com/henrylee2cn/lessgo"
"github.com/henrylee2cn/lessgoext/swagger"

_ "github.com/lessgo/lessgoext/dbservice/xorm"
// _ "github.com/lessgo/lessgoext/dbservice/gorm"
_ "github.com/henrylee2cn/lessgoext/dbservice/xorm"
// _ "github.com/henrylee2cn/lessgoext/dbservice/gorm"

_ "github.com/lessgo/demo/middleware"
_ "github.com/lessgo/demo/router"
_ "github.com/henrylee2cn/lessgo_demo/middleware"
_ "github.com/henrylee2cn/lessgo_demo/router"
)

func main() {
Expand All @@ -80,8 +80,8 @@ func main() {

```
import (
. "github.com/lessgo/lessgo"
"github.com/lessgo/demo/sysmodel/admin"
. "github.com/henrylee2cn/lessgo"
"github.com/henrylee2cn/lessgo_demo/sysmodel/admin"
)
var Index = ApiHandler{
Expand Down Expand Up @@ -160,10 +160,10 @@ var ShowHeader = lessgo.ApiMiddleware{
package router

import (
"github.com/lessgo/lessgo"
"github.com/henrylee2cn/lessgo"

"github.com/lessgo/demo/bizhandler/home"
"github.com/lessgo/demo/middleware"
"github.com/henrylee2cn/lessgo_demo/bizhandler/home"
"github.com/henrylee2cn/lessgo_demo/middleware"
)

func init() {
Expand All @@ -177,13 +177,13 @@ func init() {
```

## 系统文档
- [综述](https://github.com/lessgo/doc/blob/master/Introduction.md)
- [安装部署](https://github.com/lessgo/doc/blob/master/Install.md)
- [开始lessgo之旅](https://github.com/lessgo/doc/blob/master/Develop01.md)
- [更多(文档目录)](https://github.com/lessgo/doc/blob/master/README.md)
- [综述](https://github.com/henrylee2cn/lessgo_doc/blob/master/Introduction.md)
- [安装部署](https://github.com/henrylee2cn/lessgo_doc/blob/master/Install.md)
- [开始lessgo之旅](https://github.com/henrylee2cn/lessgo_doc/blob/master/Develop01.md)
- [更多(文档目录)](https://github.com/henrylee2cn/lessgo_doc/blob/master/README.md)

## 项目架构
![Lessgo Web Framework](https://github.com/lessgo/doc/raw/master/img/LessgoWebFramework.jpg)
![Lessgo Web Framework](https://github.com/henrylee2cn/lessgo_doc/raw/master/img/LessgoWebFramework.jpg)


## 项目目录结构
Expand Down Expand Up @@ -245,4 +245,4 @@ func init() {
[LeSou](https://github.com/LeSou)|

## 开源协议
Lessgo 项目采用商业应用友好的 [MIT](https://github.com/lessgo/lessgo/raw/master/LICENSE) 协议发布。
Lessgo 项目采用商业应用友好的 [MIT](https://github.com/henrylee2cn/lessgo/raw/master/LICENSE) 协议发布。
4 changes: 2 additions & 2 deletions barcode/codabar/encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"fmt"
"regexp"

"github.com/lessgo/lessgoext/barcode"
"github.com/lessgo/lessgoext/barcode/utils"
"github.com/henrylee2cn/lessgoext/barcode"
"github.com/henrylee2cn/lessgoext/barcode/utils"
)

var encodingTable = map[rune][]bool{
Expand Down
4 changes: 2 additions & 2 deletions barcode/code128/encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"strings"
"unicode/utf8"

"github.com/lessgo/lessgoext/barcode"
"github.com/lessgo/lessgoext/barcode/utils"
"github.com/henrylee2cn/lessgoext/barcode"
"github.com/henrylee2cn/lessgoext/barcode/utils"
)

func strToRunes(str string) []rune {
Expand Down
4 changes: 2 additions & 2 deletions barcode/code39/encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"strconv"
"strings"

"github.com/lessgo/lessgoext/barcode"
"github.com/lessgo/lessgoext/barcode/utils"
"github.com/henrylee2cn/lessgoext/barcode"
"github.com/henrylee2cn/lessgoext/barcode/utils"
)

type encodeInfo struct {
Expand Down
2 changes: 1 addition & 1 deletion barcode/datamatrix/codelayout.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package datamatrix

import (
"github.com/lessgo/lessgoext/barcode/utils"
"github.com/henrylee2cn/lessgoext/barcode/utils"
)

type setValFunc func(byte)
Expand Down
4 changes: 2 additions & 2 deletions barcode/datamatrix/datamatrixcode.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package datamatrix

import (
"github.com/lessgo/lessgoext/barcode"
"github.com/lessgo/lessgoext/barcode/utils"
"github.com/henrylee2cn/lessgoext/barcode"
"github.com/henrylee2cn/lessgoext/barcode/utils"
"image"
"image/color"
)
Expand Down
2 changes: 1 addition & 1 deletion barcode/datamatrix/encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package datamatrix
import (
"errors"

"github.com/lessgo/lessgoext/barcode"
"github.com/henrylee2cn/lessgoext/barcode"
)

// Encode returns a Datamatrix barcode for the given content
Expand Down
2 changes: 1 addition & 1 deletion barcode/datamatrix/errorcorrection.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package datamatrix

import (
"github.com/lessgo/lessgoext/barcode/utils"
"github.com/henrylee2cn/lessgoext/barcode/utils"
)

type errorCorrection struct {
Expand Down
4 changes: 2 additions & 2 deletions barcode/ean/encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ package ean
import (
"errors"

"github.com/lessgo/lessgoext/barcode"
"github.com/lessgo/lessgoext/barcode/utils"
"github.com/henrylee2cn/lessgoext/barcode"
"github.com/henrylee2cn/lessgoext/barcode/utils"
)

type encodedNumber struct {
Expand Down
2 changes: 1 addition & 1 deletion barcode/qr/alphanumeric.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"strings"

"github.com/lessgo/lessgoext/barcode/utils"
"github.com/henrylee2cn/lessgoext/barcode/utils"
)

const charSet string = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:"
Expand Down
2 changes: 1 addition & 1 deletion barcode/qr/automatic.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package qr
import (
"fmt"

"github.com/lessgo/lessgoext/barcode/utils"
"github.com/henrylee2cn/lessgoext/barcode/utils"
)

func encodeAuto(content string, ecl ErrorCorrectionLevel) (*utils.BitList, *versionInfo, error) {
Expand Down
4 changes: 2 additions & 2 deletions barcode/qr/encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ package qr
import (
"image"

"github.com/lessgo/lessgoext/barcode"
"github.com/lessgo/lessgoext/barcode/utils"
"github.com/henrylee2cn/lessgoext/barcode"
"github.com/henrylee2cn/lessgoext/barcode/utils"
)

type encodeFn func(content string, eccLevel ErrorCorrectionLevel) (*utils.BitList, *versionInfo, error)
Expand Down
2 changes: 1 addition & 1 deletion barcode/qr/encoder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"
"testing"

"github.com/lessgo/lessgoext/barcode"
"github.com/henrylee2cn/lessgoext/barcode"
)

type test struct {
Expand Down
2 changes: 1 addition & 1 deletion barcode/qr/errorcorrection.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package qr

import (
"github.com/lessgo/lessgoext/barcode/utils"
"github.com/henrylee2cn/lessgoext/barcode/utils"
)

type errorCorrection struct {
Expand Down
2 changes: 1 addition & 1 deletion barcode/qr/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"image/jpeg"
"image/png"

"github.com/lessgo/lessgoext/barcode"
"github.com/henrylee2cn/lessgoext/barcode"
)

// 常见二维码边长
Expand Down
2 changes: 1 addition & 1 deletion barcode/qr/numeric.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"strconv"

"github.com/lessgo/lessgoext/barcode/utils"
"github.com/henrylee2cn/lessgoext/barcode/utils"
)

func encodeNumeric(content string, ecl ErrorCorrectionLevel) (*utils.BitList, *versionInfo, error) {
Expand Down
4 changes: 2 additions & 2 deletions barcode/qr/qrcode.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"image/color"
"math"

"github.com/lessgo/lessgoext/barcode"
"github.com/lessgo/lessgoext/barcode/utils"
"github.com/henrylee2cn/lessgoext/barcode"
"github.com/henrylee2cn/lessgoext/barcode/utils"
)

type qrcode struct {
Expand Down
2 changes: 1 addition & 1 deletion barcode/qr/unicode.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package qr
import (
"errors"

"github.com/lessgo/lessgoext/barcode/utils"
"github.com/henrylee2cn/lessgoext/barcode/utils"
)

func encodeUnicode(content string, ecl ErrorCorrectionLevel) (*utils.BitList, *versionInfo, error) {
Expand Down
4 changes: 2 additions & 2 deletions barcode/twooffive/encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"errors"
"fmt"

"github.com/lessgo/lessgoext/barcode"
"github.com/lessgo/lessgoext/barcode/utils"
"github.com/henrylee2cn/lessgoext/barcode"
"github.com/henrylee2cn/lessgoext/barcode/utils"
)

const patternWidth = 5
Expand Down
2 changes: 1 addition & 1 deletion barcode/utils/base1dcode.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"image"
"image/color"

"github.com/lessgo/lessgoext/barcode"
"github.com/henrylee2cn/lessgoext/barcode"
)

type base1DCode struct {
Expand Down
6 changes: 3 additions & 3 deletions cache/_memcache/memcache.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
//
// Usage:
// import(
// _ "github.com/lessgo/lessgo/cache/memcache"
// "github.com/lessgo/lessgo/cache"
// _ "github.com/henrylee2cn/lessgo/cache/memcache"
// "github.com/henrylee2cn/lessgo/cache"
// )
//
// bm, err := cache.NewCache("memcache", `{"conn":"127.0.0.1:11211"}`)
Expand All @@ -38,7 +38,7 @@ import (

"time"

"github.com/lessgo/lessgoext/cache"
"github.com/henrylee2cn/lessgoext/cache"
)

// Cache Memcache adapter.
Expand Down
2 changes: 1 addition & 1 deletion cache/_memcache/memcache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"testing"
"time"

"github.com/lessgo/lessgoext/cache"
"github.com/henrylee2cn/lessgoext/cache"
)

func TestMemcacheCache(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions cache/redis/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
//
// Usage:
// import(
// _ "github.com/lessgo/lessgo/cache/redis"
// "github.com/lessgo/lessgo/cache"
// _ "github.com/henrylee2cn/lessgo/cache/redis"
// "github.com/henrylee2cn/lessgo/cache"
// )
//
// bm, err := cache.NewCache("redis", `{"conn":"127.0.0.1:11211"}`)
Expand All @@ -37,7 +37,7 @@ import (

"github.com/garyburd/redigo/redis"

"github.com/lessgo/lessgoext/cache"
"github.com/henrylee2cn/lessgoext/cache"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion cache/redis/redis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (

"github.com/garyburd/redigo/redis"

"github.com/lessgo/lessgoext/cache"
"github.com/henrylee2cn/lessgoext/cache"
)

func TestRedisCache(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cache/ssdb/ssdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/ssdb/gossdb/ssdb"

"github.com/lessgo/lessgoext/cache"
"github.com/henrylee2cn/lessgoext/cache"
)

// Cache SSDB adapter
Expand Down
2 changes: 1 addition & 1 deletion cache/ssdb/ssdb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"testing"
"time"

"github.com/lessgo/lessgoext/cache"
"github.com/henrylee2cn/lessgoext/cache"
)

func TestSsdbcacheCache(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions copyfiles/copyfiles.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"strings"
"time"

"github.com/lessgo/lessgo"
"github.com/lessgo/lessgo/utils"
"github.com/henrylee2cn/lessgo"
"github.com/henrylee2cn/lessgo/utils"
)

type FileInfo struct {
Expand Down
2 changes: 1 addition & 1 deletion dbservice/directsql/sqlengine.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"errors"
"fmt"
"github.com/go-xorm/core"
"github.com/lessgo/lessgo"
"github.com/henrylee2cn/lessgo"
)

//根据sqlid获取 *Sqlentity
Expand Down
Loading

0 comments on commit 125cc8e

Please sign in to comment.