text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (tq *TeamQuery) AllX(ctx context.Context) []*Team {
nodes, err := tq.All(ctx)
if err != nil {
panic(err)
}
return nodes
} | [
0.12548841536045074,
0.7156585454940796,
0.2969680726528168,
0.435695618391037,
-0.6591155529022217,
0.7388075590133667,
-1.2784124612808228,
-0.45927831530570984,
0.6582589745521545,
0.2535508871078491,
0.7410842776298523,
0.4909226894378662,
0.39843350648880005,
-0.6112701296806335,
-0... |
func (tq *TeamQuery) IDs(ctx context.Context) ([]int, error) {
var ids []int
ctx = setContextOp(ctx, tq.ctx, "IDs")
if err := tq.Select(team.FieldID).Scan(ctx, &ids); err != nil {
return nil, err
}
return ids, nil
} | [
-0.7753587365150452,
0.46842408180236816,
0.3631122410297394,
-0.46743524074554443,
-0.09657196700572968,
-0.27650150656700134,
-0.2722530961036682,
-0.9300544857978821,
0.11042884737253189,
0.11031155288219452,
0.0011321150232106447,
0.2393575757741928,
-0.16982492804527283,
-1.0176979303... |
func (tq *TeamQuery) IDsX(ctx context.Context) []int {
ids, err := tq.IDs(ctx)
if err != nil {
panic(err)
}
return ids
} | [
-0.8050265908241272,
0.8583336472511292,
0.2678205668926239,
-0.24825313687324524,
-0.3187049329280853,
-0.020358256995677948,
-0.9874075651168823,
-0.42673513293266296,
0.49319425225257874,
0.5364916920661926,
-0.3299999237060547,
0.04718136414885521,
-0.024377044290304184,
-1.11193144321... |
func (tq *TeamQuery) Count(ctx context.Context) (int, error) {
ctx = setContextOp(ctx, tq.ctx, "Count")
if err := tq.prepareQuery(ctx); err != nil {
return 0, err
}
return withInterceptors[int](ctx, tq, querierCount[*TeamQuery](), tq.inters)
} | [
-0.3498618006706238,
0.2771303951740265,
0.49918317794799805,
-1.0680917501449585,
-0.07919494062662125,
-0.16513855755329132,
0.3186613619327545,
-0.7894013524055481,
-0.8543059229850769,
0.06175008788704872,
-0.15446770191192627,
0.1836758852005005,
0.021866340190172195,
0.17443372309207... |
func (tq *TeamQuery) CountX(ctx context.Context) int {
count, err := tq.Count(ctx)
if err != nil {
panic(err)
}
return count
} | [
0.10284718871116638,
0.6570382714271545,
0.5366783142089844,
-0.15271739661693573,
-0.40142372250556946,
1.0497318506240845,
-0.5406643748283386,
-0.4422813653945923,
-0.2578096389770508,
0.3456776738166809,
-0.0897771343588829,
0.0022861312609165907,
0.5848898887634277,
-0.235552519559860... |
func (tq *TeamQuery) Exist(ctx context.Context) (bool, error) {
ctx = setContextOp(ctx, tq.ctx, "Exist")
switch _, err := tq.FirstID(ctx); {
case IsNotFound(err):
return false, nil
case err != nil:
return false, fmt.Errorf("ent: check existence: %w", err)
default:
return true, nil
}
} | [
-0.6549566984176636,
-0.1651616245508194,
0.7931228280067444,
-0.316362202167511,
0.7992606163024902,
0.9337457418441772,
0.08068705350160599,
-0.7778329253196716,
-0.7491343021392822,
1.1659443378448486,
0.7803160548210144,
-0.6372118592262268,
-0.3744361400604248,
0.49057939648628235,
... |
func (tq *TeamQuery) ExistX(ctx context.Context) bool {
exist, err := tq.Exist(ctx)
if err != nil {
panic(err)
}
return exist
} | [
-0.35252800583839417,
0.6280874609947205,
0.8018631339073181,
-0.41099122166633606,
-0.09226581454277039,
1.466591477394104,
-0.8017562031745911,
-0.6072723865509033,
-0.3464363217353821,
1.3747942447662354,
0.14575381577014923,
-0.444171279668808,
-0.09936928004026413,
-0.2777925729751587... |
func (tq *TeamQuery) Clone() *TeamQuery {
if tq == nil {
return nil
}
return &TeamQuery{
config: tq.config,
ctx: tq.ctx.Clone(),
order: append([]OrderFunc{}, tq.order...),
inters: append([]Interceptor{}, tq.inters...),
predicates: append([]predicate.Team{}, tq.predicates...),
withTa... | [
0.6095290184020996,
-0.4047735631465912,
0.6421377658843994,
-0.1035386472940445,
-0.9818706512451172,
0.6031609177589417,
-0.03320612758398056,
-0.9878486394882202,
-0.3584822714328766,
0.43786752223968506,
0.2892128527164459,
0.3709256052970886,
-0.06331587582826614,
-0.5066245794296265,... |
func (tq *TeamQuery) WithTasks(opts ...func(*TaskQuery)) *TeamQuery {
query := (&TaskClient{config: tq.config}).Query()
for _, opt := range opts {
opt(query)
}
tq.withTasks = query
return tq
} | [
0.6069079041481018,
0.5140023231506348,
0.35360750555992126,
-0.6079888343811035,
-0.47962453961372375,
0.0404919870197773,
0.33578556776046753,
-1.1626100540161133,
-0.48264387249946594,
-0.1928199678659439,
0.47929197549819946,
0.02786758728325367,
0.39372342824935913,
-0.655294477939605... |
func (tq *TeamQuery) WithUsers(opts ...func(*UserQuery)) *TeamQuery {
query := (&UserClient{config: tq.config}).Query()
for _, opt := range opts {
opt(query)
}
tq.withUsers = query
return tq
} | [
-0.07852940261363983,
0.2481626570224762,
0.37577179074287415,
-0.6102314591407776,
-0.9841472506523132,
0.04271502420306206,
-0.16543583571910858,
-0.6004801988601685,
-0.44160014390945435,
-0.23674096167087555,
1.0766535997390747,
0.3979162573814392,
-0.060262326151132584,
-0.44285705685... |
func (tq *TeamQuery) Aggregate(fns ...AggregateFunc) *TeamSelect {
return tq.Select().Aggregate(fns...)
} | [
-0.46224266290664673,
0.6946563720703125,
0.34761887788772583,
-0.58625328540802,
0.5639937520027161,
-0.5788936018943787,
-0.2811102867126465,
-0.9885860085487366,
-0.8638520240783691,
-0.4286128580570221,
0.48151087760925293,
-0.050359562039375305,
0.12596645951271057,
-0.655683815479278... |
func (tgb *TeamGroupBy) Aggregate(fns ...AggregateFunc) *TeamGroupBy {
tgb.fns = append(tgb.fns, fns...)
return tgb
} | [
-0.893855094909668,
1.0838027000427246,
0.4347524642944336,
0.11523007601499557,
0.7569047808647156,
-0.2574511468410492,
0.1759902834892273,
-0.5062366127967834,
-1.2154827117919922,
-0.6250824332237244,
-0.6258307695388794,
0.03961272910237312,
-0.4335801899433136,
0.10832620412111282,
... |
func (tgb *TeamGroupBy) Scan(ctx context.Context, v any) error {
ctx = setContextOp(ctx, tgb.build.ctx, "GroupBy")
if err := tgb.build.prepareQuery(ctx); err != nil {
return err
}
return scanWithInterceptors[*TeamQuery, *TeamGroupBy](ctx, tgb.build, tgb, tgb.build.inters, v)
} | [
-0.9370353817939758,
0.15011687576770782,
0.37856876850128174,
0.23255296051502228,
-0.806915819644928,
-0.2259938269853592,
0.698980450630188,
-0.9144423007965088,
-0.7743710875511169,
-0.3526171147823334,
0.42015329003334045,
0.5061353445053101,
-0.6983425617218018,
-0.4015984535217285,
... |
func (ts *TeamSelect) Aggregate(fns ...AggregateFunc) *TeamSelect {
ts.fns = append(ts.fns, fns...)
return ts
} | [
-0.8266475200653076,
0.8638173937797546,
0.39088737964630127,
-0.6964872479438782,
1.2097958326339722,
-0.5341269969940186,
-0.5284768342971802,
-0.46239519119262695,
-0.2918546497821808,
-0.6950408816337585,
-0.5328081846237183,
0.5201756954193115,
0.30891597270965576,
-0.3701972961425781... |
func (ts *TeamSelect) Scan(ctx context.Context, v any) error {
ctx = setContextOp(ctx, ts.ctx, "Select")
if err := ts.prepareQuery(ctx); err != nil {
return err
}
return scanWithInterceptors[*TeamQuery, *TeamSelect](ctx, ts.TeamQuery, ts, ts.inters, v)
} | [
-0.8368099927902222,
0.047981057316064835,
0.3094697594642639,
-0.34561002254486084,
-0.5577961802482605,
-0.500526487827301,
-0.03717853128910065,
-0.9256261587142944,
0.4021196961402893,
-0.47548797726631165,
0.3284059166908264,
0.8189842700958252,
-0.22193649411201477,
-0.83444964885711... |
func (c *CircularQueue) Put(i interface{}) interface{} {
c.mtx.Lock()
defer c.mtx.Unlock()
var ret interface{}
// queue full, evict head item
if c.idxInc(c.tail) == c.head {
ret = c.buffer[c.head]
c.head = c.idxInc(c.head)
}
c.buffer[c.tail] = i
c.tail = c.idxInc(c.tail)
c.cond.Signal()
return ret
} | [
-0.09219283610582352,
0.10915078222751617,
0.589745044708252,
-1.2593883275985718,
-0.5146353840827942,
0.32253557443618774,
1.1915385723114014,
-0.8818454742431641,
0.33017075061798096,
0.2602517008781433,
-1.608503818511963,
-0.012206261046230793,
-1.6261128187179565,
-0.4806658625602722... |
func (c *CircularQueue) Get() interface{} {
c.mtx.Lock()
defer c.mtx.Unlock()
for c.head == c.tail {
c.cond.Wait()
}
ret := c.buffer[c.head]
c.head = c.idxInc(c.head)
return ret
} | [
-0.15427246689796448,
-0.5377086997032166,
0.6195506453514099,
-0.7760425209999084,
0.2819742262363434,
-0.19639970362186432,
0.03591802716255188,
-1.217104434967041,
-0.36386439204216003,
-0.606449544429779,
-0.7058180570602417,
1.1489733457565308,
-1.4557631015777588,
-0.2775651216506958... |
func parsePodPrefixes(clauses []string) (map[string][]string, error) {
podPrefixes := map[string][]string{}
for _, p := range clauses {
if strings.Contains(p, ":") {
ss := strings.Split(p, ":")
desc := ss[0]
ps := strings.Split(ss[1], "|")
podPrefixes[desc] = append(podPrefixes[desc], ps...)
} else if... | [
-1.1058355569839478,
-0.5717070698738098,
0.7055862545967102,
-0.13247492909431458,
-0.6243675351142883,
0.018485430628061295,
-1.0067375898361206,
-0.6234449744224548,
-0.21940505504608154,
0.9887722730636597,
0.041218943893909454,
0.04852798953652382,
-0.16075044870376587,
0.279087036848... |
func IsKeyword(s string) bool {
_, ok := keywords[s]
return ok
} | [
-0.24320654571056366,
-0.17323775589466095,
0.027297036722302437,
0.8513756990432739,
-0.6255143880844116,
-0.09176749736070633,
-0.5989606976509094,
0.09581948071718216,
1.1026180982589722,
0.7993391752243042,
-0.9506309032440186,
0.7278701663017273,
-0.20495197176933289,
0.07157352566719... |
func NewGenericLister(indexer cache.Indexer) GenericLister {
return &genericLister{indexer: indexer}
} | [
-1.011197566986084,
-0.8877993226051331,
0.028928536921739578,
0.26933950185775757,
-1.1621019840240479,
0.2330908328294754,
-1.5464506149291992,
-0.46199336647987366,
0.0559917688369751,
-0.02620009519159794,
-0.16430428624153137,
0.17873744666576385,
0.1100648045539856,
0.376636385917663... |
func (s *genericLister) List(selector labels.Selector) (ret []*v1alpha1.Generic, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.Generic))
})
return ret, err
} | [
-1.8972026109695435,
-0.47426775097846985,
0.04551449045538902,
0.08197701722383499,
0.6890422105789185,
-0.338735431432724,
-0.7876847982406616,
-0.6148947477340698,
-0.5293745994567871,
0.6724126935005188,
-0.20170491933822632,
0.7796059846878052,
0.16629211604595184,
0.6053068041801453,... |
func (s *genericLister) Generics(namespace string) GenericNamespaceLister {
return genericNamespaceLister{indexer: s.indexer, namespace: namespace}
} | [
-0.9458077549934387,
-0.4009283483028412,
0.15547898411750793,
-1.0185987949371338,
-0.8482185006141663,
-0.1279166042804718,
-1.8799331188201904,
-1.085270881652832,
0.9760255813598633,
-0.6852076649665833,
-0.14103169739246368,
1.013366460800171,
0.09517037123441696,
0.3164270520210266,
... |
func (s genericNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.Generic, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.Generic))
})
return ret, err
} | [
-1.3514779806137085,
-0.4954517185688019,
0.002273326041176915,
-0.18935398757457733,
0.37752464413642883,
-0.09964650124311447,
-0.9864454865455627,
-1.0819158554077148,
-0.04415076598525047,
0.6882731318473816,
-0.30644169449806213,
0.7249525189399719,
0.06621357053518295,
1.236131548881... |
func (s genericNamespaceLister) Get(name string) (*v1alpha1.Generic, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1alpha1.Resource("generic"), name)
}
return obj.(*v1alpha1.Generic), nil
} | [
-1.3048027753829956,
-0.26503247022628784,
0.4199466109275818,
-0.7323729395866394,
-0.17931073904037476,
0.16795572638511658,
-1.0591247081756592,
-1.1244044303894043,
-0.15379472076892853,
0.6684852242469788,
-0.09733698517084122,
0.7190542817115784,
-0.22886395454406738,
0.1007368639111... |
func GetChar() {
Look, _, _ = inputReader.ReadRune()
} | [
0.43185895681381226,
-0.46548181772232056,
0.3596342206001282,
1.1707944869995117,
0.3432854413986206,
0.48052406311035156,
1.7707617282867432,
0.07252486795186996,
-0.8129395246505737,
-1.69902503490448,
1.074222207069397,
0.8045048117637634,
-0.021134724840521812,
0.46744129061698914,
... |
func Expected(s string) {
Abort(s + " Expected")
} | [
1.0900837182998657,
-0.19206421077251434,
0.4263296127319336,
0.26000839471817017,
-0.4532938599586487,
0.6317247748374939,
-0.08116718381643295,
0.16429749131202698,
0.8579015731811523,
-0.21602502465248108,
0.39539971947669983,
1.1193326711654663,
0.9220907688140869,
-0.5472375154495239,... |
func Match(x rune) {
if Look != x {
Expected(fmt.Sprintf("%q", x))
} else {
GetChar()
SkipWhite()
}
} | [
0.1982680708169937,
1.1641111373901367,
0.3691307306289673,
-0.43809863924980164,
-0.6323172450065613,
0.6602630019187927,
-0.3969358503818512,
-0.35452768206596375,
0.671626627445221,
0.03895227238535881,
0.03238864988088608,
0.7484655976295471,
0.5054568648338318,
0.48704788088798523,
... |
func IsAlpha(r rune) bool {
return unicode.IsLetter(r)
} | [
-0.7122148275375366,
-0.30997246503829956,
0.27617669105529785,
-0.033237941563129425,
-0.8480373024940491,
0.005223836284130812,
-0.4887089133262634,
-0.1209757998585701,
0.87933349609375,
0.4799821972846985,
-0.40432626008987427,
0.6553804278373718,
-0.3954845368862152,
0.309328049421310... |
func IsDigit(r rune) bool {
return unicode.IsDigit(r)
} | [
-0.15788745880126953,
-0.5009218454360962,
0.31323590874671936,
0.7929462194442749,
-0.1816025972366333,
0.5383027791976929,
-0.19817933440208435,
-0.23200027644634247,
0.33690181374549866,
-0.09537740796804428,
-0.48820140957832336,
-0.7791495323181152,
-0.4327605068683624,
0.766086399555... |
func SkipWhite() {
for IsWhite(Look) {
GetChar()
}
} | [
-0.8274080753326416,
0.29236316680908203,
0.4277285635471344,
0.13431786000728607,
0.6420349478721619,
0.27768367528915405,
1.004904866218567,
-0.9490281343460083,
-0.7540779113769531,
0.22945231199264526,
0.19912074506282806,
0.7138122320175171,
-0.4540516436100006,
0.38575294613838196,
... |
func Emit(s string) {
fmt.Print("\t", s)
} | [
0.16761064529418945,
-0.23224866390228271,
0.39005038142204285,
-1.3769716024398804,
-0.10598067939281464,
0.20864617824554443,
-0.9375098943710327,
-0.06821008771657944,
-0.8458873629570007,
0.3469742238521576,
-0.24337777495384216,
0.7666192650794983,
0.42456334829330444,
-0.379330039024... |
func EmitLn(s string) {
Emit(s)
fmt.Println()
} | [
-0.004466119222342968,
-0.720773458480835,
0.28061407804489136,
-0.26353728771209717,
-0.30485713481903076,
-0.23338688910007477,
-0.6361843943595886,
0.4184029698371887,
0.574616551399231,
-0.056056536734104156,
-1.5309571027755737,
0.8337770700454712,
0.6021100282669067,
0.03218902647495... |
func Ident() {
Name := GetName()
if Look == '(' {
Match('(')
Match(')')
EmitLn("BSR " + Name)
} else {
EmitLn("MOVE " + Name + "(PC),D0")
}
} | [
-0.04395419731736183,
-0.3694399893283844,
0.5090751051902771,
-0.3574405014514923,
0.02294812723994255,
-0.5245379209518433,
-0.06859897822141647,
-0.5750260353088379,
0.45648622512817383,
0.8152940273284912,
-0.8878917098045349,
0.517469584941864,
0.024394124746322632,
-0.047515995800495... |
func Factor() {
if Look == '(' {
Match('(')
Expression()
Match(')')
} else if IsAlpha(Look) {
Ident()
} else {
EmitLn("MOVE #" + GetNum() + ",D0")
}
} | [
-0.6826456785202026,
-0.03233511000871658,
0.5892842411994934,
-0.2031707763671875,
-0.1262056678533554,
-0.6376977562904358,
0.11894987523555756,
0.333793580532074,
0.7348933815956116,
0.42851918935775757,
-0.07997286319732666,
0.9321151375770569,
-0.16344881057739258,
0.8802403807640076,... |
func Multiply() {
Match('*')
Factor()
EmitLn("MULS (SP)+,D0")
} | [
-0.3847106099128723,
0.6692789793014526,
0.3979678153991699,
1.0026195049285889,
-0.22176221013069153,
-0.8644081354141235,
-0.7183220982551575,
0.7643373012542725,
1.291326880455017,
-0.6649739742279053,
-0.6954800486564636,
0.07931039482355118,
0.388771653175354,
0.6683539152145386,
0.... |
func Divide() {
Match('/')
Factor()
EmitLn("MOVE (SP)+,D1")
EmitLn("DIVS D1,D0")
} | [
-0.7421507239341736,
0.3494640290737152,
0.37864571809768677,
1.0160328149795532,
-0.05797109380364418,
-0.35246267914772034,
0.46129658818244934,
0.576860249042511,
0.026668433099985123,
-0.23522937297821045,
-0.2659359872341156,
-0.10970514267683029,
0.3799211382865906,
0.366621166467666... |
func Term() {
Factor()
for (Look == '*') || (Look == '/') {
EmitLn("MOVE D0,-(SP)")
switch Look {
case '*':
Multiply()
case '/':
Divide()
}
}
} | [
-0.2747332453727722,
0.30318483710289,
0.48039427399635315,
0.8833582997322083,
-0.5598253011703491,
-0.161768838763237,
-0.12627197802066803,
0.24363064765930176,
0.2832043170928955,
0.08389288932085037,
-0.2166372686624527,
0.04895249381661415,
0.2245500087738037,
0.14945781230926514,
... |
func Add() {
Match('+')
Term()
EmitLn("ADD (SP)+,D0")
} | [
0.271572083234787,
0.2695528268814087,
0.33668917417526245,
0.4437296986579895,
-0.5408864617347717,
0.059071458876132965,
-0.6091769933700562,
1.0576469898223877,
1.239642858505249,
-0.4161573052406311,
-0.4485001564025879,
0.834183931350708,
0.28320834040641785,
0.5490427017211914,
0.3... |
func Subtract() {
Match('-')
Term()
EmitLn("SUB (SP)+,D0")
EmitLn("NEG D0")
} | [
0.4210452437400818,
0.6034194827079773,
0.3025868535041809,
-0.04691752791404724,
-0.1376437395811081,
0.13476140797138214,
-0.372272253036499,
1.0704874992370605,
0.15032219886779785,
-0.3979855179786682,
-0.6519849896430969,
0.21222266554832458,
0.24402722716331482,
0.22211551666259766,
... |
func Expression() {
if IsAddop(Look) {
EmitLn("CLR D0")
} else {
Term()
}
for (Look == '+') || (Look == '-') {
EmitLn("MOVE D0,-(SP)")
switch Look {
case '+':
Add()
case '-':
Subtract()
}
}
} | [
-0.18252304196357727,
0.5613528490066528,
0.5499526858329773,
0.7546419501304626,
-0.8470562100410461,
-0.3546748459339142,
0.007664106786251068,
-0.05654534325003624,
1.2252711057662964,
0.7738636136054993,
-0.11612586677074432,
0.2638661861419678,
0.6813752055168152,
0.8517402410507202,
... |
func Assignment() {
Name := GetName()
Match('=')
Expression()
EmitLn("LEA " + Name + "(PC),A0")
EmitLn("MOVE D0,(A0)")
} | [
-0.7814357280731201,
-0.7839452028274536,
0.26566410064697266,
-0.25693750381469727,
-0.2742804288864136,
-0.3217819631099701,
0.5579763054847717,
0.8224575519561768,
0.3315250277519226,
1.3422825336456299,
-0.4629536271095276,
0.22261807322502136,
0.4670753479003906,
0.5269081592559814,
... |
func Insert(db *sql.DB, table string, attributes interface{}) (result sql.Result, err error, query string, args []interface{}) {
if db == nil {
err = errors.New("db can't be nil")
return
}
if table == "" {
err = errors.New("table can't be empty")
return
}
if attributes == nil {
err = errors.New("attrib... | [
-0.6647652983665466,
1.0640257596969604,
0.4298153817653656,
0.036432307213544846,
-0.19210219383239746,
-0.21534207463264465,
-0.1026073470711708,
0.4059402644634247,
-1.0646958351135254,
0.013431969098746777,
-0.38966813683509827,
-0.5919533967971802,
-0.5240773558616638,
0.3647008240222... |
func NewHttpClient(urls ...string) *HttpProcessorConfig {
return &HttpProcessorConfig{
urls: urls,
mode: Everyone,
connectionTimeout: 20 * time.Second,
success: http.StatusOK,
method: http.MethodPost,
}
} | [
-0.4608360826969147,
-0.04468075931072235,
0.270985871553421,
-0.11882457882165909,
-0.9670677185058594,
-0.033894121646881104,
-0.32378271222114563,
1.0498645305633545,
-1.195919394493103,
0.6977519392967224,
-1.109114646911621,
0.06467879563570023,
-0.2970542311668396,
0.5534933805465698... |
func (htpc *HttpProcessorConfig) Url(url ...string) *HttpProcessorConfig {
htpc.urls = append(htpc.urls, url...)
return htpc
} | [
-0.5835408568382263,
0.7034412026405334,
0.3690541386604309,
-0.17914940416812897,
-0.035836007446050644,
0.4240199029445648,
-0.18216127157211304,
1.5956259965896606,
-0.3915317952632904,
0.003216453129425645,
-0.5196570158004761,
0.4992794990539551,
-0.47649505734443665,
0.73753160238265... |
func (htpc *HttpProcessorConfig) Timeout(connectionTimeout time.Duration) *HttpProcessorConfig {
htpc.connectionTimeout = connectionTimeout
return htpc
} | [
-0.16828782856464386,
-0.1260819286108017,
0.3938864767551422,
-0.4867028594017029,
-0.18743886053562164,
0.528522789478302,
-0.11746465414762497,
1.5329389572143555,
-0.7399377226829529,
0.8281272649765015,
0.3716873824596405,
0.40636828541755676,
-0.17415492236614227,
0.5472353100776672,... |
func (htpc *HttpProcessorConfig) Method(httpMethod string) *HttpProcessorConfig {
htpc.method = httpMethod
return htpc
} | [
-0.6226136088371277,
0.638473391532898,
0.3013276755809784,
-1.1318937540054321,
-0.6887159943580627,
-0.18725576996803284,
0.36561721563339233,
0.1041107177734375,
-0.7238382697105408,
0.5565668940544128,
0.48882073163986206,
0.510689914226532,
0.10579326748847961,
1.3073369264602661,
0... |
func (htpc *HttpProcessorConfig) Success(httpCode int) *HttpProcessorConfig {
htpc.success = httpCode
return htpc
} | [
-0.4457499384880066,
0.5689736604690552,
0.2824070453643799,
-0.004012204706668854,
-0.7859193682670593,
0.5808404684066772,
0.2346789538860321,
0.8056588172912598,
-0.3837021589279175,
0.7579845786094666,
-0.44172966480255127,
0.2222089022397995,
0.0922531932592392,
0.688366711139679,
0... |
func (htpc *HttpProcessorConfig) Mode(deliveryMode HttpClientMode) *HttpProcessorConfig {
htpc.mode = deliveryMode
return htpc
} | [
-0.8701348900794983,
0.201254203915596,
0.41276681423187256,
-1.1604959964752197,
-0.5704058408737183,
1.3815149068832397,
-0.36468520760536194,
0.9135841131210327,
-0.4282737076282501,
0.4113454520702362,
-0.0697009414434433,
-0.13400711119174957,
-0.3044157028198242,
0.48496782779693604,... |
func (htpc *HttpProcessorConfig) Client(httpClient *http.Client) *HttpProcessorConfig {
htpc.customClient = httpClient
return htpc
} | [
0.14870263636112213,
0.16546699404716492,
0.02591847814619541,
-1.103764295578003,
-1.1172616481781006,
0.07340798527002335,
0.6645761132240295,
0.6807880401611328,
-0.31253671646118164,
0.066122867166996,
-0.5484604835510254,
0.8314875364303589,
0.09818655997514725,
0.3550780713558197,
... |
func (htpc *HttpProcessorConfig) Build() stream.StreamHandler {
client := htpc.customClient
if client == nil {
transport := &http.Transport{
Dial: func(network, addr string) (net.Conn, error) {
return net.DialTimeout(network, addr, htpc.connectionTimeout)
},
}
client = &http.Client{
Transport: tran... | [
-0.10417412966489792,
-0.6834851503372192,
0.45241841673851013,
-0.7676903605461121,
-0.503486156463623,
-0.0373774990439415,
0.025368882343173027,
0.19831641018390656,
-0.6224053502082825,
-0.11509682238101959,
0.28098830580711365,
0.48312994837760925,
-1.1788811683654785,
0.2487859576940... |
func New(waitTime int64, maxRetries int64, exponent *int64) *MethodCallRetrier {
if exponent == nil {
defaultInt := int64(1)
exponent = &defaultInt
}
if maxRetries <= 0 {
maxRetries = 0
}
return &MethodCallRetrier{waitTime: waitTime, maxRetries: maxRetries, exponent: *exponent}
} | [
-0.020258314907550812,
0.26084059476852417,
0.3362129330635071,
-0.2996833026409149,
-1.1037721633911133,
-0.3286084532737732,
-1.004906415939331,
0.25967419147491455,
0.16546040773391724,
-0.5381529331207275,
0.1008809432387352,
-0.06144630163908005,
-0.253635972738266,
0.5395489931106567... |
func (r *MethodCallRetrier) ExecuteWithRetry(
object interface{}, methodName string, args ...interface{},
) ([]reflect.Value, []error) {
defer func() {
r.resetCurrentRetries()
r.resetErrorList()
}()
if r.currentRetries >= r.maxRetries {
r.errorList = append(
r.errorList, &MaxRetriesError{methodName: metho... | [
-0.5676183700561523,
0.07247613370418549,
0.8962905406951904,
0.761545717716217,
0.07890232652425766,
-0.7701109647750854,
-0.713108479976654,
-1.0534933805465698,
0.37605297565460205,
0.7980974912643433,
-0.18454331159591675,
-0.2273176908493042,
-0.36285486817359924,
0.4067167639732361,
... |
func (r *MethodCallRetrier) callMethodOnObject(object interface{}, methodName string, args []interface{}) []reflect.Value {
var method reflect.Value
if r.objectIsAPointer(object) {
method = reflect.ValueOf(object).MethodByName(methodName)
} else {
method = reflect.New(reflect.TypeOf(object)).MethodByName(method... | [
-0.9830414056777954,
-0.6198120713233948,
0.8217567205429077,
0.29223403334617615,
-0.3445957601070404,
0.08941560983657837,
-0.5146176815032959,
-1.299843668937683,
-0.03585737943649292,
0.5944344401359558,
-0.5561396479606628,
0.48209452629089355,
-0.43439537286758423,
0.85120689868927,
... |
func (r *MethodCallRetrier) objectIsAPointer(object interface{}) bool {
return reflect.ValueOf(object).Kind() == reflect.Ptr
} | [
-1.1215747594833374,
-1.1104624271392822,
0.6066783666610718,
-0.08186335116624832,
-0.2341456562280655,
0.3912091851234436,
0.4116736650466919,
-1.6835319995880127,
1.935490608215332,
1.1218516826629639,
0.11537376791238785,
0.6337574124336243,
-0.959324300289154,
0.42222878336906433,
-... |
func (r *MethodCallRetrier) sleepAndIncrementRetries() {
time.Sleep(time.Duration(r.waitTime) * time.Second)
r.waitTime *= r.exponent
r.currentRetries++
} | [
0.4431130588054657,
-0.17308054864406586,
0.4006846249103546,
0.0011886964784935117,
-0.6652603149414062,
0.21980856359004974,
0.12529020011425018,
-0.1610364019870758,
0.4608824551105499,
-0.7586807608604431,
0.1628398597240448,
-0.1401868611574173,
-0.15135584771633148,
-0.05794946476817... |
func (r *MethodCallRetrier) resetCurrentRetries() {
r.currentRetries = 0
} | [
0.14092163741588593,
-0.6951965689659119,
-0.1433757096529007,
-0.22207488119602203,
0.3781084716320038,
0.2770037353038788,
-0.00980287417769432,
0.6214414834976196,
-0.5081802606582642,
0.27345025539398193,
0.7323658466339111,
0.7147461175918579,
-0.486309289932251,
0.49024394154548645,
... |
func (r *MethodCallRetrier) resetErrorList() {
r.errorList = nil
} | [
-0.27247893810272217,
0.1445942372083664,
-0.05450029671192169,
0.17058919370174408,
0.37213456630706787,
-0.483138769865036,
-0.0334182046353817,
0.3824201822280884,
0.6050024032592773,
0.3422711491584778,
-1.4084417819976807,
0.6103334426879883,
0.10284898430109024,
0.5716173648834229,
... |
func NoopQuerier() Querier {
return noopQuerier{}
} | [
-1.6999787092208862,
-1.3636149168014526,
0.239009827375412,
-0.8287346959114075,
-0.7920963168144226,
0.11811649054288864,
-0.4440498352050781,
-0.3309282660484314,
0.1290339082479477,
-1.631445288658142,
-0.31216442584991455,
-0.010208393447101116,
-0.36818087100982666,
1.081911206245422... |
func NoopChunkedQuerier() ChunkQuerier {
return noopChunkQuerier{}
} | [
-0.6628260612487793,
-1.3913623094558716,
0.33532336354255676,
-0.8019624948501587,
-0.17983226478099823,
0.3896021544933319,
-0.20591308176517487,
-0.16461695730686188,
-0.23040220141410828,
-1.1032356023788452,
-0.2503729462623596,
0.7424009442329407,
-0.22472871840000153,
0.069909036159... |
func NoopSeriesSet() SeriesSet {
return noopSeriesSet{}
} | [
-0.870466411113739,
0.03815431147813797,
0.37170836329460144,
-0.36412742733955383,
-1.2189635038375854,
-0.11647593230009079,
0.7083534598350525,
-0.8502528667449951,
0.5649254322052002,
-1.256344199180603,
-0.18652626872062683,
1.1226319074630737,
-0.3919912278652191,
-0.9112765789031982... |
func NoopChunkedSeriesSet() ChunkSeriesSet {
return noopChunkedSeriesSet{}
} | [
-0.35417884588241577,
-0.4101364314556122,
0.5753483176231384,
-0.5286256670951843,
-0.3318963050842285,
0.006162603385746479,
0.3477419912815094,
-0.4373484253883362,
0.14392177760601044,
-0.6986486911773682,
0.11358568072319031,
1.4205635786056519,
-0.460550457239151,
-0.7449067831039429... |
func (p paramHeader) String() string {
return fmt.Sprintf("%s (%d): %s", p.typ, p.len, p.raw)
} | [
-0.2515878677368164,
-1.308389663696289,
0.39486247301101685,
-0.6836532950401306,
-0.2885412871837616,
0.8569282293319702,
0.07148981094360352,
-0.6541138291358948,
-0.593890368938446,
0.3859923183917999,
-0.25805795192718506,
0.9211912751197815,
-0.494697630405426,
-0.4781250059604645,
... |
func NewDNSProvider() (*DNSProvider, error) {
customerName := os.Getenv("DYN_CUSTOMER_NAME")
userName := os.Getenv("DYN_USER_NAME")
password := os.Getenv("DYN_PASSWORD")
return NewDNSProviderCredentials(customerName, userName, password)
} | [
-0.4764133095741272,
0.5364062786102295,
0.17170338332653046,
1.2414082288742065,
-0.7994527220726013,
-0.2624484598636627,
-0.7705454230308533,
-0.3997825086116791,
-0.1293162852525711,
0.33087730407714844,
-0.8585312366485596,
0.23188264667987823,
-0.39247915148735046,
0.6258881688117981... |
func NewDNSProviderCredentials(customerName, userName, password string) (*DNSProvider, error) {
if customerName == "" || userName == "" || password == "" {
return nil, fmt.Errorf("DynDNS credentials missing")
}
return &DNSProvider{
customerName: customerName,
userName: userName,
password: password,
... | [
-0.6482272744178772,
0.5292978286743164,
-0.06460099667310715,
0.8842096924781799,
-0.8028859496116638,
-0.26955944299697876,
-0.7097445726394653,
0.2392418533563614,
-0.20960938930511475,
0.3711555004119873,
-0.6233186721801758,
-0.005749821662902832,
-1.0869696140289307,
0.27221935987472... |
func (d *DNSProvider) login() error {
type creds struct {
Customer string `json:"customer_name"`
User string `json:"user_name"`
Pass string `json:"password"`
}
type session struct {
Token string `json:"token"`
Version string `json:"version"`
}
payload := &creds{Customer: d.customerName, User:... | [
-0.7490379810333252,
0.3608191907405853,
0.5494412779808044,
0.14836043119430542,
-0.18795616924762726,
-0.3237517476081848,
-0.8198434710502625,
-0.18379950523376465,
0.08184517920017242,
0.1257118433713913,
-1.2001588344573975,
1.3945461511611938,
-0.16030505299568176,
-0.709417343139648... |
func (d *DNSProvider) Present(domain, token, keyAuth string) error {
fqdn, value, ttl := acme.DNS01Record(domain, keyAuth)
authZone, err := acme.FindZoneByFqdn(fqdn, acme.RecursiveNameservers)
if err != nil {
return err
}
err = d.login()
if err != nil {
return err
}
data := map[string]interface{}{
"rda... | [
0.28719404339790344,
0.6314684152603149,
0.39668965339660645,
-0.8528966307640076,
-0.013369593769311905,
0.86590975522995,
-0.45126232504844666,
0.5190013647079468,
-0.23574747145175934,
0.9939705729484558,
-0.11787903308868408,
0.32594358921051025,
-0.733163058757782,
-0.1032829284667968... |
func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
fqdn, _, _ := acme.DNS01Record(domain, keyAuth)
authZone, err := acme.FindZoneByFqdn(fqdn, acme.RecursiveNameservers)
if err != nil {
return err
}
err = d.login()
if err != nil {
return err
}
resource := fmt.Sprintf("TXTRecord/%s/%s/", ... | [
0.03415476158261299,
0.26973357796669006,
0.6063165068626404,
-0.3348495364189148,
-0.4089753329753876,
-0.42452386021614075,
0.3452427089214325,
0.30646926164627075,
0.18586014211177826,
0.41009753942489624,
-0.27585986256599426,
0.5309820771217346,
-0.920056939125061,
-0.0418442599475383... |
func (in *DirectorBind) DeepCopyInto(out *DirectorBind) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
out.Spec = in.Spec
out.Status = in.Status
return
} | [
0.1908625364303589,
-0.7922683954238892,
0.47016122937202454,
0.5711842179298401,
-1.4021893739700317,
0.6915076375007629,
0.2625581622123718,
0.9297469854354858,
-0.5611687898635864,
-0.4762299358844757,
-0.6759929656982422,
1.7817652225494385,
0.2293555587530136,
0.20406003296375275,
0... |
func (in *DirectorBind) DeepCopy() *DirectorBind {
if in == nil {
return nil
}
out := new(DirectorBind)
in.DeepCopyInto(out)
return out
} | [
-0.45936161279678345,
-0.24330037832260132,
0.18323726952075958,
1.4739841222763062,
-1.400687336921692,
0.911520779132843,
0.3338879942893982,
0.37499386072158813,
0.874011754989624,
-0.408755898475647,
-0.5044848918914795,
1.0417566299438477,
-0.8170781135559082,
0.249420627951622,
1.1... |
func (in *DirectorBind) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
} else {
return nil
}
} | [
-0.17643488943576813,
-0.5674532651901245,
0.726280689239502,
0.8771911859512329,
-1.3012889623641968,
0.6248711347579956,
1.1691784858703613,
0.31015676259994507,
0.2686406373977661,
-0.8025015592575073,
-0.4938470423221588,
0.5663747787475586,
-0.0968247503042221,
0.2698608338832855,
0... |
func (in *DirectorBindList) DeepCopyInto(out *DirectorBindList) {
*out = *in
out.TypeMeta = in.TypeMeta
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]DirectorBind, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
} | [
-0.5257869958877563,
-0.12871341407299042,
0.5612466335296631,
0.790688693523407,
-0.9592540264129639,
0.5448768734931946,
0.409528523683548,
0.9535931348800659,
-0.34765294194221497,
-0.08675505965948105,
-0.9985781908035278,
1.0379574298858643,
-0.39893606305122375,
0.3488229215145111,
... |
func (in *DirectorBindList) DeepCopy() *DirectorBindList {
if in == nil {
return nil
}
out := new(DirectorBindList)
in.DeepCopyInto(out)
return out
} | [
-0.9904603958129883,
0.20626972615718842,
0.27303412556648254,
1.7340835332870483,
-0.6642749309539795,
1.1109830141067505,
0.5534537434577942,
0.5635384321212769,
0.601530134677887,
0.11769773066043854,
-1.4924914836883545,
0.21986877918243408,
-0.153661847114563,
0.13414472341537476,
-... |
func (in *DirectorBindList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
} else {
return nil
}
} | [
-0.5862419605255127,
-0.3754713237285614,
0.7255773544311523,
0.9497352242469788,
-0.9918479919433594,
0.6987584233283997,
1.132327914237976,
0.43569907546043396,
0.26027941703796387,
-0.6045007705688477,
-0.9807872772216797,
0.29005366563796997,
-0.15690748393535614,
0.4666873514652252,
... |
func (in *DirectorBindSpec) DeepCopyInto(out *DirectorBindSpec) {
*out = *in
return
} | [
0.6452569961547852,
-0.06782648712396622,
0.3984980881214142,
0.44295528531074524,
-1.171076774597168,
0.9792929291725159,
0.7500622272491455,
0.905383825302124,
-0.5623573660850525,
-0.252475768327713,
-0.6336868405342102,
1.541972041130066,
0.4911632239818573,
-0.07954642176628113,
0.1... |
func (in *DirectorBindSpec) DeepCopy() *DirectorBindSpec {
if in == nil {
return nil
}
out := new(DirectorBindSpec)
in.DeepCopyInto(out)
return out
} | [
0.051860272884368896,
0.14190815389156342,
0.28911617398262024,
0.8427749872207642,
-0.8693073987960815,
0.8519672751426697,
0.9226036667823792,
0.3799801766872406,
0.14272232353687286,
0.21498647332191467,
-0.3496069610118866,
0.6883947253227234,
0.4408379793167114,
-0.16783407330513,
0... |
func (in *DirectorBindStatus) DeepCopyInto(out *DirectorBindStatus) {
*out = *in
return
} | [
0.7651914954185486,
-0.26453670859336853,
0.22022604942321777,
0.5372803807258606,
-1.2558506727218628,
1.0730218887329102,
0.22672024369239807,
1.0275169610977173,
-0.17451226711273193,
-0.6980893611907959,
-1.020847201347351,
1.569735050201416,
0.3643574118614197,
0.335450142621994,
0.... |
func (in *DirectorBindStatus) DeepCopy() *DirectorBindStatus {
if in == nil {
return nil
}
out := new(DirectorBindStatus)
in.DeepCopyInto(out)
return out
} | [
-0.1560390293598175,
-0.09299000352621078,
0.08209854364395142,
0.8032205700874329,
-0.6485180854797363,
0.9629282355308533,
0.2765301465988159,
0.4231571853160858,
0.703613817691803,
-0.45054900646209717,
-1.1305888891220093,
0.9275804162025452,
0.18083497881889343,
0.747805655002594,
0... |
func (in *DockerBind) DeepCopyInto(out *DockerBind) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
out.Spec = in.Spec
out.Status = in.Status
return
} | [
0.20104819536209106,
-0.743289589881897,
0.6341419816017151,
0.5825900435447693,
-1.0973432064056396,
0.7256230115890503,
0.5289565920829773,
0.7300532460212708,
-0.812082052230835,
-0.5829775333404541,
-0.8046151995658875,
1.7337610721588135,
0.5383466482162476,
0.1829686313867569,
0.32... |
func (in *DockerBind) DeepCopy() *DockerBind {
if in == nil {
return nil
}
out := new(DockerBind)
in.DeepCopyInto(out)
return out
} | [
-0.49510928988456726,
-0.12403517216444016,
0.31247326731681824,
1.6883574724197388,
-1.148640751838684,
0.4580247104167938,
0.45193445682525635,
0.008070276118814945,
0.3138130009174347,
-0.8704466223716736,
-0.5926141738891602,
0.7866342663764954,
-0.48099809885025024,
0.5677891373634338... |
func (in *DockerBind) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
} else {
return nil
}
} | [
-0.049367282539606094,
-0.4514588713645935,
0.8898823857307434,
0.8447525501251221,
-1.1923104524612427,
0.6023845672607422,
1.4351478815078735,
0.016997966915369034,
0.0064105866476893425,
-0.9682538509368896,
-0.48670318722724915,
0.4141004979610443,
0.15120384097099304,
0.29208910465240... |
func (in *DockerBindList) DeepCopyInto(out *DockerBindList) {
*out = *in
out.TypeMeta = in.TypeMeta
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]DockerBind, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
} | [
-0.6226282119750977,
-0.03400665149092674,
0.6630070805549622,
0.8112736344337463,
-0.7099442481994629,
0.5383506417274475,
0.5190353989601135,
0.7654662728309631,
-0.540955126285553,
-0.1572478860616684,
-1.0638442039489746,
0.8489199280738831,
-0.0833912119269371,
0.36316579580307007,
... |
func (in *DockerBindList) DeepCopy() *DockerBindList {
if in == nil {
return nil
}
out := new(DockerBindList)
in.DeepCopyInto(out)
return out
} | [
-1.1583278179168701,
-0.04903668537735939,
0.3016597330570221,
1.7794597148895264,
-0.8637187480926514,
0.7181772589683533,
0.6853792071342468,
0.2293803095817566,
0.4747292399406433,
-0.08823475241661072,
-1.1866599321365356,
0.08911464363336563,
0.12551404535770416,
0.2288183569908142,
... |
func (in *DockerBindList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
} else {
return nil
}
} | [
-0.599190354347229,
-0.28990107774734497,
0.8476429581642151,
0.9202128648757935,
-0.9109727740287781,
0.6146665811538696,
1.2834776639938354,
0.198431596159935,
0.07484887540340424,
-0.7988147139549255,
-0.9155123233795166,
0.16429267823696136,
0.08301861584186554,
0.47589483857154846,
... |
func (in *DockerBindSpec) DeepCopyInto(out *DockerBindSpec) {
*out = *in
return
} | [
0.6410322785377502,
0.001599921495653689,
0.5392499566078186,
0.617343008518219,
-1.0196068286895752,
1.0847387313842773,
0.9216258525848389,
0.4822530448436737,
-0.7390654683113098,
-0.28094521164894104,
-0.5362119674682617,
1.4128127098083496,
0.6545202136039734,
0.0876491591334343,
0.... |
func (in *DockerBindSpec) DeepCopy() *DockerBindSpec {
if in == nil {
return nil
}
out := new(DockerBindSpec)
in.DeepCopyInto(out)
return out
} | [
-0.06477724760770798,
0.07090897858142853,
0.24245041608810425,
1.1649243831634521,
-0.9897666573524475,
0.7730042934417725,
0.9228552579879761,
-0.06005202233791351,
-0.028006747364997864,
0.08162376284599304,
-0.16158007085323334,
0.3758220672607422,
0.5935556292533875,
-0.01280396804213... |
func (in *DockerBindStatus) DeepCopyInto(out *DockerBindStatus) {
*out = *in
return
} | [
0.8246402144432068,
-0.1646137833595276,
0.35789385437965393,
0.7516178488731384,
-1.0213263034820557,
1.243717908859253,
0.49150899052619934,
0.5535580515861511,
-0.4699423611164093,
-0.8028034567832947,
-1.0887463092803955,
1.4260269403457642,
0.5933089256286621,
0.4331405758857727,
0.... |
func (in *DockerBindStatus) DeepCopy() *DockerBindStatus {
if in == nil {
return nil
}
out := new(DockerBindStatus)
in.DeepCopyInto(out)
return out
} | [
-0.15248344838619232,
-0.0638950914144516,
0.08764154464006424,
1.1725125312805176,
-0.6409626603126526,
1.0974340438842773,
0.5281433463096619,
-0.0577055960893631,
0.4474005401134491,
-0.6478375792503357,
-1.0046316385269165,
0.5041059255599976,
0.3350857198238373,
0.8230524659156799,
... |
func NewCopyCat(config *Config) (CopyCat, error) {
return newCopyCat(config)
} | [
-0.255209743976593,
-0.4899233281612396,
0.25155627727508545,
0.8188906908035278,
-2.172969102859497,
-0.5242652893066406,
-0.02582111395895481,
-0.48433783650398254,
0.05705726519227028,
-0.024544335901737213,
-0.3731214702129364,
0.08587552607059479,
1.0359772443771362,
0.892604529857635... |
func (b *Bundle) Add(f func(context.Context) error) {
b.waitGroup.Add(1)
// Run the function in the background.
go func() {
defer b.waitGroup.Done()
err := f(b.context)
if err == nil {
return
}
// On first error, cancel the context and save the error.
b.errorOnce.Do(func() {
b.firstError = err
... | [
-0.1685362607240677,
0.36997154355049133,
0.7117653489112854,
0.42221981287002563,
0.16254191100597382,
0.08058562129735947,
0.2953528165817261,
0.2621649503707886,
-0.4466382563114166,
0.24689583480358124,
0.36108464002609253,
-0.044496387243270874,
-0.16190464794635773,
0.435952365398407... |
func (b *Bundle) Join() error {
b.waitGroup.Wait()
// context.WithCancel requires that we arrange for this to be called
// eventually in order to avoid leaking resources. Since everything is done,
// to do so now is harmless.
b.cancel()
return b.firstError
} | [
0.987716019153595,
0.23468950390815735,
0.46495321393013,
0.4608553946018219,
-0.2963505983352661,
0.527095377445221,
-0.29760804772377014,
0.2789391875267029,
-0.6613828539848328,
0.13629265129566193,
0.48363548517227173,
-0.9501186013221741,
-1.045022964477539,
0.2203686237335205,
0.18... |
func NewBundle(parent context.Context) *Bundle {
b := &Bundle{}
b.context, b.cancel = context.WithCancel(parent)
return b
} | [
1.0003585815429688,
0.20603978633880615,
0.5290092825889587,
1.069316029548645,
-0.9882224202156067,
-0.04523762688040733,
0.01649799756705761,
-0.08155690878629684,
0.1657147854566574,
-0.748670756816864,
0.4076176583766937,
0.119115449488163,
-0.6046770215034485,
0.14321768283843994,
-... |
func getTransactionCollection() db.Collection {
// Get a session
session = GetSession()
// Return table project in the session
return session.Collection("Transaction")
} | [
0.212417334318161,
0.4396302103996277,
0.6198882460594177,
0.16166260838508606,
0.1096830815076828,
-0.9316890239715576,
0.34972548484802246,
-0.18431209027767181,
0.021584028378129005,
-0.08673527091741562,
-0.15450531244277954,
-0.22674663364887238,
0.18794234097003937,
-0.53068637847900... |
func GetAllTransactions() []*DOMAIN.Transaction {
// Slice to keep all Transactions
var transactions []*DOMAIN.Transaction
// Add all projects in Transactions variable
err := getTransactionCollection().Find().All(&transactions)
// Close session when ends the method
defer session.Close()
if err != nil {
log.Err... | [
0.08212029933929443,
0.1989288628101349,
0.7393664717674255,
1.1441315412521362,
0.037570029497146606,
0.5946756601333618,
-0.08035902678966522,
-0.6791825294494629,
0.25929197669029236,
-0.40267205238342285,
-0.03724505752325058,
0.3494105339050293,
-0.5878188610076904,
0.5781909227371216... |
func GetTransactionById(pId int) *DOMAIN.Transaction {
// Project structure
transaction := DOMAIN.Transaction{}
// Add in Transaction variable, the project where ID is the same that the param
res := getTransactionCollection().Find(db.Cond{"TransactionID": pId})
//project.ProjectType = GetTypesByProjectId(pId)
/... | [
0.3389051556587219,
0.09511324018239975,
0.5659738183021545,
-0.0419916957616806,
0.5278962254524231,
-0.3878316879272461,
0.18538562953472137,
-1.2220075130462646,
-0.13343726098537445,
0.7387239933013916,
-0.249355748295784,
-0.33821895718574524,
-0.7455121874809265,
0.14511437714099884,... |
func GetTransactionsByDateRange(pStartDate, pEndDate int64) []*DOMAIN.Transaction {
// Slice to keep all projects
transactions := []*DOMAIN.Transaction{}
startDate := time.Unix(pStartDate, 0).Format("20060102")
endDate := time.Unix(pEndDate, 0).Format("20060102")
// Filter Transaction by date range
res := getTran... | [
-0.1997603178024292,
-0.16574279963970184,
0.7931874394416809,
0.807162344455719,
-0.5027065277099609,
-0.020401621237397194,
-0.2936244606971741,
-0.9386482238769531,
-0.9901239275932312,
0.32599934935569763,
-0.11643282324075699,
0.09828602522611618,
-0.5917481184005737,
-0.2985240221023... |
func AddTransaction(pTransaction *DOMAIN.Transaction) (int, error) {
// Get a session
session = GetSession()
// Close session when ends the method
defer session.Close()
// Insert in DB
res, err := session.InsertInto("Transaction").Columns(
"TransactionCode",
"Type",
"Date",
"TRMID",
"TRMValue",
"Partn... | [
-0.33666154742240906,
0.5804120302200317,
1.282404899597168,
-0.604911208152771,
0.4976273775100708,
-0.10061907768249512,
0.8357473015785217,
-0.6667623519897461,
0.1700248271226883,
0.1754857301712036,
0.11233805119991302,
-0.8045101761817932,
-1.4053163528442383,
0.5009742975234985,
0... |
func UpdateTransaction(pTransaction *DOMAIN.Transaction) (int, error) {
// Get a session
session = GetSession()
// Close session when ends the method
defer session.Close()
// Update project in DB
q := session.Update("Transaction").Set("TransactionCode = ?, Type = ?, Date = ?, TRMID = ?, TRMValue = ?, PartnerID = ... | [
-0.6862953901290894,
-0.2301550805568695,
0.9455987215042114,
-0.541721522808075,
-0.2909773588180542,
0.09552689641714096,
0.47383296489715576,
-0.2238098382949829,
-0.47139793634414673,
1.025937557220459,
-0.00014360058412421495,
-0.63724285364151,
-1.0031875371932983,
0.2395638376474380... |
func DeleteTransaction(pTransactionId int) (int, error) {
// Get a session
session = GetSession()
// Close session when ends the method
defer session.Close()
// Delete project in DB
q := session.DeleteFrom("Transaction").Where("TransactionID", pTransactionId)
res, err := q.Exec()
if err != nil {
log.Error(err... | [
-0.045944277197122574,
0.22659189999103546,
0.8257468342781067,
-0.04241543263196945,
0.13813771307468414,
-0.2482827603816986,
0.86504065990448,
-0.24868737161159515,
0.4519859552383423,
0.6653913259506226,
0.12686556577682495,
-0.8792537450790405,
-1.2269237041473389,
0.4303581714630127,... |
func KeywordToken(literal []byte) Token {
initial := literal[0]
if list := keywordLiterals[initial]; list != nil {
for i := 0; i < len(list); i++ {
if bytes.Equal(list[i], literal) {
return keywordTokens[initial][i]
}
}
}
return None
} | [
0.9098051190376282,
-1.2086683511734009,
0.4579527974128723,
-0.1567898839712143,
-1.3081486225128174,
-0.2498786300420761,
-0.4269316792488098,
0.6175079941749573,
0.24543851613998413,
-0.003249678062275052,
-0.8654320240020752,
1.2007997035980225,
-0.5511226058006287,
-0.1548804938793182... |
func (b *BaseController) Prepare() {
var lang string
langCookie, err := b.Ctx.Request.Cookie("language")
if err != nil {
log.Errorf("Error occurred in Request.Cookie: %v", err)
}
if langCookie != nil {
lang = langCookie.Value
}
if len(lang) == 0 {
sessionLang := b.GetSession("lang")
if sessionLang != n... | [
-0.7156955003738403,
0.05548810213804245,
0.9003649353981018,
0.07076463103294373,
-0.35332557559013367,
-0.6905752420425415,
-0.5613133311271667,
-0.5497617721557617,
-0.11070006340742111,
0.3052288889884949,
-0.7574936151504517,
-0.5068062543869019,
-0.1461058259010315,
0.565918028354644... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.