Documentation ¶
Index ¶
- Variables
- func D(f string, a ...interface{})
- func E(f string, a ...interface{})
- func ExtractEmail(from string) string
- func ExtractMsgID(msgID string) string
- func F(f string, a ...interface{})
- func FormatSize(v int64) string
- func IntIf(a, b int64) int64
- func L(f string, a ...interface{})
- func MsgIDToRawMsgID(msgid string, msgidbuf []byte) [16]byte
- func PanicIf(err interface{}, f string, a ...interface{})
- type Article
- type ArticleRef
- type AuthObject
- type BaseGroupInfo
- type Config
- type HighLowSlice
- func (s *HighLowSlice) Append(v *ArticleRef) ([]*ArticleRef, int)
- func (s *HighLowSlice) Get(i int) (*ArticleRef, bool)
- func (s *HighLowSlice) High() int
- func (s *HighLowSlice) Len() int
- func (s *HighLowSlice) Low() int
- func (s *HighLowSlice) Set(i int, v *ArticleRef)
- func (s *HighLowSlice) Slice(i, j int, copy bool) (results []*ArticleRef, actualStart, actualEnd int)
- func (s *HighLowSlice) String() string
- type ModInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var TranslateEncoding = func() func(string) string { // https://tools.ietf.org/html/rfc1342 var r = regexp.MustCompile(`(?i)=\?UTF-8\?B\?(\S+)\?=`) var rq = regexp.MustCompile(`(?i)=\?UTF-8\?Q\?(\S+)\?=`) var rq2 = regexp.MustCompile(`(?i)(=[0-9a-f]{2})`) return func(in string) string { outs := r.FindAllStringSubmatch(in, -1) if len(outs) == 1 && len(outs[0]) == 2 { buf, err := base64.StdEncoding.DecodeString(outs[0][1]) if err == nil { return string(buf) } } outs = rq.FindAllStringSubmatch(in, -1) if len(outs) == 1 && len(outs[0]) == 2 { return string(rq2.ReplaceAllFunc([]byte(outs[0][1]), func(in []byte) []byte { hex.Decode(in, in[1:]) return in[:1] })) } return in } }()
View Source
var Verbose = 1
Functions ¶
func ExtractEmail ¶
func ExtractMsgID ¶
func FormatSize ¶
func MsgIDToRawMsgID ¶
Types ¶
type ArticleRef ¶
func (*ArticleRef) MsgID ¶
func (ar *ArticleRef) MsgID() string
func (*ArticleRef) String ¶
func (ar *ArticleRef) String() string
type AuthObject ¶
type AuthObject struct {
User, Pass string
}
type BaseGroupInfo ¶
type BaseGroupInfo struct { Name string `json:",omitempty"` Desc string `json:",omitempty"` Posting int64 `json:",omitempty"` MaxPostSize int64 `json:",omitempty"` MaxLives int64 `json:",omitempty"` CreateTime int64 `json:",omitempty"` }
func (BaseGroupInfo) Diff ¶
func (g BaseGroupInfo) Diff(g2 *BaseGroupInfo) string
type HighLowSlice ¶
type HighLowSlice struct { MaxSize int // contains filtered or unexported fields }
func (*HighLowSlice) Append ¶
func (s *HighLowSlice) Append(v *ArticleRef) ([]*ArticleRef, int)
func (*HighLowSlice) Get ¶
func (s *HighLowSlice) Get(i int) (*ArticleRef, bool)
func (*HighLowSlice) High ¶
func (s *HighLowSlice) High() int
func (*HighLowSlice) Len ¶
func (s *HighLowSlice) Len() int
func (*HighLowSlice) Low ¶
func (s *HighLowSlice) Low() int
func (*HighLowSlice) Set ¶
func (s *HighLowSlice) Set(i int, v *ArticleRef)
func (*HighLowSlice) Slice ¶
func (s *HighLowSlice) Slice(i, j int, copy bool) (results []*ArticleRef, actualStart, actualEnd int)
func (*HighLowSlice) String ¶
func (s *HighLowSlice) String() string
Directories ¶
Path | Synopsis |
---|---|
Package dateparse parses date-strings without knowing the format in advance, using a fast lex based approach to eliminate shotgun attempts.
|
Package dateparse parses date-strings without knowing the format in advance, using a fast lex based approach to eliminate shotgun attempts. |
Click to show internal directories.
Click to hide internal directories.