profile
viewpoint
astaxie astaxie jimengIO Shanghai, China http://beego.me Write the testable code

astaxie/build-web-application-with-golang 33830

A golang ebook intro how to build a web with golang

astaxie/beego 23308

beego is an open-source, high-performance web framework for the Go programming language.

astaxie/bat 2258

Go implement CLI, cURL-like tool for humans

astaxie/beedb 708

beedb is a go ORM,support database/sql interface,pq/mysql/sqlite

astaxie/beeku 82

go libs

astaxie/bee 52

Bee is a tool for managing beego framework.

astaxie/flatmap 38

flatmap transform nested map to flatten map

astaxie/beegae 37

beego for GAE

astaxie/beepkg 28

an app base on beego

astaxie/docs 28

beego's new docs

issue commentastaxie/beego

toolbox 定时任务调度问题

每一个task你输出task1,task2,task3试试看,我本机测试没问题啊

Scharfsinnig

comment created time in 4 days

push eventastaxie/beego

BurtonQin

commit sha cfdd1cd5be095449d40e7831fd4d622a20e3e004

cache, context, session: add lock to fix inconsistent field protection

view details

astaxie

commit sha 8f3d1c5f42fce57e83e1c3f7d180477595db7cca

Merge pull request #3922 from BurtonQin/bug-1-2-3-inconsistent-field-protection cache, context, session: add lock to fix inconsistent field protection

view details

push time in 4 days

PR merged astaxie/beego

cache, context, session: add lock to fix inconsistent field protection

Inconsistent Field Protection: A field in a structure is sometimes protected by Mutex, but sometimes unprotected. Developers may forget to protect the field with Mutex, leading to data race. In cache/memory.go, bc.items is protected by bc.RLock() except for L221. In contex/input.go, input.data is protected by input.dataLock() except for L74. In session/sess_cookie.go, st.values is protected by st.lock.Lock() except for L77.

+7 -0

0 comment

3 changed files

BurtonQin

pr closed time in 4 days

push eventastaxie/beego

陈晓宇

commit sha 713503e43d15a80bfe377870399c1e6825662398

fix exist typo

view details

astaxie

commit sha 2410b364af8274f713ebf5213ac6c684e5ff7c02

Merge pull request #3923 from timchenxiaoyu/develop fix exist typo

view details

push time in 5 days

PR merged astaxie/beego

fix exist typo

fix exist typo

+3 -3

0 comment

2 changed files

timchenxiaoyu

pr closed time in 5 days

issue commentastaxie/beego

toolbox 定时任务调度问题

你抽离一下你的逻辑,你能提供一下例子代码复现吗?

Scharfsinnig

comment created time in 5 days

created repositorygocn/awesome-go

awesome-go for gopherchina

created time in 7 days

startedgoproxyio/goproxy

started time in 8 days

issue openedruby-china/homeland

wrong number of arguments (given 0, expected 1)

Method:      GET
URL:         /admin/users
Controller:  admin/users#index
RequestId:   374b9fb4-8658-4372-8f0c-68a7a1ce4968
User-Agent:  Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36
Remote IP:   172.20.0.8
Language:    zh-CN,zh;q=0.9,en;q=0.8,de;q=0.7,vi;q=0.6,zh-TW;q=0.5,da;q=0.4
Server:      5f67149ce326
Process:     685

--------------------------------------------------

#<ActionView::Template::Error: wrong number of arguments (given 0, expected 1)>


/home/app/homeland/app/models/team.rb:26:in `member?'
/home/app/homeland/app/views/admin/users/index.html.erb:36:in `block in _app_views_admin_users_index_html_erb___2860333311836784842_47056070919340'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.2.1/lib/active_record/relation/delegation.rb:85:in `each'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.2.1/lib/active_record/relation/delegation.rb:85:in `each'
/home/app/homeland/app/views/admin/users/index.html.erb:31:in `_app_views_admin_users_index_html_erb___2860333311836784842_47056070919340'

我大概看了一下代码,好像是https://github.com/ruby-china/homeland/blob/master/app/views/admin/users/index.html.erb#L36 这一行调用member的时候没有传值,因为如果是team类型的话看这一行代码https://github.com/ruby-china/homeland/blob/master/app/models/team.rb#L26 是需要传递的

created time in 9 days

PR opened gobackup/gobackup.github.io

fix the typo
+1 -1

0 comment

1 changed file

pr created time in 11 days

push eventastaxie/gobackup.github.io

astaxie

commit sha 22a85aed3f9c26a79183c2f9fcc8a21385c19fec

fix the typo

view details

push time in 11 days

issue commentgeektutu/geektutu-blog

7天用Go从零实现Web框架Gee教程 | 极客兔兔

Hello 兔兔,我看你这个七天系列不错啊,可以发布到我们GopherChina社区来,让更多的Gopher知道,https://gocn.vip

geektutu

comment created time in 13 days

PR opened ruby-china/homeland

add bilibili filter

support bilibili video

+8 -0

0 comment

1 changed file

pr created time in 14 days

push eventastaxie/homeland

astaxie

commit sha 20a3220d9b486f13a7e6cf0eaad55c392f6b44b6

add bilibili filter support bilibili video

view details

push time in 14 days

fork astaxie/homeland

:circus_tent: Open source discussion website.

https://homeland.ruby-china.org

fork in 14 days

fork astaxie/go-advice

List of advices and tricks for Go ʕ◔ϖ◔ʔ

fork in 15 days

release astaxie/beego

v1.12.1

released time in 19 days

push eventastaxie/beego

astaxie

commit sha 562060841891249173c5f155de5b473a0797d8eb

Update README.md

view details

Razil

commit sha 4348356d0aadd86f5f9c570d3fc362b37fd1c0f7

fix annotation on orm/utils

view details

Dennis

commit sha 8395a26061497e76ca577fd23836bd7c51e01b84

Merge pull request #3801 from DennisMao/develop fix annotation on orm/utils #3777

view details

astaxie

commit sha 11774c87a57136c075b1eb30c5dcfc87c1680a22

update version 1.13

view details

cloudzhou

commit sha 5a5482c77fefb28fadb20a2f79f4d20374087a72

leak opened file should defer file.Close()

view details

astaxie

commit sha 10236b9f2dd85f66c503b4306adf7fa424736971

Merge pull request #3814 from cloudzhou/patch-2 leak opened file

view details

astaxie

commit sha 2a6ceca8611407d435f3ce055c2f68d59f2686b5

Update README.md

view details

Allen

commit sha b8d626bbeae55330f06ae138c0a251d2380a75a7

添加16开头手机号验证,162电信,165移动,166/167联通。

view details

Allen

commit sha 241f10b4296af8dc4ccb984c253d7427166e84e5

添加16开头手机号验证,162电信,165移动,166/167联通。

view details

Allen

commit sha fb640f00755616438ba49be5a7844e1bc5a10ab4

更新16开头手机号的正则测试

view details

astaxie

commit sha 1923b8c7677ad80e47f93fe1a0d2cd4118fa82c3

Merge pull request #3841 from HKail/develop 添加16开头手机号验证

view details

Wenkai Yin

commit sha 793047097c8495dfb8421e9dbb72b7a8d289c359

Abort with the pre-defined status code when handling XSRF error As the status codes(422 and 417) are set in the error map, abort with them directly to active the pre-defined error handlers Signed-off-by: Wenkai Yin <yinw@vmware.com>

view details

holtyuzhuyanbo

commit sha 38a144c68f9cc8f0720edb7b0cdd4d2bef021317

fix: session destory

view details

astaxie

commit sha aa90c67a7586bfb89d6bb195a32a822335c31e43

Merge pull request #3867 from ywk253100/191119_xsrf Abort with the pre-defined status code when handling XSRF error

view details

大盖文

commit sha 92a4119258a8717b44c4180bc4caf8fa6c87d0ad

Update cmd_utils.go [Fix] Fix create table with SQLite not supporting COMMENT syntax

view details

axx

commit sha dc5c42e9818de1a60cbf696235c023b84d48d043

httplib:fixes network request failed to create an invalid file and automatically created file directory

view details

Wenkai Yin

commit sha 5a02c556b291977be5fab9ada71492c71f8a6a13

Send the request from context rather than the original one to handlers The filters may do some changes to the request, such as putting values in the request's context Signed-off-by: Wenkai Yin <yinw@vmware.com>

view details

Liu Zhang

commit sha 034599ca1db597b6441aad6dcf62fe7aca9fd16c

验证调整,增加label, xx不能为空

view details

wang yan

commit sha a768bf8f00030e627f4546b421f9242b0de56c01

update hash algorithm for signing the cookie for xsrf token Due to the chosen-prefix collision in SHA-1(details at https://sha-mbles.github.io/), SHA-1 hash functions should to be deprecated and SHA-2/SHA-3 should be used instead. Signed-off-by: wang yan <wangyan@vmware.com>

view details

astaxie

commit sha b8820099797500a4dc39247d3f9c0f0126ebf79f

Merge pull request #3919 from wy65701436/develop-sha256 update hash algorithm for signing the cookie for xsrf token

view details

push time in 19 days

created tagastaxie/beego

tagv1.12.1

beego is an open-source, high-performance web framework for the Go programming language.

created time in 19 days

push eventastaxie/beego

astaxie

commit sha de5650b7230083f957045890af942ffdac87c782

version 1.12.1

view details

push time in 19 days

Pull request review commentastaxie/beego

fix: generating router file in go module environment and filename gen…

 func init() { }  func parserPkg(pkgRealpath, pkgpath string) error {-	rep := strings.NewReplacer("\\", "_", "/", "_", ".", "_")-	commentFilename, _ = filepath.Rel(AppPath, pkgRealpath)-	commentFilename = commentPrefix + rep.Replace(commentFilename) + ".go"+	commentFilename = commentPrefix + strings.Join(strings.Split(pkgpath, "/")[1:], "_") + ".go"

you need to consider windows, Mac and Linux version

Jackmrzhou

comment created time in 19 days

push eventastaxie/beego

holtyuzhuyanbo

commit sha 38a144c68f9cc8f0720edb7b0cdd4d2bef021317

fix: session destory

view details

astaxie

commit sha e5e4a3bea7e0d35896e3972aadefb4917f0da69c

Merge pull request #3868 from holtyuzhuyanbo/fix_session_destory fix: session destory

view details

push time in 19 days

PR merged astaxie/beego

fix: session destory

如果设置cookied的domain是一个二级域名例如:beego.cn 此时调用Manager的SessionDestory,会set一个三级域名例如:test.beego.cn,该cookie是一个MaxAge=-1的cookie 如果用户再登陆,由于存在两个domain不同的cookie,且三级域名的cookie优先级高,会导致无法重新登录

+2 -1

0 comment

1 changed file

holtyuzhuyanbo

pr closed time in 19 days

push eventastaxie/beego

大盖文

commit sha 92a4119258a8717b44c4180bc4caf8fa6c87d0ad

Update cmd_utils.go [Fix] Fix create table with SQLite not supporting COMMENT syntax

view details

astaxie

commit sha 90d0b43f34b453fda010cce08b1338cb0a901426

Merge pull request #3888 from gavin2014/develop [Fix] Fix create table with SQLite not supporting COMMENT syntax

view details

push time in 19 days

PR merged astaxie/beego

[Fix] Fix create table with SQLite not supporting COMMENT syntax

[Fix] Fix create table with SQLite not supporting COMMENT syntax

+1 -1

0 comment

1 changed file

gavin2014

pr closed time in 19 days

pull request commentastaxie/beego

修复 生成前一日日志文件时候文件名错误

Conflicting files go.mod go.sum

lanfengye2008

comment created time in 20 days

push eventastaxie/beego

axx

commit sha dc5c42e9818de1a60cbf696235c023b84d48d043

httplib:fixes network request failed to create an invalid file and automatically created file directory

view details

astaxie

commit sha 1b7f5ba2c43ae36e0e56d0562ba247378bc88e48

Merge pull request #3900 from aixiaoxiang/develop httplib:fixes network request failed to create an invalid file and automatically created file directory

view details

push time in 20 days

PR merged astaxie/beego

httplib:fixes network request failed to create an invalid file and automatically created file directory

fixes before step: 1: create file 2: network request


fixes after step: 1: network request(check and automatically created file directory) 2: network request succeeded and create file

+41 -6

0 comment

2 changed files

aixiaoxiang

pr closed time in 20 days

push eventastaxie/beego

Wenkai Yin

commit sha 5a02c556b291977be5fab9ada71492c71f8a6a13

Send the request from context rather than the original one to handlers The filters may do some changes to the request, such as putting values in the request's context Signed-off-by: Wenkai Yin <yinw@vmware.com>

view details

astaxie

commit sha 96f01079cb34dfde914a43e1d764b66f7ec4eaab

Merge pull request #3905 from ywk253100/200110_context Send the request from context rather than the original one to handlers

view details

push time in 20 days

PR merged astaxie/beego

Send the request from context rather than the original one to handlers

The filters may do some changes to the request, such as putting values in the request's context

Signed-off-by: Wenkai Yin yinw@vmware.com

+1 -1

0 comment

1 changed file

ywk253100

pr closed time in 20 days

push eventastaxie/beego

Liu Zhang

commit sha 034599ca1db597b6441aad6dcf62fe7aca9fd16c

验证调整,增加label, xx不能为空

view details

astaxie

commit sha 9d4b5b313f0c98987144a6b13847a8860e5e993d

Merge pull request #3911 from liuzhang/develop 验证调整,增加label, xx不能为空

view details

push time in 20 days

PR merged astaxie/beego

验证调整,增加label, xx不能为空
+26 -10

0 comment

4 changed files

liuzhang

pr closed time in 20 days

push eventastaxie/beego

wang yan

commit sha a768bf8f00030e627f4546b421f9242b0de56c01

update hash algorithm for signing the cookie for xsrf token Due to the chosen-prefix collision in SHA-1(details at https://sha-mbles.github.io/), SHA-1 hash functions should to be deprecated and SHA-2/SHA-3 should be used instead. Signed-off-by: wang yan <wangyan@vmware.com>

view details

astaxie

commit sha b8820099797500a4dc39247d3f9c0f0126ebf79f

Merge pull request #3919 from wy65701436/develop-sha256 update hash algorithm for signing the cookie for xsrf token

view details

push time in 20 days

PR merged astaxie/beego

update hash algorithm for signing the cookie for xsrf token

Due to the chosen-prefix collision in SHA-1(details at https://sha-mbles.github.io/), SHA-1 hash functions should to be deprecated and SHA-2/SHA-3 should be used instead.

Signed-off-by: wang yan wangyan@vmware.com

+6 -6

0 comment

2 changed files

wy65701436

pr closed time in 20 days

Pull request review commentastaxie/beego

fix bug caused by without close stmt

 func init() { }  func main() {-	o := orm.NewOrm()+    o := orm.NewOrm()+    defer orm.DeregisterAllDatabases()

This is a break API

GeorgeXc

comment created time in 2 months

Pull request review commentastaxie/beego

fix bug caused by without close stmt

 func (ac *_dbCache) get(name string) (al *alias, ok bool) { 	return } +func (ac *_dbCache) removeAllAlias() {+	ac.mux.Lock()+	defer ac.mux.Unlock()+	for _, al := range ac.cache {+		al.DB.Lock()+		for _, stmt := range al.DB.stmts {+			stmt.Close()

Why not call stmt.Close when use it?

GeorgeXc

comment created time in 2 months

push eventastaxie/beego

Wenkai Yin

commit sha 793047097c8495dfb8421e9dbb72b7a8d289c359

Abort with the pre-defined status code when handling XSRF error As the status codes(422 and 417) are set in the error map, abort with them directly to active the pre-defined error handlers Signed-off-by: Wenkai Yin <yinw@vmware.com>

view details

astaxie

commit sha aa90c67a7586bfb89d6bb195a32a822335c31e43

Merge pull request #3867 from ywk253100/191119_xsrf Abort with the pre-defined status code when handling XSRF error

view details

push time in 3 months

PR merged astaxie/beego

Abort with the pre-defined status code when handling XSRF error

As the status codes(422 and 417) are set in the error map, abort with them directly to active the pre-defined error handlers

Signed-off-by: Wenkai Yin yinw@vmware.com

+2 -2

1 comment

1 changed file

ywk253100

pr closed time in 3 months

push eventjimengio/hiring

ChenYong

commit sha e4307fd4823b6bde52c0fc799deccdcdcc8fd02d

adding some challenges

view details

astaxie

commit sha d1de024fd209a755263381f692603898aaec3c8f

Merge pull request #4 from jimengio/challenges adding some challenges

view details

push time in 3 months

PR merged jimengio/hiring

Reviewers
adding some challenges
+18 -0

0 comment

1 changed file

chenyong

pr closed time in 3 months

push eventastaxie/beego

Allen

commit sha b8d626bbeae55330f06ae138c0a251d2380a75a7

添加16开头手机号验证,162电信,165移动,166/167联通。

view details

Allen

commit sha 241f10b4296af8dc4ccb984c253d7427166e84e5

添加16开头手机号验证,162电信,165移动,166/167联通。

view details

Allen

commit sha fb640f00755616438ba49be5a7844e1bc5a10ab4

更新16开头手机号的正则测试

view details

astaxie

commit sha 1923b8c7677ad80e47f93fe1a0d2cd4118fa82c3

Merge pull request #3841 from HKail/develop 添加16开头手机号验证

view details

push time in 4 months

PR merged astaxie/beego

添加16开头手机号验证

162电信,165移动,166/167联通

+13 -1

0 comment

2 changed files

HKail

pr closed time in 4 months

MemberEvent

push eventgocn/translator

astaxie

commit sha 56159f6b37abd066909b348cef98a0a9b6191050

Update w38_uber_go_style_guide.md

view details

push time in 4 months

push eventgocn/translator

watermelon

commit sha a08441d91b3b7a89969ccd9d4fc9630e6a785d64

Uber Go Style Guide 【翻译完成】 (#51) * 初版 * 初版 * review 后修改 * review 后修改

view details

push time in 4 months

PR merged gocn/translator

Reviewers
Uber Go Style Guide 【翻译完成】 Waiting Review

原文:https://github.com/study-rustlang/guide/blob/master/style.md#naming-printf-style-functions

+236 -341

0 comment

1 changed file

watermelo

pr closed time in 4 months

push eventbeego/beeweb

astaxie

commit sha afa4ffd7376581d64c0255865f78c5f6cf944345

Update community.html

view details

push time in 5 months

push eventastaxie/beego

astaxie

commit sha 2a6ceca8611407d435f3ce055c2f68d59f2686b5

Update README.md

view details

push time in 5 months

push eventastaxie/beego

cloudzhou

commit sha 5a5482c77fefb28fadb20a2f79f4d20374087a72

leak opened file should defer file.Close()

view details

astaxie

commit sha 10236b9f2dd85f66c503b4306adf7fa424736971

Merge pull request #3814 from cloudzhou/patch-2 leak opened file

view details

push time in 5 months

PR merged astaxie/beego

leak opened file

should defer file.Close()

+1 -0

0 comment

1 changed file

cloudzhou

pr closed time in 5 months

startedgoogle/eng-practices

started time in 5 months

push eventastaxie/beego

astaxie

commit sha 11774c87a57136c075b1eb30c5dcfc87c1680a22

update version 1.13

view details

push time in 5 months

push eventastaxie/build-web-application-with-golang

Bi-Ruei, Chiu

commit sha 8efb279dcff03710b2eda9a8184033d8fcb938a3

Editorial changes for chapter 2 1. Add suitable space and colon 2. Change some parenthesis to full-width 2. Remove unnecessary numbering

view details

astaxie

commit sha 606abd586a7270d0e48762cf0454ba0fac330698

Merge pull request #1111 from brchiu/correct-zh-tw-translation-chapter-2 Editorial changes for chapter 2 (zh-tw)

view details

push time in 5 months

PR merged astaxie/build-web-application-with-golang

Editorial changes for chapter 2 (zh-tw)
  1. Add suitable space and colon
  2. Change some parenthesis to full-width
  3. Remove unnecessary numbering
+208 -209

0 comment

8 changed files

brchiu

pr closed time in 5 months

push eventastaxie/build-web-application-with-golang

非法操作

commit sha cf783dfd4fb3274a4e500019269b6e66c3a4d01e

fix type error

view details

astaxie

commit sha 185905f0c6dc0ebc6de5b95f55fbcd2682992324

Merge pull request #1110 from hjlarry/patch-1 fix type error

view details

push time in 5 months

push eventastaxie/build-web-application-with-golang

Yisheng Wang

commit sha cbd1fff69b735d2080dc0c4b255807ac260ab90f

Update 08.1.md 修改一处错别字

view details

astaxie

commit sha 0b69db00949ca9c94fbd8b5a787e5f25ec8b026d

Merge pull request #1106 from easonyq/master Update 08.1.md

view details

push time in 5 months

PR merged astaxie/build-web-application-with-golang

Update 08.1.md

修改一处错别字 Fix a typo

+1 -1

0 comment

1 changed file

easonyq

pr closed time in 5 months

push eventgocn/translator

yufeng0924

commit sha d5bdf687ec59fffc7879dc887b57872e9aa10d52

[W13][Team1] Using context cancellation in Go (#10) * Update w13.md * Update w13.md * Update w13.md * Update w13.md * Update w13.md * Update w13.md * Update w13.md * Update w13.md * Update w13.md * Update w13.md * Update w13.md * Update w13.md * Update w13.md * Update w13.md * Update w13.md * Update w13.md * Update w13.md * Update w13.md * Update w13.md * w13 change the style. * w13 also change some style issue. * w13 add some header information. * w13 update header. * 初步修改 * 改动比较多,希望再看看 * 增加校对者 * Update w13.md * change some code block from ``` to `` * fixing some `` issues * fixing comma issue. * 格式段落 * 空行 * - 最后一个分开说明 * 去掉 web * 原文地址格式 * 去除逗号前的空格 * Update w13.md * 去除context 后面空格 * 原文出处 * context 增加连接 * fixing the space issue and comma issues * change DataBase to database * review again. * change 符号 * change codes block * 修复一些标点和不通顺的地方 * 根据校对建议作相应修改。 * optimize * 最有用的特性 * 几个模式 * 调整陷阱和注意事项 * ``` => `` * 小修改 * 小调整 * fix * : 冒号 空格

view details

push time in 6 months

PR merged gocn/translator

Reviewers
[W13][Team1] Using context cancellation in Go Waiting Review
+186 -5

1 comment

1 changed file

yufeng0924

pr closed time in 6 months

push eventgocn/translator

Fivezh

commit sha bb812e610a7442009cd466f508b6d6c555e5fe9a

修复lint-md问题 (#44) * 修复lint-md问题,替换有问题的yuque/lint-md镜像问题,先使用自编译镜像 * fomrt to fix lint-md * format w35 to match lint

view details

push time in 6 months

PR merged gocn/translator

修复lint-md问题

替换有问题的yuque/lint-md镜像问题,先使用自编译镜像

  • yuque/lint-md在近期升级后,镜像有问题导致CI时无法找到lint-md命令
  • 自编译fivezh/lint-md:cli,在官方基础上未做任何修改,只是修改了dockerfile重新编译、发布
  • 已向yuque/lint-md官方提issue,目前尚未回复

为保证CI正常运行,可先采用我编译的镜像版本

PS:目前发现circleci中失败job,仅展示状态,不展示详细失败原因,rebuild后可以查看详细原因,原因未知。 更新:从官方论坛看,也有其他用户反馈此问题,看样子是circleci的bug导致。

实时查看job执行或rebuild后立即打开,可查看Job失败详情: image

重新刷新页面或Job完成后进入详情,无法查看Job失败详情:一脸懵逼 😞 image

+59 -56

0 comment

3 changed files

fivezh

pr closed time in 6 months

push eventgocn/translator

Fivezh

commit sha b2c662d75381ee01ba565ec491397bf4de703f14

w35 go_compiler_intrinsics 翻译稿 (#42) * w35 go_compiler_intrinsics 翻译稿 * format w35 after cr * 巴洛克风格签名 翻译修改

view details

push time in 6 months

startedawesomedata/awesome-public-datasets

started time in 6 months

more