id
int32
0
167k
repo
stringlengths
5
54
path
stringlengths
4
155
func_name
stringlengths
1
118
original_string
stringlengths
52
85.5k
language
stringclasses
1 value
code
stringlengths
52
85.5k
code_tokens
list
docstring
stringlengths
6
2.61k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
85
252
143,400
mixer/clock
mock.go
NewMockClock
func NewMockClock(start ...time.Time) *MockClock { m := &MockClock{cond: sync.NewCond(new(sync.Mutex))} if len(start) > 1 { panic(fmt.Sprintf("Expected one argument to clock.NewMock, got %d", len(start))) } if len(start) == 1 { m.SetTime(start[0]) return m } m.SetTime(time.Now().UTC()) return m }
go
func NewMockClock(start ...time.Time) *MockClock { m := &MockClock{cond: sync.NewCond(new(sync.Mutex))} if len(start) > 1 { panic(fmt.Sprintf("Expected one argument to clock.NewMock, got %d", len(start))) } if len(start) == 1 { m.SetTime(start[0]) return m } m.SetTime(time.Now().UTC()) return m }
[ "func", "NewMockClock", "(", "start", "...", "time", ".", "Time", ")", "*", "MockClock", "{", "m", ":=", "&", "MockClock", "{", "cond", ":", "sync", ".", "NewCond", "(", "new", "(", "sync", ".", "Mutex", ")", ")", "}", "\n\n", "if", "len", "(", "...
// NewMockClock creates a new mock clock, with its current time set to the provided // optional start time.
[ "NewMockClock", "creates", "a", "new", "mock", "clock", "with", "its", "current", "time", "set", "to", "the", "provided", "optional", "start", "time", "." ]
baedf07da667049457ab9dca9218b263b113964b
https://github.com/mixer/clock/blob/baedf07da667049457ab9dca9218b263b113964b/mock.go#L118-L132
143,401
mixer/clock
default.go
NewTimer
func (dc DefaultClock) NewTimer(d time.Duration) Timer { return &defaultTimer{*time.NewTimer(d)} }
go
func (dc DefaultClock) NewTimer(d time.Duration) Timer { return &defaultTimer{*time.NewTimer(d)} }
[ "func", "(", "dc", "DefaultClock", ")", "NewTimer", "(", "d", "time", ".", "Duration", ")", "Timer", "{", "return", "&", "defaultTimer", "{", "*", "time", ".", "NewTimer", "(", "d", ")", "}", "\n", "}" ]
// NewTimer creates a new Timer that will send the current time on its channel after at least duration d.
[ "NewTimer", "creates", "a", "new", "Timer", "that", "will", "send", "the", "current", "time", "on", "its", "channel", "after", "at", "least", "duration", "d", "." ]
baedf07da667049457ab9dca9218b263b113964b
https://github.com/mixer/clock/blob/baedf07da667049457ab9dca9218b263b113964b/default.go#L29-L31
143,402
mixer/clock
default.go
NewTicker
func (dc DefaultClock) NewTicker(d time.Duration) Ticker { return &defaultTicker{*time.NewTicker(d)} }
go
func (dc DefaultClock) NewTicker(d time.Duration) Ticker { return &defaultTicker{*time.NewTicker(d)} }
[ "func", "(", "dc", "DefaultClock", ")", "NewTicker", "(", "d", "time", ".", "Duration", ")", "Ticker", "{", "return", "&", "defaultTicker", "{", "*", "time", ".", "NewTicker", "(", "d", ")", "}", "\n", "}" ]
// NewTicker returns a new Ticker containing a channel that will send the time with a period specified by the duration argument.
[ "NewTicker", "returns", "a", "new", "Ticker", "containing", "a", "channel", "that", "will", "send", "the", "time", "with", "a", "period", "specified", "by", "the", "duration", "argument", "." ]
baedf07da667049457ab9dca9218b263b113964b
https://github.com/mixer/clock/blob/baedf07da667049457ab9dca9218b263b113964b/default.go#L34-L36
143,403
qor/slug
slug.go
Scan
func (slug *Slug) Scan(value interface{}) error { if bytes, ok := value.([]byte); ok { slug.Slug = string(bytes) } else if str, ok := value.(string); ok { slug.Slug = str } else if strs, ok := value.([]string); ok { slug.Slug = strs[0] } return nil }
go
func (slug *Slug) Scan(value interface{}) error { if bytes, ok := value.([]byte); ok { slug.Slug = string(bytes) } else if str, ok := value.(string); ok { slug.Slug = str } else if strs, ok := value.([]string); ok { slug.Slug = strs[0] } return nil }
[ "func", "(", "slug", "*", "Slug", ")", "Scan", "(", "value", "interface", "{", "}", ")", "error", "{", "if", "bytes", ",", "ok", ":=", "value", ".", "(", "[", "]", "byte", ")", ";", "ok", "{", "slug", ".", "Slug", "=", "string", "(", "bytes", ...
// Scan scan value into Slug
[ "Scan", "scan", "value", "into", "Slug" ]
545ed2e364522495bbeec88c2afd7a378b59084d
https://github.com/qor/slug/blob/545ed2e364522495bbeec88c2afd7a378b59084d/slug.go#L21-L30
143,404
qor/slug
slug.go
ConfigureQorMeta
func (Slug) ConfigureQorMeta(meta resource.Metaor) { if meta, ok := meta.(*admin.Meta); ok { res := meta.GetBaseResource().(*admin.Resource) res.GetAdmin().RegisterViewPath("github.com/qor/slug/views") res.UseTheme("slug") slugMetaName := meta.Name fieldName := strings.TrimSuffix(meta.Name, "WithSlug") i...
go
func (Slug) ConfigureQorMeta(meta resource.Metaor) { if meta, ok := meta.(*admin.Meta); ok { res := meta.GetBaseResource().(*admin.Resource) res.GetAdmin().RegisterViewPath("github.com/qor/slug/views") res.UseTheme("slug") slugMetaName := meta.Name fieldName := strings.TrimSuffix(meta.Name, "WithSlug") i...
[ "func", "(", "Slug", ")", "ConfigureQorMeta", "(", "meta", "resource", ".", "Metaor", ")", "{", "if", "meta", ",", "ok", ":=", "meta", ".", "(", "*", "admin", ".", "Meta", ")", ";", "ok", "{", "res", ":=", "meta", ".", "GetBaseResource", "(", ")", ...
// ConfigureQorMeta configure slug for qor admin
[ "ConfigureQorMeta", "configure", "slug", "for", "qor", "admin" ]
545ed2e364522495bbeec88c2afd7a378b59084d
https://github.com/qor/slug/blob/545ed2e364522495bbeec88c2afd7a378b59084d/slug.go#L38-L97
143,405
TomOnTime/utfutil
utfutil.go
Read
func (u readCloser) Read(p []byte) (n int, err error) { return u.reader.Read(p) }
go
func (u readCloser) Read(p []byte) (n int, err error) { return u.reader.Read(p) }
[ "func", "(", "u", "readCloser", ")", "Read", "(", "p", "[", "]", "byte", ")", "(", "n", "int", ",", "err", "error", ")", "{", "return", "u", ".", "reader", ".", "Read", "(", "p", ")", "\n", "}" ]
// Read implements the standard Reader interface.
[ "Read", "implements", "the", "standard", "Reader", "interface", "." ]
09c41003ee1d5015b75f331e52215512e7145b8d
https://github.com/TomOnTime/utfutil/blob/09c41003ee1d5015b75f331e52215512e7145b8d/utfutil.go#L71-L73
143,406
TomOnTime/utfutil
utfutil.go
Close
func (u readCloser) Close() error { if u.file != nil { return u.file.Close() } return nil }
go
func (u readCloser) Close() error { if u.file != nil { return u.file.Close() } return nil }
[ "func", "(", "u", "readCloser", ")", "Close", "(", ")", "error", "{", "if", "u", ".", "file", "!=", "nil", "{", "return", "u", ".", "file", ".", "Close", "(", ")", "\n", "}", "\n", "return", "nil", "\n", "}" ]
// Close implements the standard Closer interface.
[ "Close", "implements", "the", "standard", "Closer", "interface", "." ]
09c41003ee1d5015b75f331e52215512e7145b8d
https://github.com/TomOnTime/utfutil/blob/09c41003ee1d5015b75f331e52215512e7145b8d/utfutil.go#L76-L81
143,407
TomOnTime/utfutil
utfutil.go
Buffer
func (sc scanCloser) Buffer(buf []byte, max int) { sc.scanner.Buffer(buf, max) }
go
func (sc scanCloser) Buffer(buf []byte, max int) { sc.scanner.Buffer(buf, max) }
[ "func", "(", "sc", "scanCloser", ")", "Buffer", "(", "buf", "[", "]", "byte", ",", "max", "int", ")", "{", "sc", ".", "scanner", ".", "Buffer", "(", "buf", ",", "max", ")", "\n", "}" ]
// Buffer will run the Buffer function on the underlying bufio.Scanner.
[ "Buffer", "will", "run", "the", "Buffer", "function", "on", "the", "underlying", "bufio", ".", "Scanner", "." ]
09c41003ee1d5015b75f331e52215512e7145b8d
https://github.com/TomOnTime/utfutil/blob/09c41003ee1d5015b75f331e52215512e7145b8d/utfutil.go#L101-L103
143,408
TomOnTime/utfutil
utfutil.go
Split
func (sc scanCloser) Split(split bufio.SplitFunc) { sc.scanner.Split(split) }
go
func (sc scanCloser) Split(split bufio.SplitFunc) { sc.scanner.Split(split) }
[ "func", "(", "sc", "scanCloser", ")", "Split", "(", "split", "bufio", ".", "SplitFunc", ")", "{", "sc", ".", "scanner", ".", "Split", "(", "split", ")", "\n", "}" ]
// Split will run the Split function on the underlying bufio.Scanner.
[ "Split", "will", "run", "the", "Split", "function", "on", "the", "underlying", "bufio", ".", "Scanner", "." ]
09c41003ee1d5015b75f331e52215512e7145b8d
https://github.com/TomOnTime/utfutil/blob/09c41003ee1d5015b75f331e52215512e7145b8d/utfutil.go#L121-L123
143,409
TomOnTime/utfutil
utfutil.go
NewScanner
func NewScanner(name string, d EncodingHint) (UTFScanCloser, error) { f, err := OpenFile(name, d) if err != nil { return nil, err } return scanCloser{ scanner: bufio.NewScanner(f), file: f, }, nil }
go
func NewScanner(name string, d EncodingHint) (UTFScanCloser, error) { f, err := OpenFile(name, d) if err != nil { return nil, err } return scanCloser{ scanner: bufio.NewScanner(f), file: f, }, nil }
[ "func", "NewScanner", "(", "name", "string", ",", "d", "EncodingHint", ")", "(", "UTFScanCloser", ",", "error", ")", "{", "f", ",", "err", ":=", "OpenFile", "(", "name", ",", "d", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err...
// NewScanner is a convenience function that takes a filename and returns a scanner.
[ "NewScanner", "is", "a", "convenience", "function", "that", "takes", "a", "filename", "and", "returns", "a", "scanner", "." ]
09c41003ee1d5015b75f331e52215512e7145b8d
https://github.com/TomOnTime/utfutil/blob/09c41003ee1d5015b75f331e52215512e7145b8d/utfutil.go#L163-L173
143,410
TomOnTime/utfutil
utfutil.go
NewReader
func NewReader(r io.Reader, d EncodingHint) UTFReadCloser { var decoder *encoding.Decoder switch d { case UTF8: // Make a transformer that assumes UTF-8 but abides by the BOM. decoder = unicode.UTF8.NewDecoder() case UTF16LE: // Make an tranformer that decodes MS-Windows (16LE) UTF files: winutf := unicode....
go
func NewReader(r io.Reader, d EncodingHint) UTFReadCloser { var decoder *encoding.Decoder switch d { case UTF8: // Make a transformer that assumes UTF-8 but abides by the BOM. decoder = unicode.UTF8.NewDecoder() case UTF16LE: // Make an tranformer that decodes MS-Windows (16LE) UTF files: winutf := unicode....
[ "func", "NewReader", "(", "r", "io", ".", "Reader", ",", "d", "EncodingHint", ")", "UTFReadCloser", "{", "var", "decoder", "*", "encoding", ".", "Decoder", "\n", "switch", "d", "{", "case", "UTF8", ":", "// Make a transformer that assumes UTF-8 but abides by the B...
// NewReader wraps a Reader to decode Unicode to UTF-8 as it reads.
[ "NewReader", "wraps", "a", "Reader", "to", "decode", "Unicode", "to", "UTF", "-", "8", "as", "it", "reads", "." ]
09c41003ee1d5015b75f331e52215512e7145b8d
https://github.com/TomOnTime/utfutil/blob/09c41003ee1d5015b75f331e52215512e7145b8d/utfutil.go#L176-L203
143,411
martini-contrib/secure
secure.go
Secure
func Secure(opt Options) martini.Handler { return func(res http.ResponseWriter, req *http.Request, c martini.Context) { // Allowed hosts check. applyAllowedHosts(opt, res, req) // SSL check. applySSL(opt, res, req) // Strict Transport Security header. applySTS(opt, res, req) // Frame Options header. ...
go
func Secure(opt Options) martini.Handler { return func(res http.ResponseWriter, req *http.Request, c martini.Context) { // Allowed hosts check. applyAllowedHosts(opt, res, req) // SSL check. applySSL(opt, res, req) // Strict Transport Security header. applySTS(opt, res, req) // Frame Options header. ...
[ "func", "Secure", "(", "opt", "Options", ")", "martini", ".", "Handler", "{", "return", "func", "(", "res", "http", ".", "ResponseWriter", ",", "req", "*", "http", ".", "Request", ",", "c", "martini", ".", "Context", ")", "{", "// Allowed hosts check.", ...
// Secure is a middleware that helps setup a few basic security features. A single secure.Options struct can be // provided to configure which features should be enabled, and the ability to override a few of the default values.
[ "Secure", "is", "a", "middleware", "that", "helps", "setup", "a", "few", "basic", "security", "features", ".", "A", "single", "secure", ".", "Options", "struct", "can", "be", "provided", "to", "configure", "which", "features", "should", "be", "enabled", "and...
de8e19a0490b816696d093388d53f2e1f0c08b7d
https://github.com/martini-contrib/secure/blob/de8e19a0490b816696d093388d53f2e1f0c08b7d/secure.go#L77-L100
143,412
VividCortex/multitick
multitick.go
Subscribe
func (t *Ticker) Subscribe() <-chan time.Time { t.mux.Lock() defer t.mux.Unlock() c := make(chan time.Time, 1) t.chans = append(t.chans, c) return c }
go
func (t *Ticker) Subscribe() <-chan time.Time { t.mux.Lock() defer t.mux.Unlock() c := make(chan time.Time, 1) t.chans = append(t.chans, c) return c }
[ "func", "(", "t", "*", "Ticker", ")", "Subscribe", "(", ")", "<-", "chan", "time", ".", "Time", "{", "t", ".", "mux", ".", "Lock", "(", ")", "\n", "defer", "t", ".", "mux", ".", "Unlock", "(", ")", "\n", "c", ":=", "make", "(", "chan", "time"...
// Subscribe returns a channel to which ticks will be delivered. Ticks that // can't be delivered to the channel, because it is not ready to receive, are // discarded.
[ "Subscribe", "returns", "a", "channel", "to", "which", "ticks", "will", "be", "delivered", ".", "Ticks", "that", "can", "t", "be", "delivered", "to", "the", "channel", "because", "it", "is", "not", "ready", "to", "receive", "are", "discarded", "." ]
093e689081f93f076729cda83517a5379dd9895d
https://github.com/VividCortex/multitick/blob/093e689081f93f076729cda83517a5379dd9895d/multitick.go#L71-L77
143,413
VividCortex/multitick
multitick.go
Stop
func (t *Ticker) Stop() { t.tickerMux.Lock() defer t.tickerMux.Unlock() if !t.stopped && t.stopCh != nil { // Ticker's already created and running t.ticker.Stop() t.stopCh <- struct{}{} } t.stopped = true }
go
func (t *Ticker) Stop() { t.tickerMux.Lock() defer t.tickerMux.Unlock() if !t.stopped && t.stopCh != nil { // Ticker's already created and running t.ticker.Stop() t.stopCh <- struct{}{} } t.stopped = true }
[ "func", "(", "t", "*", "Ticker", ")", "Stop", "(", ")", "{", "t", ".", "tickerMux", ".", "Lock", "(", ")", "\n", "defer", "t", ".", "tickerMux", ".", "Unlock", "(", ")", "\n\n", "if", "!", "t", ".", "stopped", "&&", "t", ".", "stopCh", "!=", ...
// Stop stops the ticker. As in time.Ticker, it does not close channels.
[ "Stop", "stops", "the", "ticker", ".", "As", "in", "time", ".", "Ticker", "it", "does", "not", "close", "channels", "." ]
093e689081f93f076729cda83517a5379dd9895d
https://github.com/VividCortex/multitick/blob/093e689081f93f076729cda83517a5379dd9895d/multitick.go#L80-L90
143,414
VividCortex/multitick
multitick.go
Dropped
func (t *Ticker) Dropped() int { t.mux.Lock() defer t.mux.Unlock() return t.dropped }
go
func (t *Ticker) Dropped() int { t.mux.Lock() defer t.mux.Unlock() return t.dropped }
[ "func", "(", "t", "*", "Ticker", ")", "Dropped", "(", ")", "int", "{", "t", ".", "mux", ".", "Lock", "(", ")", "\n", "defer", "t", ".", "mux", ".", "Unlock", "(", ")", "\n", "return", "t", ".", "dropped", "\n", "}" ]
// Dropped returns the number of dropped ticks.
[ "Dropped", "returns", "the", "number", "of", "dropped", "ticks", "." ]
093e689081f93f076729cda83517a5379dd9895d
https://github.com/VividCortex/multitick/blob/093e689081f93f076729cda83517a5379dd9895d/multitick.go#L93-L97
143,415
VividCortex/multitick
multitick.go
tick
func (t *Ticker) tick() { for { select { case tick := <-t.ticker.C: t.mux.Lock() for i := range t.chans { select { case t.chans[i] <- tick: default: t.dropped++ } } t.mux.Unlock() case <-t.stopCh: return } } }
go
func (t *Ticker) tick() { for { select { case tick := <-t.ticker.C: t.mux.Lock() for i := range t.chans { select { case t.chans[i] <- tick: default: t.dropped++ } } t.mux.Unlock() case <-t.stopCh: return } } }
[ "func", "(", "t", "*", "Ticker", ")", "tick", "(", ")", "{", "for", "{", "select", "{", "case", "tick", ":=", "<-", "t", ".", "ticker", ".", "C", ":", "t", ".", "mux", ".", "Lock", "(", ")", "\n", "for", "i", ":=", "range", "t", ".", "chans...
// This could be inlined as an anonymous function, but I think it's easier to // read stacktraces with real function names in them.
[ "This", "could", "be", "inlined", "as", "an", "anonymous", "function", "but", "I", "think", "it", "s", "easier", "to", "read", "stacktraces", "with", "real", "function", "names", "in", "them", "." ]
093e689081f93f076729cda83517a5379dd9895d
https://github.com/VividCortex/multitick/blob/093e689081f93f076729cda83517a5379dd9895d/multitick.go#L101-L118
143,416
libp2p/go-conn-security-multistream
ssms.go
SecureInbound
func (sm *SSMuxer) SecureInbound(ctx context.Context, insecure net.Conn) (connsec.Conn, error) { tpt, err := sm.selectProto(ctx, insecure, true) if err != nil { return nil, err } return tpt.SecureInbound(ctx, insecure) }
go
func (sm *SSMuxer) SecureInbound(ctx context.Context, insecure net.Conn) (connsec.Conn, error) { tpt, err := sm.selectProto(ctx, insecure, true) if err != nil { return nil, err } return tpt.SecureInbound(ctx, insecure) }
[ "func", "(", "sm", "*", "SSMuxer", ")", "SecureInbound", "(", "ctx", "context", ".", "Context", ",", "insecure", "net", ".", "Conn", ")", "(", "connsec", ".", "Conn", ",", "error", ")", "{", "tpt", ",", "err", ":=", "sm", ".", "selectProto", "(", "...
// SecureInbound secures an inbound connection using this multistream // multiplexed stream security transport.
[ "SecureInbound", "secures", "an", "inbound", "connection", "using", "this", "multistream", "multiplexed", "stream", "security", "transport", "." ]
93a5f4dafc5f6878d0308f4135fa817e0cf7b226
https://github.com/libp2p/go-conn-security-multistream/blob/93a5f4dafc5f6878d0308f4135fa817e0cf7b226/ssms.go#L41-L47
143,417
libp2p/go-conn-security-multistream
ssms.go
SecureOutbound
func (sm *SSMuxer) SecureOutbound(ctx context.Context, insecure net.Conn, p peer.ID) (connsec.Conn, error) { tpt, err := sm.selectProto(ctx, insecure, false) if err != nil { return nil, err } return tpt.SecureOutbound(ctx, insecure, p) }
go
func (sm *SSMuxer) SecureOutbound(ctx context.Context, insecure net.Conn, p peer.ID) (connsec.Conn, error) { tpt, err := sm.selectProto(ctx, insecure, false) if err != nil { return nil, err } return tpt.SecureOutbound(ctx, insecure, p) }
[ "func", "(", "sm", "*", "SSMuxer", ")", "SecureOutbound", "(", "ctx", "context", ".", "Context", ",", "insecure", "net", ".", "Conn", ",", "p", "peer", ".", "ID", ")", "(", "connsec", ".", "Conn", ",", "error", ")", "{", "tpt", ",", "err", ":=", ...
// SecureOutbound secures an outbound connection using this multistream // multiplexed stream security transport.
[ "SecureOutbound", "secures", "an", "outbound", "connection", "using", "this", "multistream", "multiplexed", "stream", "security", "transport", "." ]
93a5f4dafc5f6878d0308f4135fa817e0cf7b226
https://github.com/libp2p/go-conn-security-multistream/blob/93a5f4dafc5f6878d0308f4135fa817e0cf7b226/ssms.go#L51-L57
143,418
go-macaron/csrf
xsrf.go
generateTokenAtTime
func generateTokenAtTime(key, userID, actionID string, now time.Time) string { h := hmac.New(sha1.New, []byte(key)) fmt.Fprintf(h, "%s:%s:%d", clean(userID), clean(actionID), now.UnixNano()) tok := fmt.Sprintf("%s:%d", h.Sum(nil), now.UnixNano()) return base64.RawURLEncoding.EncodeToString([]byte(tok)) }
go
func generateTokenAtTime(key, userID, actionID string, now time.Time) string { h := hmac.New(sha1.New, []byte(key)) fmt.Fprintf(h, "%s:%s:%d", clean(userID), clean(actionID), now.UnixNano()) tok := fmt.Sprintf("%s:%d", h.Sum(nil), now.UnixNano()) return base64.RawURLEncoding.EncodeToString([]byte(tok)) }
[ "func", "generateTokenAtTime", "(", "key", ",", "userID", ",", "actionID", "string", ",", "now", "time", ".", "Time", ")", "string", "{", "h", ":=", "hmac", ".", "New", "(", "sha1", ".", "New", ",", "[", "]", "byte", "(", "key", ")", ")", "\n", "...
// generateTokenAtTime is like Generate, but returns a token that expires 24 hours from now.
[ "generateTokenAtTime", "is", "like", "Generate", "but", "returns", "a", "token", "that", "expires", "24", "hours", "from", "now", "." ]
3751b136073c3ebaf8b5c85b418472a19e61c15f
https://github.com/go-macaron/csrf/blob/3751b136073c3ebaf8b5c85b418472a19e61c15f/xsrf.go#L49-L54
143,419
go-macaron/csrf
xsrf.go
ValidToken
func ValidToken(token, key, userID, actionID string) bool { return validTokenAtTime(token, key, userID, actionID, time.Now()) }
go
func ValidToken(token, key, userID, actionID string) bool { return validTokenAtTime(token, key, userID, actionID, time.Now()) }
[ "func", "ValidToken", "(", "token", ",", "key", ",", "userID", ",", "actionID", "string", ")", "bool", "{", "return", "validTokenAtTime", "(", "token", ",", "key", ",", "userID", ",", "actionID", ",", "time", ".", "Now", "(", ")", ")", "\n", "}" ]
// Valid returns true if token is a valid, unexpired token returned by Generate.
[ "Valid", "returns", "true", "if", "token", "is", "a", "valid", "unexpired", "token", "returned", "by", "Generate", "." ]
3751b136073c3ebaf8b5c85b418472a19e61c15f
https://github.com/go-macaron/csrf/blob/3751b136073c3ebaf8b5c85b418472a19e61c15f/xsrf.go#L57-L59
143,420
go-macaron/csrf
xsrf.go
validTokenAtTime
func validTokenAtTime(token, key, userID, actionID string, now time.Time) bool { // Decode the token. data, err := base64.RawURLEncoding.DecodeString(token) if err != nil { return false } // Extract the issue time of the token. sep := bytes.LastIndex(data, []byte{':'}) if sep < 0 { return false } nanos, e...
go
func validTokenAtTime(token, key, userID, actionID string, now time.Time) bool { // Decode the token. data, err := base64.RawURLEncoding.DecodeString(token) if err != nil { return false } // Extract the issue time of the token. sep := bytes.LastIndex(data, []byte{':'}) if sep < 0 { return false } nanos, e...
[ "func", "validTokenAtTime", "(", "token", ",", "key", ",", "userID", ",", "actionID", "string", ",", "now", "time", ".", "Time", ")", "bool", "{", "// Decode the token.", "data", ",", "err", ":=", "base64", ".", "RawURLEncoding", ".", "DecodeString", "(", ...
// validTokenAtTime is like Valid, but it uses now to check if the token is expired.
[ "validTokenAtTime", "is", "like", "Valid", "but", "it", "uses", "now", "to", "check", "if", "the", "token", "is", "expired", "." ]
3751b136073c3ebaf8b5c85b418472a19e61c15f
https://github.com/go-macaron/csrf/blob/3751b136073c3ebaf8b5c85b418472a19e61c15f/xsrf.go#L62-L97
143,421
Clever/pathio
pathio.go
Reader
func Reader(path string) (rc io.ReadCloser, err error) { return DefaultClient.Reader(path) }
go
func Reader(path string) (rc io.ReadCloser, err error) { return DefaultClient.Reader(path) }
[ "func", "Reader", "(", "path", "string", ")", "(", "rc", "io", ".", "ReadCloser", ",", "err", "error", ")", "{", "return", "DefaultClient", ".", "Reader", "(", "path", ")", "\n", "}" ]
// Reader calls DefaultClient's Reader method.
[ "Reader", "calls", "DefaultClient", "s", "Reader", "method", "." ]
74af44816745b87fd8472ce4bb8896b4d539fdce
https://github.com/Clever/pathio/blob/74af44816745b87fd8472ce4bb8896b4d539fdce/pathio.go#L57-L59
143,422
Clever/pathio
pathio.go
Write
func Write(path string, input []byte) error { return DefaultClient.Write(path, input) }
go
func Write(path string, input []byte) error { return DefaultClient.Write(path, input) }
[ "func", "Write", "(", "path", "string", ",", "input", "[", "]", "byte", ")", "error", "{", "return", "DefaultClient", ".", "Write", "(", "path", ",", "input", ")", "\n", "}" ]
// Write calls DefaultClient's Write method.
[ "Write", "calls", "DefaultClient", "s", "Write", "method", "." ]
74af44816745b87fd8472ce4bb8896b4d539fdce
https://github.com/Clever/pathio/blob/74af44816745b87fd8472ce4bb8896b4d539fdce/pathio.go#L62-L64
143,423
Clever/pathio
pathio.go
WriteReader
func WriteReader(path string, input io.ReadSeeker) error { return DefaultClient.WriteReader(path, input) }
go
func WriteReader(path string, input io.ReadSeeker) error { return DefaultClient.WriteReader(path, input) }
[ "func", "WriteReader", "(", "path", "string", ",", "input", "io", ".", "ReadSeeker", ")", "error", "{", "return", "DefaultClient", ".", "WriteReader", "(", "path", ",", "input", ")", "\n", "}" ]
// WriteReader calls DefaultClient's WriteReader method.
[ "WriteReader", "calls", "DefaultClient", "s", "WriteReader", "method", "." ]
74af44816745b87fd8472ce4bb8896b4d539fdce
https://github.com/Clever/pathio/blob/74af44816745b87fd8472ce4bb8896b4d539fdce/pathio.go#L67-L69
143,424
Clever/pathio
pathio.go
Reader
func (c *Client) Reader(path string) (rc io.ReadCloser, err error) { if strings.HasPrefix(path, "s3://") { s3Conn, err := s3ConnectionInformation(path, c.Region) if err != nil { return nil, err } return s3FileReader(s3Conn) } // Local file path return os.Open(path) }
go
func (c *Client) Reader(path string) (rc io.ReadCloser, err error) { if strings.HasPrefix(path, "s3://") { s3Conn, err := s3ConnectionInformation(path, c.Region) if err != nil { return nil, err } return s3FileReader(s3Conn) } // Local file path return os.Open(path) }
[ "func", "(", "c", "*", "Client", ")", "Reader", "(", "path", "string", ")", "(", "rc", "io", ".", "ReadCloser", ",", "err", "error", ")", "{", "if", "strings", ".", "HasPrefix", "(", "path", ",", "\"", "\"", ")", "{", "s3Conn", ",", "err", ":=", ...
// Reader returns an io.Reader for the specified path. The path can either be a local file path // or an S3 path. It is the caller's responsibility to close rc.
[ "Reader", "returns", "an", "io", ".", "Reader", "for", "the", "specified", "path", ".", "The", "path", "can", "either", "be", "a", "local", "file", "path", "or", "an", "S3", "path", ".", "It", "is", "the", "caller", "s", "responsibility", "to", "close"...
74af44816745b87fd8472ce4bb8896b4d539fdce
https://github.com/Clever/pathio/blob/74af44816745b87fd8472ce4bb8896b4d539fdce/pathio.go#L93-L103
143,425
Clever/pathio
pathio.go
Write
func (c *Client) Write(path string, input []byte) error { return c.WriteReader(path, bytes.NewReader(input)) }
go
func (c *Client) Write(path string, input []byte) error { return c.WriteReader(path, bytes.NewReader(input)) }
[ "func", "(", "c", "*", "Client", ")", "Write", "(", "path", "string", ",", "input", "[", "]", "byte", ")", "error", "{", "return", "c", ".", "WriteReader", "(", "path", ",", "bytes", ".", "NewReader", "(", "input", ")", ")", "\n", "}" ]
// Write writes a byte array to the specified path. The path can be either a local file path or an // S3 path.
[ "Write", "writes", "a", "byte", "array", "to", "the", "specified", "path", ".", "The", "path", "can", "be", "either", "a", "local", "file", "path", "or", "an", "S3", "path", "." ]
74af44816745b87fd8472ce4bb8896b4d539fdce
https://github.com/Clever/pathio/blob/74af44816745b87fd8472ce4bb8896b4d539fdce/pathio.go#L107-L109
143,426
Clever/pathio
pathio.go
WriteReader
func (c *Client) WriteReader(path string, input io.ReadSeeker) error { // return the file pointer to the start before reading from it when writing if offset, err := input.Seek(0, os.SEEK_SET); err != nil || offset != 0 { return fmt.Errorf("failed to reset the file pointer to 0. offset: %d; error %s", offset, err) ...
go
func (c *Client) WriteReader(path string, input io.ReadSeeker) error { // return the file pointer to the start before reading from it when writing if offset, err := input.Seek(0, os.SEEK_SET); err != nil || offset != 0 { return fmt.Errorf("failed to reset the file pointer to 0. offset: %d; error %s", offset, err) ...
[ "func", "(", "c", "*", "Client", ")", "WriteReader", "(", "path", "string", ",", "input", "io", ".", "ReadSeeker", ")", "error", "{", "// return the file pointer to the start before reading from it when writing", "if", "offset", ",", "err", ":=", "input", ".", "Se...
// WriteReader writes all the data read from the specified io.Reader to the // output path. The path can either a local file path or an S3 path.
[ "WriteReader", "writes", "all", "the", "data", "read", "from", "the", "specified", "io", ".", "Reader", "to", "the", "output", "path", ".", "The", "path", "can", "either", "a", "local", "file", "path", "or", "an", "S3", "path", "." ]
74af44816745b87fd8472ce4bb8896b4d539fdce
https://github.com/Clever/pathio/blob/74af44816745b87fd8472ce4bb8896b4d539fdce/pathio.go#L113-L127
143,427
Clever/pathio
pathio.go
s3FileReader
func s3FileReader(s3Conn s3Connection) (io.ReadCloser, error) { params := s3.GetObjectInput{ Bucket: aws.String(s3Conn.bucket), Key: aws.String(s3Conn.key), } resp, err := s3Conn.handler.GetObject(&params) if err != nil { return nil, err } return resp.Body, nil }
go
func s3FileReader(s3Conn s3Connection) (io.ReadCloser, error) { params := s3.GetObjectInput{ Bucket: aws.String(s3Conn.bucket), Key: aws.String(s3Conn.key), } resp, err := s3Conn.handler.GetObject(&params) if err != nil { return nil, err } return resp.Body, nil }
[ "func", "s3FileReader", "(", "s3Conn", "s3Connection", ")", "(", "io", ".", "ReadCloser", ",", "error", ")", "{", "params", ":=", "s3", ".", "GetObjectInput", "{", "Bucket", ":", "aws", ".", "String", "(", "s3Conn", ".", "bucket", ")", ",", "Key", ":",...
// s3FileReader converts an S3Path into an io.ReadCloser
[ "s3FileReader", "converts", "an", "S3Path", "into", "an", "io", ".", "ReadCloser" ]
74af44816745b87fd8472ce4bb8896b4d539fdce
https://github.com/Clever/pathio/blob/74af44816745b87fd8472ce4bb8896b4d539fdce/pathio.go#L235-L245
143,428
Clever/pathio
pathio.go
writeToS3
func writeToS3(s3Conn s3Connection, input io.ReadSeeker, disableEncryption bool) error { params := s3.PutObjectInput{ Bucket: aws.String(s3Conn.bucket), Key: aws.String(s3Conn.key), Body: input, } if !disableEncryption { algo := aesAlgo params.ServerSideEncryption = &algo } _, err := s3Conn.handler....
go
func writeToS3(s3Conn s3Connection, input io.ReadSeeker, disableEncryption bool) error { params := s3.PutObjectInput{ Bucket: aws.String(s3Conn.bucket), Key: aws.String(s3Conn.key), Body: input, } if !disableEncryption { algo := aesAlgo params.ServerSideEncryption = &algo } _, err := s3Conn.handler....
[ "func", "writeToS3", "(", "s3Conn", "s3Connection", ",", "input", "io", ".", "ReadSeeker", ",", "disableEncryption", "bool", ")", "error", "{", "params", ":=", "s3", ".", "PutObjectInput", "{", "Bucket", ":", "aws", ".", "String", "(", "s3Conn", ".", "buck...
// writeToS3 uploads the given file to S3
[ "writeToS3", "uploads", "the", "given", "file", "to", "S3" ]
74af44816745b87fd8472ce4bb8896b4d539fdce
https://github.com/Clever/pathio/blob/74af44816745b87fd8472ce4bb8896b4d539fdce/pathio.go#L248-L260
143,429
Clever/pathio
pathio.go
writeToLocalFile
func writeToLocalFile(path string, input io.ReadSeeker) error { if err := os.MkdirAll(filepath.Dir(path), 0700); err != nil { return err } file, err := os.Create(path) defer file.Close() if err != nil { return err } _, err = io.Copy(file, input) return err }
go
func writeToLocalFile(path string, input io.ReadSeeker) error { if err := os.MkdirAll(filepath.Dir(path), 0700); err != nil { return err } file, err := os.Create(path) defer file.Close() if err != nil { return err } _, err = io.Copy(file, input) return err }
[ "func", "writeToLocalFile", "(", "path", "string", ",", "input", "io", ".", "ReadSeeker", ")", "error", "{", "if", "err", ":=", "os", ".", "MkdirAll", "(", "filepath", ".", "Dir", "(", "path", ")", ",", "0700", ")", ";", "err", "!=", "nil", "{", "r...
// writeToLocalFile writes the given file locally
[ "writeToLocalFile", "writes", "the", "given", "file", "locally" ]
74af44816745b87fd8472ce4bb8896b4d539fdce
https://github.com/Clever/pathio/blob/74af44816745b87fd8472ce4bb8896b4d539fdce/pathio.go#L263-L274
143,430
Clever/pathio
pathio.go
s3ConnectionInformation
func s3ConnectionInformation(path, region string) (s3Connection, error) { bucket, key, err := parseS3Path(path) if err != nil { return s3Connection{}, err } // If no region passed in, look up region in S3 if region == "" { region, err = getRegionForBucket(newS3Handler(defaultLocation), bucket) if err != nil...
go
func s3ConnectionInformation(path, region string) (s3Connection, error) { bucket, key, err := parseS3Path(path) if err != nil { return s3Connection{}, err } // If no region passed in, look up region in S3 if region == "" { region, err = getRegionForBucket(newS3Handler(defaultLocation), bucket) if err != nil...
[ "func", "s3ConnectionInformation", "(", "path", ",", "region", "string", ")", "(", "s3Connection", ",", "error", ")", "{", "bucket", ",", "key", ",", "err", ":=", "parseS3Path", "(", "path", ")", "\n", "if", "err", "!=", "nil", "{", "return", "s3Connecti...
// s3ConnectionInformation parses the s3 path and returns the s3 connection from the // correct region, as well as the bucket, and key
[ "s3ConnectionInformation", "parses", "the", "s3", "path", "and", "returns", "the", "s3", "connection", "from", "the", "correct", "region", "as", "well", "as", "the", "bucket", "and", "key" ]
74af44816745b87fd8472ce4bb8896b4d539fdce
https://github.com/Clever/pathio/blob/74af44816745b87fd8472ce4bb8896b4d539fdce/pathio.go#L291-L306
143,431
Clever/pathio
gen_mock_s3handler.go
NewMockPathio
func NewMockPathio(ctrl *gomock.Controller) *MockPathio { mock := &MockPathio{ctrl: ctrl} mock.recorder = &MockPathioMockRecorder{mock} return mock }
go
func NewMockPathio(ctrl *gomock.Controller) *MockPathio { mock := &MockPathio{ctrl: ctrl} mock.recorder = &MockPathioMockRecorder{mock} return mock }
[ "func", "NewMockPathio", "(", "ctrl", "*", "gomock", ".", "Controller", ")", "*", "MockPathio", "{", "mock", ":=", "&", "MockPathio", "{", "ctrl", ":", "ctrl", "}", "\n", "mock", ".", "recorder", "=", "&", "MockPathioMockRecorder", "{", "mock", "}", "\n"...
// NewMockPathio creates a new mock instance
[ "NewMockPathio", "creates", "a", "new", "mock", "instance" ]
74af44816745b87fd8472ce4bb8896b4d539fdce
https://github.com/Clever/pathio/blob/74af44816745b87fd8472ce4bb8896b4d539fdce/gen_mock_s3handler.go#L26-L30
143,432
Clever/pathio
gen_mock_s3handler.go
Reader
func (m *MockPathio) Reader(path string) (io.ReadCloser, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Reader", path) ret0, _ := ret[0].(io.ReadCloser) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockPathio) Reader(path string) (io.ReadCloser, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Reader", path) ret0, _ := ret[0].(io.ReadCloser) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockPathio", ")", "Reader", "(", "path", "string", ")", "(", "io", ".", "ReadCloser", ",", "error", ")", "{", "m", ".", "ctrl", ".", "T", ".", "Helper", "(", ")", "\n", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", ...
// Reader mocks base method
[ "Reader", "mocks", "base", "method" ]
74af44816745b87fd8472ce4bb8896b4d539fdce
https://github.com/Clever/pathio/blob/74af44816745b87fd8472ce4bb8896b4d539fdce/gen_mock_s3handler.go#L38-L44
143,433
Clever/pathio
gen_mock_s3handler.go
Reader
func (mr *MockPathioMockRecorder) Reader(path interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reader", reflect.TypeOf((*MockPathio)(nil).Reader), path) }
go
func (mr *MockPathioMockRecorder) Reader(path interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reader", reflect.TypeOf((*MockPathio)(nil).Reader), path) }
[ "func", "(", "mr", "*", "MockPathioMockRecorder", ")", "Reader", "(", "path", "interface", "{", "}", ")", "*", "gomock", ".", "Call", "{", "mr", ".", "mock", ".", "ctrl", ".", "T", ".", "Helper", "(", ")", "\n", "return", "mr", ".", "mock", ".", ...
// Reader indicates an expected call of Reader
[ "Reader", "indicates", "an", "expected", "call", "of", "Reader" ]
74af44816745b87fd8472ce4bb8896b4d539fdce
https://github.com/Clever/pathio/blob/74af44816745b87fd8472ce4bb8896b4d539fdce/gen_mock_s3handler.go#L47-L50
143,434
Clever/pathio
gen_mock_s3handler.go
WriteReader
func (m *MockPathio) WriteReader(path string, input io.ReadSeeker) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "WriteReader", path, input) ret0, _ := ret[0].(error) return ret0 }
go
func (m *MockPathio) WriteReader(path string, input io.ReadSeeker) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "WriteReader", path, input) ret0, _ := ret[0].(error) return ret0 }
[ "func", "(", "m", "*", "MockPathio", ")", "WriteReader", "(", "path", "string", ",", "input", "io", ".", "ReadSeeker", ")", "error", "{", "m", ".", "ctrl", ".", "T", ".", "Helper", "(", ")", "\n", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", ...
// WriteReader mocks base method
[ "WriteReader", "mocks", "base", "method" ]
74af44816745b87fd8472ce4bb8896b4d539fdce
https://github.com/Clever/pathio/blob/74af44816745b87fd8472ce4bb8896b4d539fdce/gen_mock_s3handler.go#L67-L72
143,435
Clever/pathio
gen_mock_s3handler.go
ListFiles
func (m *MockPathio) ListFiles(path string) ([]string, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ListFiles", path) ret0, _ := ret[0].([]string) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockPathio) ListFiles(path string) ([]string, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ListFiles", path) ret0, _ := ret[0].([]string) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockPathio", ")", "ListFiles", "(", "path", "string", ")", "(", "[", "]", "string", ",", "error", ")", "{", "m", ".", "ctrl", ".", "T", ".", "Helper", "(", ")", "\n", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m...
// ListFiles mocks base method
[ "ListFiles", "mocks", "base", "method" ]
74af44816745b87fd8472ce4bb8896b4d539fdce
https://github.com/Clever/pathio/blob/74af44816745b87fd8472ce4bb8896b4d539fdce/gen_mock_s3handler.go#L81-L87
143,436
Clever/pathio
gen_mock_s3handler.go
NewMocks3Handler
func NewMocks3Handler(ctrl *gomock.Controller) *Mocks3Handler { mock := &Mocks3Handler{ctrl: ctrl} mock.recorder = &Mocks3HandlerMockRecorder{mock} return mock }
go
func NewMocks3Handler(ctrl *gomock.Controller) *Mocks3Handler { mock := &Mocks3Handler{ctrl: ctrl} mock.recorder = &Mocks3HandlerMockRecorder{mock} return mock }
[ "func", "NewMocks3Handler", "(", "ctrl", "*", "gomock", ".", "Controller", ")", "*", "Mocks3Handler", "{", "mock", ":=", "&", "Mocks3Handler", "{", "ctrl", ":", "ctrl", "}", "\n", "mock", ".", "recorder", "=", "&", "Mocks3HandlerMockRecorder", "{", "mock", ...
// NewMocks3Handler creates a new mock instance
[ "NewMocks3Handler", "creates", "a", "new", "mock", "instance" ]
74af44816745b87fd8472ce4bb8896b4d539fdce
https://github.com/Clever/pathio/blob/74af44816745b87fd8472ce4bb8896b4d539fdce/gen_mock_s3handler.go#L122-L126
143,437
Clever/pathio
gen_mock_s3handler.go
GetBucketLocation
func (m *Mocks3Handler) GetBucketLocation(input *s3.GetBucketLocationInput) (*s3.GetBucketLocationOutput, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetBucketLocation", input) ret0, _ := ret[0].(*s3.GetBucketLocationOutput) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *Mocks3Handler) GetBucketLocation(input *s3.GetBucketLocationInput) (*s3.GetBucketLocationOutput, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetBucketLocation", input) ret0, _ := ret[0].(*s3.GetBucketLocationOutput) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "Mocks3Handler", ")", "GetBucketLocation", "(", "input", "*", "s3", ".", "GetBucketLocationInput", ")", "(", "*", "s3", ".", "GetBucketLocationOutput", ",", "error", ")", "{", "m", ".", "ctrl", ".", "T", ".", "Helper", "(", ")", ...
// GetBucketLocation mocks base method
[ "GetBucketLocation", "mocks", "base", "method" ]
74af44816745b87fd8472ce4bb8896b4d539fdce
https://github.com/Clever/pathio/blob/74af44816745b87fd8472ce4bb8896b4d539fdce/gen_mock_s3handler.go#L134-L140
143,438
Clever/pathio
gen_mock_s3handler.go
GetObject
func (m *Mocks3Handler) GetObject(input *s3.GetObjectInput) (*s3.GetObjectOutput, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetObject", input) ret0, _ := ret[0].(*s3.GetObjectOutput) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *Mocks3Handler) GetObject(input *s3.GetObjectInput) (*s3.GetObjectOutput, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetObject", input) ret0, _ := ret[0].(*s3.GetObjectOutput) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "Mocks3Handler", ")", "GetObject", "(", "input", "*", "s3", ".", "GetObjectInput", ")", "(", "*", "s3", ".", "GetObjectOutput", ",", "error", ")", "{", "m", ".", "ctrl", ".", "T", ".", "Helper", "(", ")", "\n", "ret", ":=", ...
// GetObject mocks base method
[ "GetObject", "mocks", "base", "method" ]
74af44816745b87fd8472ce4bb8896b4d539fdce
https://github.com/Clever/pathio/blob/74af44816745b87fd8472ce4bb8896b4d539fdce/gen_mock_s3handler.go#L149-L155
143,439
Clever/pathio
gen_mock_s3handler.go
PutObject
func (m *Mocks3Handler) PutObject(input *s3.PutObjectInput) (*s3.PutObjectOutput, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "PutObject", input) ret0, _ := ret[0].(*s3.PutObjectOutput) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *Mocks3Handler) PutObject(input *s3.PutObjectInput) (*s3.PutObjectOutput, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "PutObject", input) ret0, _ := ret[0].(*s3.PutObjectOutput) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "Mocks3Handler", ")", "PutObject", "(", "input", "*", "s3", ".", "PutObjectInput", ")", "(", "*", "s3", ".", "PutObjectOutput", ",", "error", ")", "{", "m", ".", "ctrl", ".", "T", ".", "Helper", "(", ")", "\n", "ret", ":=", ...
// PutObject mocks base method
[ "PutObject", "mocks", "base", "method" ]
74af44816745b87fd8472ce4bb8896b4d539fdce
https://github.com/Clever/pathio/blob/74af44816745b87fd8472ce4bb8896b4d539fdce/gen_mock_s3handler.go#L164-L170
143,440
Clever/pathio
gen_mock_s3handler.go
ListObjects
func (m *Mocks3Handler) ListObjects(input *s3.ListObjectsInput) (*s3.ListObjectsOutput, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ListObjects", input) ret0, _ := ret[0].(*s3.ListObjectsOutput) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *Mocks3Handler) ListObjects(input *s3.ListObjectsInput) (*s3.ListObjectsOutput, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ListObjects", input) ret0, _ := ret[0].(*s3.ListObjectsOutput) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "Mocks3Handler", ")", "ListObjects", "(", "input", "*", "s3", ".", "ListObjectsInput", ")", "(", "*", "s3", ".", "ListObjectsOutput", ",", "error", ")", "{", "m", ".", "ctrl", ".", "T", ".", "Helper", "(", ")", "\n", "ret", "...
// ListObjects mocks base method
[ "ListObjects", "mocks", "base", "method" ]
74af44816745b87fd8472ce4bb8896b4d539fdce
https://github.com/Clever/pathio/blob/74af44816745b87fd8472ce4bb8896b4d539fdce/gen_mock_s3handler.go#L179-L185
143,441
Clever/pathio
gen_mock_s3handler.go
HeadObject
func (m *Mocks3Handler) HeadObject(input *s3.HeadObjectInput) (*s3.HeadObjectOutput, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "HeadObject", input) ret0, _ := ret[0].(*s3.HeadObjectOutput) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *Mocks3Handler) HeadObject(input *s3.HeadObjectInput) (*s3.HeadObjectOutput, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "HeadObject", input) ret0, _ := ret[0].(*s3.HeadObjectOutput) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "Mocks3Handler", ")", "HeadObject", "(", "input", "*", "s3", ".", "HeadObjectInput", ")", "(", "*", "s3", ".", "HeadObjectOutput", ",", "error", ")", "{", "m", ".", "ctrl", ".", "T", ".", "Helper", "(", ")", "\n", "ret", ":="...
// HeadObject mocks base method
[ "HeadObject", "mocks", "base", "method" ]
74af44816745b87fd8472ce4bb8896b4d539fdce
https://github.com/Clever/pathio/blob/74af44816745b87fd8472ce4bb8896b4d539fdce/gen_mock_s3handler.go#L194-L200
143,442
Clever/pathio
gen_mock_s3handler.go
HeadObject
func (mr *Mocks3HandlerMockRecorder) HeadObject(input interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HeadObject", reflect.TypeOf((*Mocks3Handler)(nil).HeadObject), input) }
go
func (mr *Mocks3HandlerMockRecorder) HeadObject(input interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HeadObject", reflect.TypeOf((*Mocks3Handler)(nil).HeadObject), input) }
[ "func", "(", "mr", "*", "Mocks3HandlerMockRecorder", ")", "HeadObject", "(", "input", "interface", "{", "}", ")", "*", "gomock", ".", "Call", "{", "mr", ".", "mock", ".", "ctrl", ".", "T", ".", "Helper", "(", ")", "\n", "return", "mr", ".", "mock", ...
// HeadObject indicates an expected call of HeadObject
[ "HeadObject", "indicates", "an", "expected", "call", "of", "HeadObject" ]
74af44816745b87fd8472ce4bb8896b4d539fdce
https://github.com/Clever/pathio/blob/74af44816745b87fd8472ce4bb8896b4d539fdce/gen_mock_s3handler.go#L203-L206
143,443
go-macaron/toolbox
toolbox.go
Toolboxer
func Toolboxer(m *macaron.Macaron, options ...Options) macaron.Handler { prepareOptions(options) t := &toolbox{ healthCheckJobs: make([]*healthCheck, 0, len(opt.HealthCheckers)+len(opt.HealthCheckFuncs)), } // Dashboard. m.Get(opt.URLPrefix, dashboard) // Health check. for _, hc := range opt.HealthCheckers {...
go
func Toolboxer(m *macaron.Macaron, options ...Options) macaron.Handler { prepareOptions(options) t := &toolbox{ healthCheckJobs: make([]*healthCheck, 0, len(opt.HealthCheckers)+len(opt.HealthCheckFuncs)), } // Dashboard. m.Get(opt.URLPrefix, dashboard) // Health check. for _, hc := range opt.HealthCheckers {...
[ "func", "Toolboxer", "(", "m", "*", "macaron", ".", "Macaron", ",", "options", "...", "Options", ")", "macaron", ".", "Handler", "{", "prepareOptions", "(", "options", ")", "\n", "t", ":=", "&", "toolbox", "{", "healthCheckJobs", ":", "make", "(", "[", ...
// Toolboxer is a middleware provides health check, pprof, profile and statistic services for your application.
[ "Toolboxer", "is", "a", "middleware", "provides", "health", "check", "pprof", "profile", "and", "statistic", "services", "for", "your", "application", "." ]
a77f45a7ce909c0ff14b28279fa1a2b674acb70f
https://github.com/go-macaron/toolbox/blob/a77f45a7ce909c0ff14b28279fa1a2b674acb70f/toolbox.go#L114-L158
143,444
go-macaron/toolbox
healthcheck.go
AddHealthCheck
func (t *toolbox) AddHealthCheck(hc HealthChecker) { t.healthCheckJobs = append(t.healthCheckJobs, &healthCheck{ HealthChecker: hc, }) }
go
func (t *toolbox) AddHealthCheck(hc HealthChecker) { t.healthCheckJobs = append(t.healthCheckJobs, &healthCheck{ HealthChecker: hc, }) }
[ "func", "(", "t", "*", "toolbox", ")", "AddHealthCheck", "(", "hc", "HealthChecker", ")", "{", "t", ".", "healthCheckJobs", "=", "append", "(", "t", ".", "healthCheckJobs", ",", "&", "healthCheck", "{", "HealthChecker", ":", "hc", ",", "}", ")", "\n", ...
// AddHealthCheck adds new health check job.
[ "AddHealthCheck", "adds", "new", "health", "check", "job", "." ]
a77f45a7ce909c0ff14b28279fa1a2b674acb70f
https://github.com/go-macaron/toolbox/blob/a77f45a7ce909c0ff14b28279fa1a2b674acb70f/healthcheck.go#L44-L48
143,445
go-macaron/toolbox
healthcheck.go
AddHealthCheckFunc
func (t *toolbox) AddHealthCheckFunc(desc string, fn HealthCheckFunc) { t.healthCheckJobs = append(t.healthCheckJobs, &healthCheck{ desc: desc, check: fn, }) }
go
func (t *toolbox) AddHealthCheckFunc(desc string, fn HealthCheckFunc) { t.healthCheckJobs = append(t.healthCheckJobs, &healthCheck{ desc: desc, check: fn, }) }
[ "func", "(", "t", "*", "toolbox", ")", "AddHealthCheckFunc", "(", "desc", "string", ",", "fn", "HealthCheckFunc", ")", "{", "t", ".", "healthCheckJobs", "=", "append", "(", "t", ".", "healthCheckJobs", ",", "&", "healthCheck", "{", "desc", ":", "desc", "...
// AddHealthCheckFunc adds a function as a new health check job.
[ "AddHealthCheckFunc", "adds", "a", "function", "as", "a", "new", "health", "check", "job", "." ]
a77f45a7ce909c0ff14b28279fa1a2b674acb70f
https://github.com/go-macaron/toolbox/blob/a77f45a7ce909c0ff14b28279fa1a2b674acb70f/healthcheck.go#L51-L56
143,446
go-macaron/toolbox
statistic.go
AddStatistics
func (m *UrlMap) AddStatistics(requestMethod, requestUrl string, requesttime time.Duration) { m.lock.Lock() defer m.lock.Unlock() if method, ok := m.urlmap[requestUrl]; ok { if s, ok := method[requestMethod]; ok { s.RequestNum += 1 if s.MaxTime < requesttime { s.MaxTime = requesttime } if s.MinTim...
go
func (m *UrlMap) AddStatistics(requestMethod, requestUrl string, requesttime time.Duration) { m.lock.Lock() defer m.lock.Unlock() if method, ok := m.urlmap[requestUrl]; ok { if s, ok := method[requestMethod]; ok { s.RequestNum += 1 if s.MaxTime < requesttime { s.MaxTime = requesttime } if s.MinTim...
[ "func", "(", "m", "*", "UrlMap", ")", "AddStatistics", "(", "requestMethod", ",", "requestUrl", "string", ",", "requesttime", "time", ".", "Duration", ")", "{", "m", ".", "lock", ".", "Lock", "(", ")", "\n", "defer", "m", ".", "lock", ".", "Unlock", ...
// add statistics task. // it needs request method, request url and statistics time duration
[ "add", "statistics", "task", ".", "it", "needs", "request", "method", "request", "url", "and", "statistics", "time", "duration" ]
a77f45a7ce909c0ff14b28279fa1a2b674acb70f
https://github.com/go-macaron/toolbox/blob/a77f45a7ce909c0ff14b28279fa1a2b674acb70f/statistic.go#L45-L85
143,447
go-macaron/toolbox
statistic.go
GetMap
func (m *UrlMap) GetMap(w io.Writer) { m.lock.RLock() defer m.lock.RUnlock() sep := fmt.Sprintf("+%s+%s+%s+%s+%s+%s+%s+\n", strings.Repeat("-", 51), strings.Repeat("-", 12), strings.Repeat("-", 18), strings.Repeat("-", 18), strings.Repeat("-", 18), strings.Repeat("-", 18), strings.Repeat("-", 18)) fmt.Fprintf(w,...
go
func (m *UrlMap) GetMap(w io.Writer) { m.lock.RLock() defer m.lock.RUnlock() sep := fmt.Sprintf("+%s+%s+%s+%s+%s+%s+%s+\n", strings.Repeat("-", 51), strings.Repeat("-", 12), strings.Repeat("-", 18), strings.Repeat("-", 18), strings.Repeat("-", 18), strings.Repeat("-", 18), strings.Repeat("-", 18)) fmt.Fprintf(w,...
[ "func", "(", "m", "*", "UrlMap", ")", "GetMap", "(", "w", "io", ".", "Writer", ")", "{", "m", ".", "lock", ".", "RLock", "(", ")", "\n", "defer", "m", ".", "lock", ".", "RUnlock", "(", ")", "\n\n", "sep", ":=", "fmt", ".", "Sprintf", "(", "\"...
// put url statistics result in io.Writer
[ "put", "url", "statistics", "result", "in", "io", ".", "Writer" ]
a77f45a7ce909c0ff14b28279fa1a2b674acb70f
https://github.com/go-macaron/toolbox/blob/a77f45a7ce909c0ff14b28279fa1a2b674acb70f/statistic.go#L88-L107
143,448
go-macaron/toolbox
profile.go
StartCPUProfile
func StartCPUProfile() error { if inCPUProfile { return errors.New("CPU profile has alreday been started!") } inCPUProfile = true os.MkdirAll(profilePath, os.ModePerm) f, err := os.Create(path.Join(profilePath, "cpu-"+com.ToStr(pid)+".pprof")) if err != nil { panic("fail to record CPU profile: " + err.Error(...
go
func StartCPUProfile() error { if inCPUProfile { return errors.New("CPU profile has alreday been started!") } inCPUProfile = true os.MkdirAll(profilePath, os.ModePerm) f, err := os.Create(path.Join(profilePath, "cpu-"+com.ToStr(pid)+".pprof")) if err != nil { panic("fail to record CPU profile: " + err.Error(...
[ "func", "StartCPUProfile", "(", ")", "error", "{", "if", "inCPUProfile", "{", "return", "errors", ".", "New", "(", "\"", "\"", ")", "\n", "}", "\n", "inCPUProfile", "=", "true", "\n\n", "os", ".", "MkdirAll", "(", "profilePath", ",", "os", ".", "ModePe...
// StartCPUProfile starts CPU profile monitor.
[ "StartCPUProfile", "starts", "CPU", "profile", "monitor", "." ]
a77f45a7ce909c0ff14b28279fa1a2b674acb70f
https://github.com/go-macaron/toolbox/blob/a77f45a7ce909c0ff14b28279fa1a2b674acb70f/profile.go#L42-L55
143,449
go-macaron/toolbox
profile.go
StopCPUProfile
func StopCPUProfile() error { if !inCPUProfile { return errors.New("CPU profile hasn't been started!") } pprof.StopCPUProfile() inCPUProfile = false return nil }
go
func StopCPUProfile() error { if !inCPUProfile { return errors.New("CPU profile hasn't been started!") } pprof.StopCPUProfile() inCPUProfile = false return nil }
[ "func", "StopCPUProfile", "(", ")", "error", "{", "if", "!", "inCPUProfile", "{", "return", "errors", ".", "New", "(", "\"", "\"", ")", "\n", "}", "\n", "pprof", ".", "StopCPUProfile", "(", ")", "\n", "inCPUProfile", "=", "false", "\n", "return", "nil"...
// StopCPUProfile stops CPU profile monitor.
[ "StopCPUProfile", "stops", "CPU", "profile", "monitor", "." ]
a77f45a7ce909c0ff14b28279fa1a2b674acb70f
https://github.com/go-macaron/toolbox/blob/a77f45a7ce909c0ff14b28279fa1a2b674acb70f/profile.go#L58-L65
143,450
go-macaron/toolbox
profile.go
DumpGCSummary
func DumpGCSummary(w io.Writer) { memStats := &runtime.MemStats{} runtime.ReadMemStats(memStats) gcstats := &debug.GCStats{PauseQuantiles: make([]time.Duration, 100)} debug.ReadGCStats(gcstats) dumpGC(memStats, gcstats, w) }
go
func DumpGCSummary(w io.Writer) { memStats := &runtime.MemStats{} runtime.ReadMemStats(memStats) gcstats := &debug.GCStats{PauseQuantiles: make([]time.Duration, 100)} debug.ReadGCStats(gcstats) dumpGC(memStats, gcstats, w) }
[ "func", "DumpGCSummary", "(", "w", "io", ".", "Writer", ")", "{", "memStats", ":=", "&", "runtime", ".", "MemStats", "{", "}", "\n", "runtime", ".", "ReadMemStats", "(", "memStats", ")", "\n", "gcstats", ":=", "&", "debug", ".", "GCStats", "{", "PauseQ...
// DumpGCSummary dumps GC information to io.Writer
[ "DumpGCSummary", "dumps", "GC", "information", "to", "io", ".", "Writer" ]
a77f45a7ce909c0ff14b28279fa1a2b674acb70f
https://github.com/go-macaron/toolbox/blob/a77f45a7ce909c0ff14b28279fa1a2b674acb70f/profile.go#L127-L134
143,451
nbio/httpcontext
httpcontext.go
Get
func Get(req *http.Request, key interface{}) interface{} { crc := getContextReadCloser(req) return crc.Context()[key] }
go
func Get(req *http.Request, key interface{}) interface{} { crc := getContextReadCloser(req) return crc.Context()[key] }
[ "func", "Get", "(", "req", "*", "http", ".", "Request", ",", "key", "interface", "{", "}", ")", "interface", "{", "}", "{", "crc", ":=", "getContextReadCloser", "(", "req", ")", "\n", "return", "crc", ".", "Context", "(", ")", "[", "key", "]", "\n"...
// Get gets a context value from req. // Returns nil if key not found in the request context.
[ "Get", "gets", "a", "context", "value", "from", "req", ".", "Returns", "nil", "if", "key", "not", "found", "in", "the", "request", "context", "." ]
d2f7bb023e6ebb562d7d5e07a5f3a6ce935f4666
https://github.com/nbio/httpcontext/blob/d2f7bb023e6ebb562d7d5e07a5f3a6ce935f4666/httpcontext.go#L19-L22
143,452
nbio/httpcontext
httpcontext.go
GetString
func GetString(req *http.Request, key interface{}) string { crc := getContextReadCloser(req) if value, ok := crc.Context()[key]; ok { if typed, ok := value.(string); ok { return typed } } return "" }
go
func GetString(req *http.Request, key interface{}) string { crc := getContextReadCloser(req) if value, ok := crc.Context()[key]; ok { if typed, ok := value.(string); ok { return typed } } return "" }
[ "func", "GetString", "(", "req", "*", "http", ".", "Request", ",", "key", "interface", "{", "}", ")", "string", "{", "crc", ":=", "getContextReadCloser", "(", "req", ")", "\n", "if", "value", ",", "ok", ":=", "crc", ".", "Context", "(", ")", "[", "...
// GetString gets a string context value from req. // Returns an empty string if key not found in the request context, // or the value does not evaluate to a string.
[ "GetString", "gets", "a", "string", "context", "value", "from", "req", ".", "Returns", "an", "empty", "string", "if", "key", "not", "found", "in", "the", "request", "context", "or", "the", "value", "does", "not", "evaluate", "to", "a", "string", "." ]
d2f7bb023e6ebb562d7d5e07a5f3a6ce935f4666
https://github.com/nbio/httpcontext/blob/d2f7bb023e6ebb562d7d5e07a5f3a6ce935f4666/httpcontext.go#L35-L43
143,453
shkh/lastfm-go
lastfm/chart.go
GetTopArtists
func (api chartApi) GetTopArtists(args map[string]interface{}) (result ChartGetTopArtists, err error) { defer func() { appendCaller(err, "lastfm.Chart.GetTopArtists") }() err = callGet("chart.gettopartists", api.params, args, &result, P{ "plain": []string{"page", "limit"}, }) return }
go
func (api chartApi) GetTopArtists(args map[string]interface{}) (result ChartGetTopArtists, err error) { defer func() { appendCaller(err, "lastfm.Chart.GetTopArtists") }() err = callGet("chart.gettopartists", api.params, args, &result, P{ "plain": []string{"page", "limit"}, }) return }
[ "func", "(", "api", "chartApi", ")", "GetTopArtists", "(", "args", "map", "[", "string", "]", "interface", "{", "}", ")", "(", "result", "ChartGetTopArtists", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err", ",...
//chart.getTopArtists
[ "chart", ".", "getTopArtists" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/chart.go#L8-L14
143,454
shkh/lastfm-go
lastfm/chart.go
GetTopTags
func (api chartApi) GetTopTags(args map[string]interface{}) (result ChartGetTopTags, err error) { defer func() { appendCaller(err, "lastfm.Chart.GetTopTags") }() err = callGet("chart.gettoptags", api.params, args, &result, P{ "plain": []string{"page", "limit"}, }) return }
go
func (api chartApi) GetTopTags(args map[string]interface{}) (result ChartGetTopTags, err error) { defer func() { appendCaller(err, "lastfm.Chart.GetTopTags") }() err = callGet("chart.gettoptags", api.params, args, &result, P{ "plain": []string{"page", "limit"}, }) return }
[ "func", "(", "api", "chartApi", ")", "GetTopTags", "(", "args", "map", "[", "string", "]", "interface", "{", "}", ")", "(", "result", "ChartGetTopTags", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err", ",", "...
//chart.getTopTags
[ "chart", ".", "getTopTags" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/chart.go#L17-L23
143,455
shkh/lastfm-go
lastfm/chart.go
GetTopTracks
func (api chartApi) GetTopTracks(args map[string]interface{}) (result ChartGetTopTracks, err error) { defer func() { appendCaller(err, "lastfm.Chart.GetTopTracks") }() err = callGet("chart.gettoptracks", api.params, args, &result, P{ "plain": []string{"page", "limit"}, }) return }
go
func (api chartApi) GetTopTracks(args map[string]interface{}) (result ChartGetTopTracks, err error) { defer func() { appendCaller(err, "lastfm.Chart.GetTopTracks") }() err = callGet("chart.gettoptracks", api.params, args, &result, P{ "plain": []string{"page", "limit"}, }) return }
[ "func", "(", "api", "chartApi", ")", "GetTopTracks", "(", "args", "map", "[", "string", "]", "interface", "{", "}", ")", "(", "result", "ChartGetTopTracks", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err", ",",...
//chart.getTopTracks
[ "chart", ".", "getTopTracks" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/chart.go#L26-L32
143,456
shkh/lastfm-go
lastfm/auth.go
Login
func (api *Api) Login(username, password string) (err error) { defer func() { appendCaller(err, "lastfm.Login") }() var result AuthGetMobileSession args := P{"username": username, "password": password} if err = callPostWithoutSession("auth.getmobilesession", api.params, args, &result, P{ "plain": []string{"usern...
go
func (api *Api) Login(username, password string) (err error) { defer func() { appendCaller(err, "lastfm.Login") }() var result AuthGetMobileSession args := P{"username": username, "password": password} if err = callPostWithoutSession("auth.getmobilesession", api.params, args, &result, P{ "plain": []string{"usern...
[ "func", "(", "api", "*", "Api", ")", "Login", "(", "username", ",", "password", "string", ")", "(", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err", ",", "\"", "\"", ")", "}", "(", ")", "\n\n", "var", "result"...
//Mobile app style
[ "Mobile", "app", "style" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/auth.go#L8-L21
143,457
shkh/lastfm-go
lastfm/auth.go
GetToken
func (api Api) GetToken() (token string, err error) { defer func() { appendCaller(err, "lastfm.GetToken") }() var result AuthGetToken if err = callGet("auth.gettoken", api.params, nil, &result, P{}); err != nil { return } token = result.Token return }
go
func (api Api) GetToken() (token string, err error) { defer func() { appendCaller(err, "lastfm.GetToken") }() var result AuthGetToken if err = callGet("auth.gettoken", api.params, nil, &result, P{}); err != nil { return } token = result.Token return }
[ "func", "(", "api", "Api", ")", "GetToken", "(", ")", "(", "token", "string", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err", ",", "\"", "\"", ")", "}", "(", ")", "\n\n", "var", "result", "AuthGetToken", ...
//Desktop app style
[ "Desktop", "app", "style" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/auth.go#L24-L33
143,458
shkh/lastfm-go
lastfm/auth.go
GetAuthRequestUrl
func (api Api) GetAuthRequestUrl(callback string) (uri string) { urlParams := url.Values{} urlParams.Add("api_key", api.params.apikey) if callback != "" { urlParams.Add("cb", callback) } uri = constructUrl(UriBrowserBase, urlParams) return }
go
func (api Api) GetAuthRequestUrl(callback string) (uri string) { urlParams := url.Values{} urlParams.Add("api_key", api.params.apikey) if callback != "" { urlParams.Add("cb", callback) } uri = constructUrl(UriBrowserBase, urlParams) return }
[ "func", "(", "api", "Api", ")", "GetAuthRequestUrl", "(", "callback", "string", ")", "(", "uri", "string", ")", "{", "urlParams", ":=", "url", ".", "Values", "{", "}", "\n", "urlParams", ".", "Add", "(", "\"", "\"", ",", "api", ".", "params", ".", ...
//Web app style
[ "Web", "app", "style" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/auth.go#L44-L52
143,459
shkh/lastfm-go
lastfm/auth.go
LoginWithToken
func (api *Api) LoginWithToken(token string) (err error) { defer func() { appendCaller(err, "lastfm.LoginWithToken") }() var result AuthGetSession args := P{"token": token} if err = callPostWithoutSession("auth.getsession", api.params, args, &result, P{"plain": []string{"token"}}); err != nil { return } api.pa...
go
func (api *Api) LoginWithToken(token string) (err error) { defer func() { appendCaller(err, "lastfm.LoginWithToken") }() var result AuthGetSession args := P{"token": token} if err = callPostWithoutSession("auth.getsession", api.params, args, &result, P{"plain": []string{"token"}}); err != nil { return } api.pa...
[ "func", "(", "api", "*", "Api", ")", "LoginWithToken", "(", "token", "string", ")", "(", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err", ",", "\"", "\"", ")", "}", "(", ")", "\n\n", "var", "result", "AuthGetSes...
//Desktop and Web app style
[ "Desktop", "and", "Web", "app", "style" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/auth.go#L55-L66
143,460
shkh/lastfm-go
lastfm/geo.go
GetTopArtists
func (api geoApi) GetTopArtists(args map[string]interface{}) (result GeoGetTopArtists, err error) { defer func() { appendCaller(err, "lastfm.Geo.GetTopArtists") }() err = callGet("geo.gettopartists", api.params, args, &result, P{ "plain": []string{"country", "limit", "page"}, }) return }
go
func (api geoApi) GetTopArtists(args map[string]interface{}) (result GeoGetTopArtists, err error) { defer func() { appendCaller(err, "lastfm.Geo.GetTopArtists") }() err = callGet("geo.gettopartists", api.params, args, &result, P{ "plain": []string{"country", "limit", "page"}, }) return }
[ "func", "(", "api", "geoApi", ")", "GetTopArtists", "(", "args", "map", "[", "string", "]", "interface", "{", "}", ")", "(", "result", "GeoGetTopArtists", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err", ",", ...
//geo.getTopArtists
[ "geo", ".", "getTopArtists" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/geo.go#L8-L14
143,461
shkh/lastfm-go
lastfm/geo.go
GetTopTracks
func (api geoApi) GetTopTracks(args map[string]interface{}) (result GeoGetTopTracks, err error) { defer func() { appendCaller(err, "lastfm.Geo.GetTopTracks") }() err = callGet("geo.gettoptracks", api.params, args, &result, P{ "plain": []string{"country", "location", "limit", "page"}, }) return }
go
func (api geoApi) GetTopTracks(args map[string]interface{}) (result GeoGetTopTracks, err error) { defer func() { appendCaller(err, "lastfm.Geo.GetTopTracks") }() err = callGet("geo.gettoptracks", api.params, args, &result, P{ "plain": []string{"country", "location", "limit", "page"}, }) return }
[ "func", "(", "api", "geoApi", ")", "GetTopTracks", "(", "args", "map", "[", "string", "]", "interface", "{", "}", ")", "(", "result", "GeoGetTopTracks", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err", ",", "...
//geo.getTopTracks
[ "geo", ".", "getTopTracks" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/geo.go#L17-L23
143,462
lucasjones/reggen
reggen.go
NewGenerator
func NewGenerator(regex string) (*Generator, error) { re, err := syntax.Parse(regex, syntax.Perl) if err != nil { return nil, err } //fmt.Println("Compiled re ", re) return &Generator{ re: re, rand: rand.New(rand.NewSource(time.Now().UnixNano())), }, nil }
go
func NewGenerator(regex string) (*Generator, error) { re, err := syntax.Parse(regex, syntax.Perl) if err != nil { return nil, err } //fmt.Println("Compiled re ", re) return &Generator{ re: re, rand: rand.New(rand.NewSource(time.Now().UnixNano())), }, nil }
[ "func", "NewGenerator", "(", "regex", "string", ")", "(", "*", "Generator", ",", "error", ")", "{", "re", ",", "err", ":=", "syntax", ".", "Parse", "(", "regex", ",", "syntax", ".", "Perl", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil",...
// create a new generator
[ "create", "a", "new", "generator" ]
cdb49ff09d77331d3fdd51e862b4023d2257954c
https://github.com/lucasjones/reggen/blob/cdb49ff09d77331d3fdd51e862b4023d2257954c/reggen.go#L192-L202
143,463
martini-contrib/sessions
sessions.go
Sessions
func Sessions(name string, store Store) martini.Handler { return func(res http.ResponseWriter, r *http.Request, c martini.Context, l *log.Logger) { // Map to the Session interface s := &session{name, r, l, store, nil, false} c.MapTo(s, (*Session)(nil)) // Use before hook to save out the session rw := res.(m...
go
func Sessions(name string, store Store) martini.Handler { return func(res http.ResponseWriter, r *http.Request, c martini.Context, l *log.Logger) { // Map to the Session interface s := &session{name, r, l, store, nil, false} c.MapTo(s, (*Session)(nil)) // Use before hook to save out the session rw := res.(m...
[ "func", "Sessions", "(", "name", "string", ",", "store", "Store", ")", "martini", ".", "Handler", "{", "return", "func", "(", "res", "http", ".", "ResponseWriter", ",", "r", "*", "http", ".", "Request", ",", "c", "martini", ".", "Context", ",", "l", ...
// Sessions is a Middleware that maps a session.Session service into the Martini handler chain. // Sessions can use a number of storage solutions with the given store.
[ "Sessions", "is", "a", "Middleware", "that", "maps", "a", "session", ".", "Session", "service", "into", "the", "Martini", "handler", "chain", ".", "Sessions", "can", "use", "a", "number", "of", "storage", "solutions", "with", "the", "given", "store", "." ]
fa13114fbcf036dff8185d728651d85fcef772db
https://github.com/martini-contrib/sessions/blob/fa13114fbcf036dff8185d728651d85fcef772db/sessions.go#L77-L97
143,464
martini-contrib/sessions
redis_store.go
NewRediStore
func NewRediStore(size int, network, address, password string, keyPairs ...[]byte) (RediStore, error) { store, err := redistore.NewRediStore(size, network, address, password, keyPairs...) if err != nil { return nil, err } return &rediStore{store}, nil }
go
func NewRediStore(size int, network, address, password string, keyPairs ...[]byte) (RediStore, error) { store, err := redistore.NewRediStore(size, network, address, password, keyPairs...) if err != nil { return nil, err } return &rediStore{store}, nil }
[ "func", "NewRediStore", "(", "size", "int", ",", "network", ",", "address", ",", "password", "string", ",", "keyPairs", "...", "[", "]", "byte", ")", "(", "RediStore", ",", "error", ")", "{", "store", ",", "err", ":=", "redistore", ".", "NewRediStore", ...
// NewCookieStore returns a new CookieStore. // // Keys are defined in pairs to allow key rotation, but the common case is to set a single // authentication key and optionally an encryption key. // // The first key in a pair is used for authentication and the second for encryption. The // encryption key can be set to n...
[ "NewCookieStore", "returns", "a", "new", "CookieStore", ".", "Keys", "are", "defined", "in", "pairs", "to", "allow", "key", "rotation", "but", "the", "common", "case", "is", "to", "set", "a", "single", "authentication", "key", "and", "optionally", "an", "enc...
fa13114fbcf036dff8185d728651d85fcef772db
https://github.com/martini-contrib/sessions/blob/fa13114fbcf036dff8185d728651d85fcef772db/redis_store.go#L30-L36
143,465
shkh/lastfm-go
lastfm/artist.go
GetCorrection
func (api artistApi) GetCorrection(args map[string]interface{}) (result ArtistGetCorrection, err error) { defer func() { appendCaller(err, "lastfm.Artist.GetCorrection") }() err = callGet("artist.getcorrection", api.params, args, &result, P{ "plain": []string{"artist"}, }) return }
go
func (api artistApi) GetCorrection(args map[string]interface{}) (result ArtistGetCorrection, err error) { defer func() { appendCaller(err, "lastfm.Artist.GetCorrection") }() err = callGet("artist.getcorrection", api.params, args, &result, P{ "plain": []string{"artist"}, }) return }
[ "func", "(", "api", "artistApi", ")", "GetCorrection", "(", "args", "map", "[", "string", "]", "interface", "{", "}", ")", "(", "result", "ArtistGetCorrection", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err", ...
//artist.getCorrection
[ "artist", ".", "getCorrection" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/artist.go#L17-L23
143,466
shkh/lastfm-go
lastfm/artist.go
GetInfo
func (api artistApi) GetInfo(args map[string]interface{}) (result ArtistGetInfo, err error) { defer func() { appendCaller(err, "lastfm.Artist.GetInfo") }() if _, ok := args["username"]; !ok && api.params.sk != "" { err = callPost("artist.getinfo", api.params, args, &result, P{ "plain": []string{"artist", "mbid",...
go
func (api artistApi) GetInfo(args map[string]interface{}) (result ArtistGetInfo, err error) { defer func() { appendCaller(err, "lastfm.Artist.GetInfo") }() if _, ok := args["username"]; !ok && api.params.sk != "" { err = callPost("artist.getinfo", api.params, args, &result, P{ "plain": []string{"artist", "mbid",...
[ "func", "(", "api", "artistApi", ")", "GetInfo", "(", "args", "map", "[", "string", "]", "interface", "{", "}", ")", "(", "result", "ArtistGetInfo", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err", ",", "\"",...
//artist.getInfo
[ "artist", ".", "getInfo" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/artist.go#L26-L38
143,467
shkh/lastfm-go
lastfm/artist.go
GetSimilar
func (api artistApi) GetSimilar(args map[string]interface{}) (result ArtistGetSimilar, err error) { defer func() { appendCaller(err, "lastfm.Artist.GetSimilar") }() err = callGet("artist.getsimilar", api.params, args, &result, P{ "plain": []string{"limit", "artist", "autocorrect", "mbid"}, }) return }
go
func (api artistApi) GetSimilar(args map[string]interface{}) (result ArtistGetSimilar, err error) { defer func() { appendCaller(err, "lastfm.Artist.GetSimilar") }() err = callGet("artist.getsimilar", api.params, args, &result, P{ "plain": []string{"limit", "artist", "autocorrect", "mbid"}, }) return }
[ "func", "(", "api", "artistApi", ")", "GetSimilar", "(", "args", "map", "[", "string", "]", "interface", "{", "}", ")", "(", "result", "ArtistGetSimilar", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err", ",", ...
//artist.getSimilar
[ "artist", ".", "getSimilar" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/artist.go#L41-L47
143,468
shkh/lastfm-go
lastfm/artist.go
GetTags
func (api artistApi) GetTags(args map[string]interface{}) (result ArtistGetTags, err error) { defer func() { appendCaller(err, "lastfm.Artist.GetTags") }() if _, ok := args["user"]; !ok && api.params.sk != "" { err = callGet("artist.gettags", api.params, args, &result, P{ "plain": []string{"artist", "mbid", "use...
go
func (api artistApi) GetTags(args map[string]interface{}) (result ArtistGetTags, err error) { defer func() { appendCaller(err, "lastfm.Artist.GetTags") }() if _, ok := args["user"]; !ok && api.params.sk != "" { err = callGet("artist.gettags", api.params, args, &result, P{ "plain": []string{"artist", "mbid", "use...
[ "func", "(", "api", "artistApi", ")", "GetTags", "(", "args", "map", "[", "string", "]", "interface", "{", "}", ")", "(", "result", "ArtistGetTags", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err", ",", "\"",...
//artist.getTags
[ "artist", ".", "getTags" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/artist.go#L50-L62
143,469
shkh/lastfm-go
lastfm/artist.go
GetTopAlbums
func (api artistApi) GetTopAlbums(args map[string]interface{}) (result ArtistGetTopAlbums, err error) { defer func() { appendCaller(err, "lastfm.Artist.GetTopAlbums") }() err = callGet("artist.gettopalbums", api.params, args, &result, P{ "plain": []string{"artist", "mbid", "autocorrect", "page", "limit"}, }) retu...
go
func (api artistApi) GetTopAlbums(args map[string]interface{}) (result ArtistGetTopAlbums, err error) { defer func() { appendCaller(err, "lastfm.Artist.GetTopAlbums") }() err = callGet("artist.gettopalbums", api.params, args, &result, P{ "plain": []string{"artist", "mbid", "autocorrect", "page", "limit"}, }) retu...
[ "func", "(", "api", "artistApi", ")", "GetTopAlbums", "(", "args", "map", "[", "string", "]", "interface", "{", "}", ")", "(", "result", "ArtistGetTopAlbums", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err", ",...
//artist.getTopAlbums
[ "artist", ".", "getTopAlbums" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/artist.go#L65-L71
143,470
shkh/lastfm-go
lastfm/artist.go
GetTopTags
func (api artistApi) GetTopTags(args map[string]interface{}) (result ArtistGetTopTags, err error) { defer func() { appendCaller(err, "lastfm.Artist.GetTopTags") }() err = callGet("artist.gettoptags", api.params, args, &result, P{ "plain": []string{"artist", "mbid", "autocorrect"}, }) return }
go
func (api artistApi) GetTopTags(args map[string]interface{}) (result ArtistGetTopTags, err error) { defer func() { appendCaller(err, "lastfm.Artist.GetTopTags") }() err = callGet("artist.gettoptags", api.params, args, &result, P{ "plain": []string{"artist", "mbid", "autocorrect"}, }) return }
[ "func", "(", "api", "artistApi", ")", "GetTopTags", "(", "args", "map", "[", "string", "]", "interface", "{", "}", ")", "(", "result", "ArtistGetTopTags", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err", ",", ...
//artist.getTopTags
[ "artist", ".", "getTopTags" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/artist.go#L74-L80
143,471
shkh/lastfm-go
lastfm/artist.go
GetTopTracks
func (api artistApi) GetTopTracks(args map[string]interface{}) (result ArtistGetTopTracks, err error) { defer func() { appendCaller(err, "lastfm.Artist.GetTopTracks") }() err = callGet("artist.gettoptracks", api.params, args, &result, P{ "plain": []string{"artist", "mbid", "autocorrect", "page", "limit"}, }) retu...
go
func (api artistApi) GetTopTracks(args map[string]interface{}) (result ArtistGetTopTracks, err error) { defer func() { appendCaller(err, "lastfm.Artist.GetTopTracks") }() err = callGet("artist.gettoptracks", api.params, args, &result, P{ "plain": []string{"artist", "mbid", "autocorrect", "page", "limit"}, }) retu...
[ "func", "(", "api", "artistApi", ")", "GetTopTracks", "(", "args", "map", "[", "string", "]", "interface", "{", "}", ")", "(", "result", "ArtistGetTopTracks", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err", ",...
//artist.getTopTracks
[ "artist", ".", "getTopTracks" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/artist.go#L83-L89
143,472
shkh/lastfm-go
lastfm/artist.go
Search
func (api artistApi) Search(args map[string]interface{}) (result ArtistSearch, err error) { defer func() { appendCaller(err, "lastfm.Artist.Search") }() err = callGet("artist.search", api.params, args, &result, P{ "plain": []string{"limit", "page", "artist"}, }) return }
go
func (api artistApi) Search(args map[string]interface{}) (result ArtistSearch, err error) { defer func() { appendCaller(err, "lastfm.Artist.Search") }() err = callGet("artist.search", api.params, args, &result, P{ "plain": []string{"limit", "page", "artist"}, }) return }
[ "func", "(", "api", "artistApi", ")", "Search", "(", "args", "map", "[", "string", "]", "interface", "{", "}", ")", "(", "result", "ArtistSearch", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err", ",", "\"", ...
//artist.search
[ "artist", ".", "search" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/artist.go#L101-L107
143,473
shkh/lastfm-go
lastfm/tag.go
GetInfo
func (api tagApi) GetInfo(args map[string]interface{}) (result TagGetInfo, err error) { defer func() { appendCaller(err, "lastfm.Tag.GetInfo") }() err = callGet("tag.getinfo", api.params, args, &result, P{ "plain": []string{"lang", "artist", "mbid"}, }) return }
go
func (api tagApi) GetInfo(args map[string]interface{}) (result TagGetInfo, err error) { defer func() { appendCaller(err, "lastfm.Tag.GetInfo") }() err = callGet("tag.getinfo", api.params, args, &result, P{ "plain": []string{"lang", "artist", "mbid"}, }) return }
[ "func", "(", "api", "tagApi", ")", "GetInfo", "(", "args", "map", "[", "string", "]", "interface", "{", "}", ")", "(", "result", "TagGetInfo", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err", ",", "\"", "\"...
//tag.getInfo
[ "tag", ".", "getInfo" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/tag.go#L8-L14
143,474
shkh/lastfm-go
lastfm/tag.go
GetSimilar
func (api tagApi) GetSimilar(args map[string]interface{}) (result TagGetSimilar, err error) { defer func() { appendCaller(err, "lastfm.Tag.GetSimilar") }() err = callGet("tag.getsimilar", api.params, args, &result, P{ "plain": []string{"tag"}, }) return }
go
func (api tagApi) GetSimilar(args map[string]interface{}) (result TagGetSimilar, err error) { defer func() { appendCaller(err, "lastfm.Tag.GetSimilar") }() err = callGet("tag.getsimilar", api.params, args, &result, P{ "plain": []string{"tag"}, }) return }
[ "func", "(", "api", "tagApi", ")", "GetSimilar", "(", "args", "map", "[", "string", "]", "interface", "{", "}", ")", "(", "result", "TagGetSimilar", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err", ",", "\"",...
//tag.getSimilar
[ "tag", ".", "getSimilar" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/tag.go#L17-L23
143,475
shkh/lastfm-go
lastfm/tag.go
GetTopAlbums
func (api tagApi) GetTopAlbums(args map[string]interface{}) (result TagGetTopAlbums, err error) { defer func() { appendCaller(err, "lastfm.Tag.GetTopAlbums") }() err = callGet("tag.gettopalbums", api.params, args, &result, P{ "plain": []string{"tag", "limit", "page"}, }) return }
go
func (api tagApi) GetTopAlbums(args map[string]interface{}) (result TagGetTopAlbums, err error) { defer func() { appendCaller(err, "lastfm.Tag.GetTopAlbums") }() err = callGet("tag.gettopalbums", api.params, args, &result, P{ "plain": []string{"tag", "limit", "page"}, }) return }
[ "func", "(", "api", "tagApi", ")", "GetTopAlbums", "(", "args", "map", "[", "string", "]", "interface", "{", "}", ")", "(", "result", "TagGetTopAlbums", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err", ",", "...
//tag.getTopAlbums
[ "tag", ".", "getTopAlbums" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/tag.go#L26-L32
143,476
shkh/lastfm-go
lastfm/tag.go
GetTopArtists
func (api tagApi) GetTopArtists(args map[string]interface{}) (result TagGetTopArtists, err error) { defer func() { appendCaller(err, "lastfm.Tag.GetTopArtists") }() err = callGet("tag.gettopartists", api.params, args, &result, P{ "plain": []string{"tag", "limit", "page"}, }) return }
go
func (api tagApi) GetTopArtists(args map[string]interface{}) (result TagGetTopArtists, err error) { defer func() { appendCaller(err, "lastfm.Tag.GetTopArtists") }() err = callGet("tag.gettopartists", api.params, args, &result, P{ "plain": []string{"tag", "limit", "page"}, }) return }
[ "func", "(", "api", "tagApi", ")", "GetTopArtists", "(", "args", "map", "[", "string", "]", "interface", "{", "}", ")", "(", "result", "TagGetTopArtists", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err", ",", ...
//tag.getTopArtists
[ "tag", ".", "getTopArtists" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/tag.go#L35-L41
143,477
shkh/lastfm-go
lastfm/tag.go
GetTopTags
func (api tagApi) GetTopTags(args map[string]interface{}) (result TagGetTopTags, err error) { defer func() { appendCaller(err, "lastfm.Tag.GetTopTags") }() err = callGet("tag.gettoptags", api.params, args, &result, P{}) return }
go
func (api tagApi) GetTopTags(args map[string]interface{}) (result TagGetTopTags, err error) { defer func() { appendCaller(err, "lastfm.Tag.GetTopTags") }() err = callGet("tag.gettoptags", api.params, args, &result, P{}) return }
[ "func", "(", "api", "tagApi", ")", "GetTopTags", "(", "args", "map", "[", "string", "]", "interface", "{", "}", ")", "(", "result", "TagGetTopTags", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err", ",", "\"",...
//tag.getTopTags
[ "tag", ".", "getTopTags" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/tag.go#L44-L48
143,478
shkh/lastfm-go
lastfm/tag.go
GetTopTracks
func (api tagApi) GetTopTracks(args map[string]interface{}) (result TagGetTopTracks, err error) { defer func() { appendCaller(err, "lastfm.Tag.GetTopTracks") }() err = callGet("tag.gettoptracks", api.params, args, &result, P{ "plain": []string{"tag", "limit", "page"}, }) return }
go
func (api tagApi) GetTopTracks(args map[string]interface{}) (result TagGetTopTracks, err error) { defer func() { appendCaller(err, "lastfm.Tag.GetTopTracks") }() err = callGet("tag.gettoptracks", api.params, args, &result, P{ "plain": []string{"tag", "limit", "page"}, }) return }
[ "func", "(", "api", "tagApi", ")", "GetTopTracks", "(", "args", "map", "[", "string", "]", "interface", "{", "}", ")", "(", "result", "TagGetTopTracks", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err", ",", "...
//tag.getTopTracks
[ "tag", ".", "getTopTracks" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/tag.go#L51-L57
143,479
shkh/lastfm-go
lastfm/tag.go
GetTopWeeklyChartList
func (api tagApi) GetTopWeeklyChartList(args map[string]interface{}) (result TagGetWeeklyChartList, err error) { defer func() { appendCaller(err, "lastfm.Tag.GetWeeklyChartList") }() err = callGet("tag.getweeklychartlist", api.params, args, &result, P{ "plain": []string{"tag"}, }) return }
go
func (api tagApi) GetTopWeeklyChartList(args map[string]interface{}) (result TagGetWeeklyChartList, err error) { defer func() { appendCaller(err, "lastfm.Tag.GetWeeklyChartList") }() err = callGet("tag.getweeklychartlist", api.params, args, &result, P{ "plain": []string{"tag"}, }) return }
[ "func", "(", "api", "tagApi", ")", "GetTopWeeklyChartList", "(", "args", "map", "[", "string", "]", "interface", "{", "}", ")", "(", "result", "TagGetWeeklyChartList", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "e...
//tag.getWeeklyChartList
[ "tag", ".", "getWeeklyChartList" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/tag.go#L60-L66
143,480
shkh/lastfm-go
lastfm/library.go
GetArtists
func (api libraryApi) GetArtists(args map[string]interface{}) (result LibraryGetArtists, err error) { defer func() { appendCaller(err, "lastfm.Library.GetArtists") }() err = callGet("library.getartists", api.params, args, &result, P{ "plain": []string{"user", "limit", "page"}, }) return }
go
func (api libraryApi) GetArtists(args map[string]interface{}) (result LibraryGetArtists, err error) { defer func() { appendCaller(err, "lastfm.Library.GetArtists") }() err = callGet("library.getartists", api.params, args, &result, P{ "plain": []string{"user", "limit", "page"}, }) return }
[ "func", "(", "api", "libraryApi", ")", "GetArtists", "(", "args", "map", "[", "string", "]", "interface", "{", "}", ")", "(", "result", "LibraryGetArtists", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err", ",",...
//library.getArtists
[ "library", ".", "getArtists" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/library.go#L8-L14
143,481
shkh/lastfm-go
lastfm/track.go
AddTags
func (api trackApi) AddTags(args map[string]interface{}) (err error) { defer func() { appendCaller(err, "lastfm.Track.AddTags") }() err = callPost("track.addtags", api.params, args, nil, P{ "plain": []string{"artist", "track", "tags"}, }) return }
go
func (api trackApi) AddTags(args map[string]interface{}) (err error) { defer func() { appendCaller(err, "lastfm.Track.AddTags") }() err = callPost("track.addtags", api.params, args, nil, P{ "plain": []string{"artist", "track", "tags"}, }) return }
[ "func", "(", "api", "trackApi", ")", "AddTags", "(", "args", "map", "[", "string", "]", "interface", "{", "}", ")", "(", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err", ",", "\"", "\"", ")", "}", "(", ")", ...
//track.addTags
[ "track", ".", "addTags" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/track.go#L8-L14
143,482
shkh/lastfm-go
lastfm/track.go
GetCorrection
func (api trackApi) GetCorrection(args map[string]interface{}) (result TrackGetCorrection, err error) { defer func() { appendCaller(err, "lastfm.Track.Correction") }() err = callGet("track.getcorrection", api.params, args, &result, P{ "plain": []string{"artist", "track"}, }) return }
go
func (api trackApi) GetCorrection(args map[string]interface{}) (result TrackGetCorrection, err error) { defer func() { appendCaller(err, "lastfm.Track.Correction") }() err = callGet("track.getcorrection", api.params, args, &result, P{ "plain": []string{"artist", "track"}, }) return }
[ "func", "(", "api", "trackApi", ")", "GetCorrection", "(", "args", "map", "[", "string", "]", "interface", "{", "}", ")", "(", "result", "TrackGetCorrection", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err", ",...
//track.getCorrection
[ "track", ".", "getCorrection" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/track.go#L17-L23
143,483
shkh/lastfm-go
lastfm/track.go
GetInfo
func (api trackApi) GetInfo(args map[string]interface{}) (result TrackGetInfo, err error) { defer func() { appendCaller(err, "lastfm.Track.GetInfo") }() err = callGet("track.getinfo", api.params, args, &result, P{ "plain": []string{"artist", "track", "mbid", "username", "autocorrect"}, }) return }
go
func (api trackApi) GetInfo(args map[string]interface{}) (result TrackGetInfo, err error) { defer func() { appendCaller(err, "lastfm.Track.GetInfo") }() err = callGet("track.getinfo", api.params, args, &result, P{ "plain": []string{"artist", "track", "mbid", "username", "autocorrect"}, }) return }
[ "func", "(", "api", "trackApi", ")", "GetInfo", "(", "args", "map", "[", "string", "]", "interface", "{", "}", ")", "(", "result", "TrackGetInfo", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err", ",", "\"", ...
//track.getInfo
[ "track", ".", "getInfo" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/track.go#L26-L32
143,484
shkh/lastfm-go
lastfm/track.go
GetSimilar
func (api trackApi) GetSimilar(args map[string]interface{}) (result TrackGetSimilar, err error) { defer func() { appendCaller(err, "lastfm.Track.GetSimilar") }() err = callGet("track.getsimilar", api.params, args, &result, P{ "plain": []string{"artist", "track", "mbid", "limit", "autocorrect"}, }) return }
go
func (api trackApi) GetSimilar(args map[string]interface{}) (result TrackGetSimilar, err error) { defer func() { appendCaller(err, "lastfm.Track.GetSimilar") }() err = callGet("track.getsimilar", api.params, args, &result, P{ "plain": []string{"artist", "track", "mbid", "limit", "autocorrect"}, }) return }
[ "func", "(", "api", "trackApi", ")", "GetSimilar", "(", "args", "map", "[", "string", "]", "interface", "{", "}", ")", "(", "result", "TrackGetSimilar", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err", ",", "...
//track.getSimilar
[ "track", ".", "getSimilar" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/track.go#L35-L41
143,485
shkh/lastfm-go
lastfm/track.go
GetTags
func (api trackApi) GetTags(args map[string]interface{}) (result TrackGetTags, err error) { defer func() { appendCaller(err, "lastfm.Track.GetTags") }() if _, ok := args["users"]; !ok && api.params.sk != "" { err = callPost("track.gettags", api.params, args, &result, P{ "plain": []string{"artist", "track", "mbid...
go
func (api trackApi) GetTags(args map[string]interface{}) (result TrackGetTags, err error) { defer func() { appendCaller(err, "lastfm.Track.GetTags") }() if _, ok := args["users"]; !ok && api.params.sk != "" { err = callPost("track.gettags", api.params, args, &result, P{ "plain": []string{"artist", "track", "mbid...
[ "func", "(", "api", "trackApi", ")", "GetTags", "(", "args", "map", "[", "string", "]", "interface", "{", "}", ")", "(", "result", "TrackGetTags", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err", ",", "\"", ...
//track.getTags
[ "track", ".", "getTags" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/track.go#L44-L56
143,486
shkh/lastfm-go
lastfm/track.go
GetTopTags
func (api trackApi) GetTopTags(args map[string]interface{}) (result TrackGetTopTags, err error) { defer func() { appendCaller(err, "lastfm.Track.GetTopTags") }() err = callGet("track.gettoptags", api.params, args, &result, P{ "plain": []string{"artist", "track", "mbid", "autocorrect"}, }) return }
go
func (api trackApi) GetTopTags(args map[string]interface{}) (result TrackGetTopTags, err error) { defer func() { appendCaller(err, "lastfm.Track.GetTopTags") }() err = callGet("track.gettoptags", api.params, args, &result, P{ "plain": []string{"artist", "track", "mbid", "autocorrect"}, }) return }
[ "func", "(", "api", "trackApi", ")", "GetTopTags", "(", "args", "map", "[", "string", "]", "interface", "{", "}", ")", "(", "result", "TrackGetTopTags", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err", ",", "...
//track.getTopTags
[ "track", ".", "getTopTags" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/track.go#L59-L65
143,487
shkh/lastfm-go
lastfm/track.go
Scrobble
func (api trackApi) Scrobble(args map[string]interface{}) (result TrackScrobble, err error) { defer func() { appendCaller(err, "lastfm.Track.Scrobble") }() err = callPost("track.scrobble", api.params, args, &result, P{ "indexing": []string{"artist", "track", "timestamp", "album", "context", "streamId", "chosenByUse...
go
func (api trackApi) Scrobble(args map[string]interface{}) (result TrackScrobble, err error) { defer func() { appendCaller(err, "lastfm.Track.Scrobble") }() err = callPost("track.scrobble", api.params, args, &result, P{ "indexing": []string{"artist", "track", "timestamp", "album", "context", "streamId", "chosenByUse...
[ "func", "(", "api", "trackApi", ")", "Scrobble", "(", "args", "map", "[", "string", "]", "interface", "{", "}", ")", "(", "result", "TrackScrobble", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err", ",", "\"",...
//track.scrobble
[ "track", ".", "scrobble" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/track.go#L86-L92
143,488
shkh/lastfm-go
lastfm/track.go
Search
func (api trackApi) Search(args map[string]interface{}) (result TrackSearch, err error) { defer func() { appendCaller(err, "lastfm.Track.Search") }() err = callGet("track.search", api.params, args, &result, P{ "plain": []string{"artist", "track", "limit", "page"}, }) return }
go
func (api trackApi) Search(args map[string]interface{}) (result TrackSearch, err error) { defer func() { appendCaller(err, "lastfm.Track.Search") }() err = callGet("track.search", api.params, args, &result, P{ "plain": []string{"artist", "track", "limit", "page"}, }) return }
[ "func", "(", "api", "trackApi", ")", "Search", "(", "args", "map", "[", "string", "]", "interface", "{", "}", ")", "(", "result", "TrackSearch", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err", ",", "\"", "...
//track.search
[ "track", ".", "search" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/track.go#L95-L101
143,489
shkh/lastfm-go
lastfm/track.go
UpdateNowPlaying
func (api trackApi) UpdateNowPlaying(args map[string]interface{}) (result TrackUpdateNowPlaying, err error) { defer func() { appendCaller(err, "lastfm.Track.UpdateNowPlaying") }() err = callPost("track.updatenowplaying", api.params, args, &result, P{ "plain": []string{"artist", "track", "album", "trackNumber", "con...
go
func (api trackApi) UpdateNowPlaying(args map[string]interface{}) (result TrackUpdateNowPlaying, err error) { defer func() { appendCaller(err, "lastfm.Track.UpdateNowPlaying") }() err = callPost("track.updatenowplaying", api.params, args, &result, P{ "plain": []string{"artist", "track", "album", "trackNumber", "con...
[ "func", "(", "api", "trackApi", ")", "UpdateNowPlaying", "(", "args", "map", "[", "string", "]", "interface", "{", "}", ")", "(", "result", "TrackUpdateNowPlaying", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err"...
//track.updateNowPlaying
[ "track", ".", "updateNowPlaying" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/track.go#L113-L119
143,490
shkh/lastfm-go
lastfm/album.go
GetInfo
func (api albumApi) GetInfo(args map[string]interface{}) (result AlbumGetInfo, err error) { defer func() { appendCaller(err, "lastfm.Album.GetInfo") }() err = callGet("album.getinfo", api.params, args, &result, P{ "plain": []string{"artist", "album", "mbid", "autocorrect", "username", "lang"}, }) return }
go
func (api albumApi) GetInfo(args map[string]interface{}) (result AlbumGetInfo, err error) { defer func() { appendCaller(err, "lastfm.Album.GetInfo") }() err = callGet("album.getinfo", api.params, args, &result, P{ "plain": []string{"artist", "album", "mbid", "autocorrect", "username", "lang"}, }) return }
[ "func", "(", "api", "albumApi", ")", "GetInfo", "(", "args", "map", "[", "string", "]", "interface", "{", "}", ")", "(", "result", "AlbumGetInfo", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err", ",", "\"", ...
//album.getInfo
[ "album", ".", "getInfo" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/album.go#L17-L23
143,491
shkh/lastfm-go
lastfm/album.go
GetTags
func (api albumApi) GetTags(args map[string]interface{}) (result AlbumGetTags, err error) { defer func() { appendCaller(err, "lastfm.Album.GetTags") }() if _, ok := args["user"]; !ok && api.params.sk != "" { err = callPost("album.gettags", api.params, args, &result, P{ "plain": []string{"artist", "album", "mbid"...
go
func (api albumApi) GetTags(args map[string]interface{}) (result AlbumGetTags, err error) { defer func() { appendCaller(err, "lastfm.Album.GetTags") }() if _, ok := args["user"]; !ok && api.params.sk != "" { err = callPost("album.gettags", api.params, args, &result, P{ "plain": []string{"artist", "album", "mbid"...
[ "func", "(", "api", "albumApi", ")", "GetTags", "(", "args", "map", "[", "string", "]", "interface", "{", "}", ")", "(", "result", "AlbumGetTags", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err", ",", "\"", ...
//album.getTags
[ "album", ".", "getTags" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/album.go#L26-L38
143,492
shkh/lastfm-go
lastfm/album.go
GetTopTags
func (api albumApi) GetTopTags(args map[string]interface{}) (result AlbumGetTopTags, err error) { defer func() { appendCaller(err, "lastfm.Album.GetTopTags") }() err = callGet("album.gettoptags", api.params, args, &result, P{ "plain": []string{"artist", "album", "autocorrect", "mbid"}, }) return }
go
func (api albumApi) GetTopTags(args map[string]interface{}) (result AlbumGetTopTags, err error) { defer func() { appendCaller(err, "lastfm.Album.GetTopTags") }() err = callGet("album.gettoptags", api.params, args, &result, P{ "plain": []string{"artist", "album", "autocorrect", "mbid"}, }) return }
[ "func", "(", "api", "albumApi", ")", "GetTopTags", "(", "args", "map", "[", "string", "]", "interface", "{", "}", ")", "(", "result", "AlbumGetTopTags", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err", ",", "...
//album.getTopTags
[ "album", ".", "getTopTags" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/album.go#L41-L47
143,493
shkh/lastfm-go
lastfm/album.go
Search
func (api albumApi) Search(args map[string]interface{}) (result AlbumSearch, err error) { defer func() { appendCaller(err, "lastfm.Album.Search") }() err = callGet("album.search", api.params, args, &result, P{ "plain": []string{"limit", "page", "album"}, }) return }
go
func (api albumApi) Search(args map[string]interface{}) (result AlbumSearch, err error) { defer func() { appendCaller(err, "lastfm.Album.Search") }() err = callGet("album.search", api.params, args, &result, P{ "plain": []string{"limit", "page", "album"}, }) return }
[ "func", "(", "api", "albumApi", ")", "Search", "(", "args", "map", "[", "string", "]", "interface", "{", "}", ")", "(", "result", "AlbumSearch", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err", ",", "\"", "...
//album.search
[ "album", ".", "search" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/album.go#L59-L65
143,494
shkh/lastfm-go
lastfm/user.go
GetArtistTracks
func (api userApi) GetArtistTracks(args map[string]interface{}) (result UserGetArtistTracks, err error) { defer func() { appendCaller(err, "lastfm.User.GetArtistTracks") }() err = callGet("user.getartisttracks", api.params, args, &result, P{ "plain": []string{"user", "artist", "startTimeStamp", "page", "endTimeStam...
go
func (api userApi) GetArtistTracks(args map[string]interface{}) (result UserGetArtistTracks, err error) { defer func() { appendCaller(err, "lastfm.User.GetArtistTracks") }() err = callGet("user.getartisttracks", api.params, args, &result, P{ "plain": []string{"user", "artist", "startTimeStamp", "page", "endTimeStam...
[ "func", "(", "api", "userApi", ")", "GetArtistTracks", "(", "args", "map", "[", "string", "]", "interface", "{", "}", ")", "(", "result", "UserGetArtistTracks", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err", ...
//user.getArtistTracks
[ "user", ".", "getArtistTracks" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/user.go#L8-L14
143,495
shkh/lastfm-go
lastfm/user.go
GetFriends
func (api userApi) GetFriends(args map[string]interface{}) (result UserGetFriends, err error) { defer func() { appendCaller(err, "lastfm.User.GetFriends") }() err = callGet("user.getfriends", api.params, args, &result, P{ "plain": []string{"user", "recenttracks", "limit", "page"}, }) return }
go
func (api userApi) GetFriends(args map[string]interface{}) (result UserGetFriends, err error) { defer func() { appendCaller(err, "lastfm.User.GetFriends") }() err = callGet("user.getfriends", api.params, args, &result, P{ "plain": []string{"user", "recenttracks", "limit", "page"}, }) return }
[ "func", "(", "api", "userApi", ")", "GetFriends", "(", "args", "map", "[", "string", "]", "interface", "{", "}", ")", "(", "result", "UserGetFriends", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err", ",", "\"...
//user.getFriends
[ "user", ".", "getFriends" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/user.go#L17-L23
143,496
shkh/lastfm-go
lastfm/user.go
GetInfo
func (api userApi) GetInfo(args map[string]interface{}) (result UserGetInfo, err error) { defer func() { appendCaller(err, "lastfm.User.GetInfo") }() if _, ok := args["user"]; !ok && api.params.sk != "" { err = callPost("user.getinfo", api.params, args, &result, P{}) } else { err = callGet("user.getinfo", api.pa...
go
func (api userApi) GetInfo(args map[string]interface{}) (result UserGetInfo, err error) { defer func() { appendCaller(err, "lastfm.User.GetInfo") }() if _, ok := args["user"]; !ok && api.params.sk != "" { err = callPost("user.getinfo", api.params, args, &result, P{}) } else { err = callGet("user.getinfo", api.pa...
[ "func", "(", "api", "userApi", ")", "GetInfo", "(", "args", "map", "[", "string", "]", "interface", "{", "}", ")", "(", "result", "UserGetInfo", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err", ",", "\"", "...
//user.getInfo
[ "user", ".", "getInfo" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/user.go#L26-L36
143,497
shkh/lastfm-go
lastfm/user.go
GetLovedTracks
func (api userApi) GetLovedTracks(args map[string]interface{}) (result UserGetLovedTracks, err error) { defer func() { appendCaller(err, "lastfm.User.GetLovedTracks") }() err = callGet("user.getlovedtracks", api.params, args, &result, P{ "plain": []string{"user", "limit", "page"}, }) return }
go
func (api userApi) GetLovedTracks(args map[string]interface{}) (result UserGetLovedTracks, err error) { defer func() { appendCaller(err, "lastfm.User.GetLovedTracks") }() err = callGet("user.getlovedtracks", api.params, args, &result, P{ "plain": []string{"user", "limit", "page"}, }) return }
[ "func", "(", "api", "userApi", ")", "GetLovedTracks", "(", "args", "map", "[", "string", "]", "interface", "{", "}", ")", "(", "result", "UserGetLovedTracks", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err", ",...
//user.getLovedTracks
[ "user", ".", "getLovedTracks" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/user.go#L39-L45
143,498
shkh/lastfm-go
lastfm/user.go
GetPersonalTags
func (api userApi) GetPersonalTags(args map[string]interface{}) (result UserGetPersonalTags, err error) { defer func() { appendCaller(err, "lastfm.User.GetPersonalTags") }() err = callGet("user.getPersonalTags", api.params, args, &result, P{ "plain": []string{"user", "tag", "taggingtype", "limit", "page"}, }) ret...
go
func (api userApi) GetPersonalTags(args map[string]interface{}) (result UserGetPersonalTags, err error) { defer func() { appendCaller(err, "lastfm.User.GetPersonalTags") }() err = callGet("user.getPersonalTags", api.params, args, &result, P{ "plain": []string{"user", "tag", "taggingtype", "limit", "page"}, }) ret...
[ "func", "(", "api", "userApi", ")", "GetPersonalTags", "(", "args", "map", "[", "string", "]", "interface", "{", "}", ")", "(", "result", "UserGetPersonalTags", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err", ...
//user.getPersonalTags
[ "user", ".", "getPersonalTags" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/user.go#L48-L54
143,499
shkh/lastfm-go
lastfm/user.go
GetRecentTracks
func (api userApi) GetRecentTracks(args map[string]interface{}) (result UserGetRecentTracks, err error) { defer func() { appendCaller(err, "lastfm.User.GetRecentTracks") }() err = callGet("user.getrecenttracks", api.params, args, &result, P{ "plain": []string{"user", "limit", "page", "from", "extended", "to"}, }) ...
go
func (api userApi) GetRecentTracks(args map[string]interface{}) (result UserGetRecentTracks, err error) { defer func() { appendCaller(err, "lastfm.User.GetRecentTracks") }() err = callGet("user.getrecenttracks", api.params, args, &result, P{ "plain": []string{"user", "limit", "page", "from", "extended", "to"}, }) ...
[ "func", "(", "api", "userApi", ")", "GetRecentTracks", "(", "args", "map", "[", "string", "]", "interface", "{", "}", ")", "(", "result", "UserGetRecentTracks", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "appendCaller", "(", "err", ...
//user.getRecentTracks
[ "user", ".", "getRecentTracks" ]
29483feae85788de18215fcfdf60ff6deeff19e4
https://github.com/shkh/lastfm-go/blob/29483feae85788de18215fcfdf60ff6deeff19e4/lastfm/user.go#L57-L63