-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.go
More file actions
52 lines (40 loc) · 882 Bytes
/
types.go
File metadata and controls
52 lines (40 loc) · 882 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package types
import (
"net/http"
"os"
)
// +dl en
// i18n translator interface.
// +dl
// i18n 翻译器接口.
type Translator interface {
Sprint(v ...interface{}) string
Sprintf(format string, v ...interface{}) string
Source(src string)
}
// +dl en
// string os.Signal
// +dl
// 字符串信号, 实现 os.Signal 接口
type StringSignal struct {
Str string
X interface{}
}
// +dl en
// NewStringSignal returns an os.Signal.
// +dl
// NewStringSignal 返回字符串 os.Signal 信号.
func NewStringSignal(str string, x interface{}) os.Signal {
return &StringSignal{str, x}
}
func (ss *StringSignal) Signal() {}
func (ss *StringSignal) String() string {
return ss.Str
}
// +dl en
// For Role-based access control
// +dl
// Role 用于角色控制, 参见 github.com/typepress/accessflags
type Role uint64
type ContentDir http.Dir
type TemplateDir http.Dir