Skip to content

Commit c255b39

Browse files
committed
Fix lint and addd some comments about the copied codes.
1 parent b6e2844 commit c255b39

File tree

4 files changed

+4
-0
lines changed

4 files changed

+4
-0
lines changed

modules/middlewares/cookie.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ func NewCookie(name, value string, maxAge int) *http.Cookie {
2626
}
2727

2828
// SetCookie set the cookies
29+
// TODO: Copied from gitea.com/macaron/macaron and should be improved after macaron removed.
2930
func SetCookie(resp http.ResponseWriter, name string, value string, others ...interface{}) {
3031
cookie := http.Cookie{}
3132
cookie.Name = name

modules/middlewares/redis.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import (
2828
)
2929

3030
// RedisStore represents a redis session store implementation.
31+
// TODO: copied from modules/session/redis.go and should remove that one until macaron removed.
3132
type RedisStore struct {
3233
c redis.UniversalClient
3334
prefix, sid string

modules/middlewares/virtual.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import (
1717
)
1818

1919
// VirtualSessionProvider represents a shadowed session provider implementation.
20+
// TODO: copied from modules/session/redis.go and should remove that one until macaron removed.
2021
type VirtualSessionProvider struct {
2122
lock sync.RWMutex
2223
provider session.Provider

modules/templates/static.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ func (templates templateFileSystem) Get(name string) (io.Reader, error) {
4848
return nil, fmt.Errorf("file '%s' not found", name)
4949
}
5050

51+
// GetAsset get a special asset, only for chi
5152
func GetAsset(name string) ([]byte, error) {
5253
bs, err := ioutil.ReadFile(filepath.Join(setting.CustomPath, name))
5354
if err != nil && !os.IsNotExist(err) {

0 commit comments

Comments
 (0)