text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (*StreamRequest) Descriptor() ([]byte, []int) {
return file_main_proto_rawDescGZIP(), []int{2}
} | [
-0.7591744661331177,
0.4130164086818695,
0.6316143870353699,
-0.10493072122335434,
-0.8281841278076172,
0.31997284293174744,
0.528266191482544,
-0.004829796962440014,
-0.4294690787792206,
-0.11699870228767395,
-0.04677913710474968,
1.059217929840088,
-0.015302496030926704,
1.04672098159790... |
func (*StreamReply) Descriptor() ([]byte, []int) {
return file_main_proto_rawDescGZIP(), []int{3}
} | [
-0.572704553604126,
0.10101312398910522,
0.4380020201206207,
-0.5675557851791382,
-0.5548332333564758,
0.4056992828845978,
-0.28275829553604126,
-0.15473073720932007,
-0.08792829513549805,
0.24389587342739105,
-0.6002638339996338,
1.1263991594314575,
-1.0892425775527954,
0.4751511514186859... |
func StartJobs(jobChan chan *Job, hosts []*Host, cmdStr string, args ...string) {
for _, h := range hosts {
go func(host *Host) {
cmd, err := host.StartCmd(cmdStr, args...)
if err != nil {
log.Println("unable to start command:", cmdStr, strings.Join(args, " "), "on host:", host.Name, ":", err)
return
... | [
-0.4881880283355713,
-0.05620327219367027,
0.40480807423591614,
0.16226127743721008,
0.33069390058517456,
0.5819953083992004,
-0.03848295658826828,
0.36172568798065186,
-1.1558949947357178,
-0.777018129825592,
-0.0100646847859025,
0.11562564224004745,
-0.4874323010444641,
0.495593547821044... |
func (s Selection) Match(msg Event) (bool, bool) {
for _, v := range s.N {
val, ok := msg.Select(v.Key)
if !ok {
return false, false
}
switch vt := val.(type) {
case float64:
// JSON numbers are all by spec float64 values
if !v.Pattern.NumMatch(int(vt)) {
return false, true
}
case int:
/... | [
-0.3632218539714813,
-0.43806639313697815,
0.8325346112251282,
-0.07418393343687057,
-0.40405896306037903,
0.029305223375558853,
0.8069909811019897,
-0.24440115690231323,
-0.5102118253707886,
0.062443748116493225,
-0.21197780966758728,
0.16348020732402802,
-0.23341846466064453,
0.969036459... |
func DiskPartitions(all bool) ([]DiskPartitionStat, error) {
filename := "/etc/mtab"
lines, err := readLines(filename)
if err != nil {
return nil, err
}
ret := make([]DiskPartitionStat, 0, len(lines))
for _, line := range lines {
fields := strings.Fields(line)
d := DiskPartitionStat{
Mountpoint: field... | [
-0.4388120472431183,
-0.2156640589237213,
0.42410755157470703,
0.032793499529361725,
-0.21122796833515167,
-0.3894282579421997,
-0.31961023807525635,
0.024265922605991364,
-0.5290284752845764,
0.244365394115448,
-0.17246098816394806,
-1.1099498271942139,
-0.7728211283683777,
0.999658286571... |
func NewOptions(opts ...Opt) *Options {
options := &Options{}
for _, opt := range opts {
opt(options)
}
return options
} | [
-0.17693565785884857,
0.03316696360707283,
0.22553540766239166,
0.8658305406570435,
0.2812550663948059,
-0.7961339950561523,
-0.7170719504356384,
-0.7527263760566711,
0.5311489701271057,
-0.07667183130979538,
-0.017126478254795074,
-0.24312818050384521,
-0.16795027256011963,
-0.08905296772... |
func WithContext(context ...Context) Opt {
return func(opts *Options) {
opts.Context = context
}
} | [
-0.09699040651321411,
0.4892951250076294,
0.6115239858627319,
0.15857194364070892,
-0.2261039912700653,
0.06538839638233185,
-0.6824921369552612,
-0.7729166746139526,
1.4202196598052979,
-0.16639447212219238,
-0.5874412059783936,
-0.47798675298690796,
-0.013971729204058647,
-0.886896252632... |
func WithID(id *url.URL) Opt {
return func(opts *Options) {
opts.ID = id
}
} | [
0.22229604423046112,
-0.4197504222393036,
0.44887781143188477,
-0.41721436381340027,
-0.1280282437801361,
0.23745055496692657,
-0.2429722398519516,
0.20012517273426056,
1.6096481084823608,
-0.05282657966017723,
-0.5645076036453247,
-0.009312662295997143,
0.12208127230405807,
-0.28258472681... |
func WithCID(cid string) Opt {
return func(opts *Options) {
opts.CID = cid
}
} | [
1.745028018951416,
-1.0075595378875732,
0.33902931213378906,
-0.30010318756103516,
0.018664225935935974,
0.9356352686882019,
-0.1827888935804367,
-0.09423645585775375,
0.8544227480888367,
0.13308748602867126,
0.2032560259103775,
-0.48028746247291565,
-0.06853658705949783,
-0.32758709788322... |
func WithTo(to ...*url.URL) Opt {
return func(opts *Options) {
opts.To = append(opts.To, to...)
}
} | [
-0.7228673696517944,
0.5308858156204224,
0.5728156566619873,
-0.7556205987930298,
0.4581575393676758,
-0.34397757053375244,
-0.6762794256210327,
-0.3196829557418823,
-0.2700718343257904,
-0.40268751978874207,
-0.7324799299240112,
-0.007930180057883263,
1.0865752696990967,
-0.82719516754150... |
func WithType(t ...Type) Opt {
return func(opts *Options) {
opts.Types = t
}
} | [
-0.40897446870803833,
0.6935094594955444,
0.5176268219947815,
0.620100200176239,
1.0355879068374634,
-0.04203926399350166,
0.10153169929981232,
-0.9945416450500488,
0.3687248229980469,
0.47249725461006165,
-0.3583202362060547,
-0.21690447628498077,
-0.1220875158905983,
-0.00867423228919506... |
func WithPublishedTime(t *time.Time) Opt {
return func(opts *Options) {
opts.Published = t
}
} | [
0.3822323679924011,
-0.12164034694433212,
0.41075173020362854,
0.27910491824150085,
-0.8311284184455872,
0.25661778450012207,
-0.08621588349342346,
-0.0756191685795784,
0.5054494142532349,
0.7647942900657654,
-0.540709912776947,
-0.8448201417922974,
0.3881199061870575,
1.006571888923645,
... |
func WithStartTime(t *time.Time) Opt {
return func(opts *Options) {
opts.StartTime = t
}
} | [
0.40855371952056885,
-0.46928173303604126,
0.4575994312763214,
-0.2209247499704361,
0.006552436854690313,
0.18980474770069122,
-0.3528905212879181,
-0.2458926886320114,
0.4441571831703186,
1.1683201789855957,
-0.3403365910053253,
-0.9902245998382568,
-0.031119564548134804,
0.17045788466930... |
func WithEndTime(t *time.Time) Opt {
return func(opts *Options) {
opts.EndTime = t
}
} | [
-0.41380438208580017,
0.08660247921943665,
0.5550760626792908,
-0.6572409272193909,
-0.19344906508922577,
0.06341507285833359,
-0.8349688649177551,
-0.2852928340435028,
0.2754160165786743,
1.1116859912872314,
-0.18736401200294495,
-0.945233166217804,
-0.43755802512168884,
0.211688071489334... |
func WithInReplyTo(id *url.URL) Opt {
return func(opts *Options) {
opts.InReplyTo = id
}
} | [
-0.048794977366924286,
-0.4818325638771057,
0.6336585879325867,
-1.4106152057647705,
-0.39496275782585144,
0.1256519854068756,
-0.32641342282295227,
-0.37394583225250244,
0.3492814600467682,
-0.3418751657009125,
-0.9758664965629578,
1.122494101524353,
-1.197356104850769,
-0.434923678636550... |
func WithAttachment(obj ...*ObjectType) Opt {
return func(opts *Options) {
opts.Attachment = append(opts.Attachment, obj...)
}
} | [
0.0888887345790863,
-0.4875960052013397,
0.5904098153114319,
0.16584765911102295,
-0.21634544432163239,
0.2807726562023163,
0.6991925835609436,
-1.3959742784500122,
0.452645868062973,
0.7782255411148071,
-0.24657535552978516,
-0.5558592081069946,
0.8854703307151794,
-0.06716522574424744,
... |
func WithTotalItems(totalItems int) Opt {
return func(opts *Options) {
opts.TotalItems = totalItems
}
} | [
-0.3637945055961609,
-0.30053839087486267,
0.6774721145629883,
0.2614566385746002,
0.10758113861083984,
-0.3080975413322449,
0.38431164622306824,
0.14384427666664124,
0.8818783164024353,
0.6343903541564941,
-0.8841895461082458,
-1.0275315046310425,
0.4860678017139435,
-0.7545754909515381,
... |
func WithFirst(first *url.URL) Opt {
return func(opts *Options) {
opts.First = first
}
} | [
0.5013418197631836,
0.4356507658958435,
0.6523928642272949,
-0.3430910110473633,
0.3665468990802765,
-0.7542679905891418,
-0.37769123911857605,
-0.39335593581199646,
0.3689471185207367,
-0.28663668036460876,
-0.575232207775116,
-0.05382582172751427,
0.9724042415618896,
0.11843706667423248,... |
func WithLast(last *url.URL) Opt {
return func(opts *Options) {
opts.Last = last
}
} | [
0.575892984867096,
0.19617044925689697,
0.810081958770752,
-0.7163993120193481,
0.4864393174648285,
-0.2181311994791031,
-0.2681367099285126,
-0.07735911756753922,
0.6395255327224731,
-0.262796014547348,
-0.19779320061206818,
-0.556243896484375,
0.2896457612514496,
-0.6214964389801025,
-... |
func WithCurrent(current *url.URL) Opt {
return func(opts *Options) {
opts.Current = current
}
} | [
-0.11224070936441422,
-0.7223312258720398,
0.3816099464893341,
-0.6919903755187988,
-0.5322056412696838,
0.4610963463783264,
0.3517426550388336,
0.2654631435871124,
-0.3517809510231018,
-0.09830788522958755,
0.06851166486740112,
-0.09374674409627914,
1.0525274276733398,
-0.4773904979228973... |
func WithPartOf(partOf *url.URL) Opt {
return func(opts *Options) {
opts.PartOf = partOf
}
} | [
0.9923315644264221,
-0.2643296718597412,
0.5249011516571045,
-0.6784361600875854,
-0.1571318507194519,
-0.677672266960144,
0.322372704744339,
-0.366534024477005,
0.2575105130672455,
-0.48723772168159485,
-0.5843168497085571,
-0.6271218657493591,
0.5469338297843933,
-0.5283295512199402,
-... |
func WithNext(next *url.URL) Opt {
return func(opts *Options) {
opts.Next = next
}
} | [
-0.08812624961137772,
0.6792407631874084,
0.5025970339775085,
0.2348574697971344,
-0.7370460033416748,
-0.39042410254478455,
-0.5733048915863037,
-0.21393036842346191,
0.9482018947601318,
-0.5744637846946716,
-0.4648323059082031,
-0.14846619963645935,
0.24580872058868408,
0.023397365584969... |
func WithPrev(prev *url.URL) Opt {
return func(opts *Options) {
opts.Prev = prev
}
} | [
0.038122911006212234,
0.3239635229110718,
0.8942989110946655,
0.019353767856955528,
0.11567287147045135,
-0.3805583715438843,
0.31948840618133545,
0.16587062180042267,
0.37994271516799927,
-0.34827542304992676,
-0.44460633397102356,
-0.3216400742530823,
-0.013356267474591732,
-0.7125304341... |
func WithIRI(iri *url.URL) Opt {
return func(opts *Options) {
opts.Iri = iri
}
} | [
-0.06463298946619034,
-0.26354122161865234,
0.5962187647819519,
0.34629786014556885,
-0.23528796434402466,
-0.6541792154312134,
0.34843868017196655,
-0.20441021025180817,
0.14690867066383362,
-0.2021208107471466,
-0.17577846348285675,
-0.5911738276481628,
0.0048481556586921215,
-0.67890828... |
func WithObject(obj *ObjectType) Opt {
return func(opts *Options) {
opts.Object = obj
}
} | [
-0.200645312666893,
-0.20669148862361908,
0.5289644598960876,
-0.18710145354270935,
-0.09902778267860413,
0.6023292541503906,
0.58734130859375,
-0.6105971336364746,
0.7571896910667419,
0.1180950403213501,
-0.9783440828323364,
-0.2693924009799957,
0.9667056202888489,
-0.7303834557533264,
... |
func WithCollection(coll *CollectionType) Opt {
return func(opts *Options) {
opts.Collection = coll
}
} | [
0.35908401012420654,
0.1450386941432953,
0.556925892829895,
0.001021157600916922,
0.4866985082626343,
0.041535504162311554,
0.5551391243934631,
-0.9226497411727905,
0.21321430802345276,
0.0952482670545578,
-0.003851663088425994,
-0.08029671758413315,
0.7183101773262024,
0.4943425953388214,... |
func WithOrderedCollection(coll *OrderedCollectionType) Opt {
return func(opts *Options) {
opts.OrderedCollection = coll
}
} | [
0.23940399289131165,
-0.9833448529243469,
0.4431213438510895,
-0.1698838472366333,
0.1839669793844223,
-0.06989257037639618,
0.36141517758369446,
-1.1092445850372314,
0.38554197549819946,
-0.6943739056587219,
-0.19375722110271454,
-0.19138742983341217,
-0.11848373711109161,
0.9893571734428... |
func WithActivity(activity *ActivityType) Opt {
return func(opts *Options) {
opts.Activity = activity
}
} | [
0.17828164994716644,
-0.40767404437065125,
0.31029388308525085,
0.32287994027137756,
0.31350791454315186,
-0.23845547437667847,
1.1057159900665283,
-0.9424340724945068,
0.8548667430877686,
-0.0816253051161766,
0.2704889178276062,
-0.5533090233802795,
0.34699705243110657,
-0.828977644443512... |
func WithAnchorCredentialReference(ref *AnchorCredentialReferenceType) Opt {
return func(opts *Options) {
opts.AnchorCredRef = ref
}
} | [
1.123592734336853,
-0.9347848296165466,
0.4260184168815613,
-1.0238624811172485,
0.3134353458881378,
0.5888518691062927,
-0.03487972915172577,
-0.5297639966011047,
0.5586376190185547,
0.22764171659946442,
1.050905704498291,
0.6073271036148071,
0.5521240234375,
-0.1706506609916687,
0.1563... |
func WithActor(actor *url.URL) Opt {
return func(opts *Options) {
opts.Actor = actor
}
} | [
-0.5422537326812744,
-0.8113260865211487,
0.3720119297504425,
-0.18792499601840973,
-0.947598397731781,
0.23752886056900024,
1.0047259330749512,
0.5382705330848694,
1.2226526737213135,
-1.0165616273880005,
-0.06354327499866486,
0.3213827311992645,
0.7309961915016174,
0.4391031265258789,
... |
func WithTarget(target *ObjectProperty) Opt {
return func(opts *Options) {
opts.Target = target
}
} | [
-0.4931061565876007,
-0.5793053507804871,
0.46794429421424866,
-0.38050100207328796,
0.01320249680429697,
-0.06463822722434998,
-0.007230130489915609,
-0.8048447966575623,
0.8405449390411377,
-0.25849026441574097,
0.5103635191917419,
-0.24488115310668945,
0.9416472911834717,
-1.71179878711... |
func WithResult(result *ObjectProperty) Opt {
return func(opts *Options) {
opts.Result = result
}
} | [
0.19811847805976868,
0.31421959400177,
0.5087564587593079,
0.49013423919677734,
-0.26534727215766907,
-0.4982564151287079,
0.6383984088897705,
-0.999680757522583,
1.4887399673461914,
-0.5937764644622803,
-0.6714428663253784,
-0.8819333910942078,
0.4728931188583374,
-1.4718778133392334,
-... |
func WithPublicKey(publicKey *PublicKeyType) Opt {
return func(opts *Options) {
opts.PublicKey = publicKey
}
} | [
0.7772051095962524,
0.5151833891868591,
0.34781715273857117,
0.3002672493457794,
0.04328346252441406,
-0.29063093662261963,
0.18244880437850952,
-0.9398455619812012,
0.01939021609723568,
1.1319382190704346,
-0.5901312232017517,
0.020898522809147835,
0.40377041697502136,
1.2183209657669067,... |
func WithInbox(inbox *url.URL) Opt {
return func(opts *Options) {
opts.Inbox = inbox
}
} | [
-0.5529231429100037,
0.08114331215620041,
0.4524635374546051,
-0.505413293838501,
-0.8747984766960144,
0.13719314336776733,
-0.47880956530570984,
-0.17982129752635956,
0.7247002720832825,
-1.421762228012085,
-0.07997438311576843,
1.0521646738052368,
-0.9659631848335266,
-0.4763837456703186... |
func WithOutbox(outbox *url.URL) Opt {
return func(opts *Options) {
opts.Outbox = outbox
}
} | [
-0.8940890431404114,
0.5016924738883972,
0.40824803709983826,
-0.3063090145587921,
-0.7573205232620239,
0.20821629464626312,
0.44225308299064636,
0.13517321646213531,
0.7687404751777649,
-1.4694960117340088,
-0.3337253928184509,
0.1594541370868683,
-0.14314334094524384,
0.15265321731567383... |
func WithFollowers(followers *url.URL) Opt {
return func(opts *Options) {
opts.Followers = followers
}
} | [
-0.02751801162958145,
0.28057733178138733,
0.3788831830024719,
0.22109602391719818,
-0.7257329821586609,
0.08773329854011536,
0.2073771208524704,
-0.9617400765419006,
1.0281130075454712,
-0.5146462917327881,
-0.3562484681606293,
0.048630017787218094,
0.015150035731494427,
1.143181681632995... |
func WithFollowing(following *url.URL) Opt {
return func(opts *Options) {
opts.Following = following
}
} | [
0.3991246521472931,
-0.042917221784591675,
0.2227628380060196,
0.24656595289707184,
-0.5750100016593933,
0.5319715738296509,
-0.241690993309021,
-1.0761936902999878,
0.7095815539360046,
-0.22116732597351074,
-0.6741658449172974,
-0.13029171526432037,
0.7881162166595459,
0.40808165073394775... |
func WithWitnesses(witnesses *url.URL) Opt {
return func(opts *Options) {
opts.Witnesses = witnesses
}
} | [
0.5173659324645996,
0.24827644228935242,
0.39439961314201355,
-0.38591477274894714,
0.39810866117477417,
-0.1761235147714615,
-0.32328587770462036,
-0.008895768783986568,
0.5536888837814331,
-0.7132387757301331,
-0.3135688602924347,
-0.09068406373262405,
-0.0969448983669281,
0.585201799869... |
func WithWitnessing(witnessing *url.URL) Opt {
return func(opts *Options) {
opts.Witnessing = witnessing
}
} | [
0.32384857535362244,
-0.15190963447093964,
0.3724943995475769,
-0.34258225560188293,
-0.05388205498456955,
-0.03334275633096695,
0.2822108268737793,
-0.05308480188250542,
0.6526179909706116,
-0.026738179847598076,
-0.8915272951126099,
-0.27534666657447815,
0.7601484060287476,
0.48335441946... |
func WithLiked(liked *url.URL) Opt {
return func(opts *Options) {
opts.Liked = liked
}
} | [
0.7133488655090332,
-0.7736804485321045,
0.34932219982147217,
-0.42579516768455505,
-0.5913740992546082,
1.1296645402908325,
-0.2792823910713196,
-0.4628707468509674,
0.9105737805366516,
-1.0628430843353271,
-0.5491797924041748,
0.267760694026947,
0.47150707244873047,
0.6904595494270325,
... |
func WithLikes(likes *url.URL) Opt {
return func(opts *Options) {
opts.Likes = likes
}
} | [
-0.3058156669139862,
-0.04333594813942909,
0.5110418796539307,
-0.332770437002182,
-0.44590166211128235,
-0.02777600660920143,
-0.33116745948791504,
-0.8605368137359619,
0.921791136264801,
-0.6513158082962036,
-0.10396691411733627,
0.6383122801780701,
0.22438472509384155,
0.068573966622352... |
func WithShares(shares *url.URL) Opt {
return func(opts *Options) {
opts.Shares = shares
}
} | [
0.12127728015184402,
0.8706303834915161,
0.33296337723731995,
-0.43913257122039795,
0.323796808719635,
-0.23860998451709747,
0.10502737015485764,
-0.6944760680198669,
0.9299675226211548,
-1.195305347442627,
0.16140352189540863,
-0.6263188719749451,
0.054849546402692795,
0.06048176065087318... |
func WithOwner(owner *url.URL) Opt {
return func(opts *Options) {
opts.Owner = owner
}
} | [
0.24211253225803375,
0.02869567461311817,
0.43526262044906616,
0.8750103116035461,
-0.3153000473976135,
0.01823672093451023,
0.823137640953064,
-0.1136743500828743,
0.7870393395423889,
-1.2743128538131714,
-0.27036309242248535,
0.02514658309519291,
0.9180970788002014,
0.05413215607404709,
... |
func WithPublicKeyPem(pem string) Opt {
return func(opts *Options) {
opts.PublicKeyPem = pem
}
} | [
0.2767139673233032,
0.14183558523654938,
0.3516002595424652,
0.5223332643508911,
-0.04306907579302788,
0.00626189773902297,
-0.11595281958580017,
0.1861099749803543,
-0.2620936334133148,
0.6387682557106018,
-1.12199866771698,
-0.9727703928947449,
-0.32255804538726807,
0.09421315044164658,
... |
func (c *gClient) setAuth(ctx context.Context) error {
credentialsSecret := &corev1.Secret{}
credentialsSecretName := c.store.Auth.SecretRef.AccessToken.Name
if credentialsSecretName == "" {
return fmt.Errorf(errGitlabCredSecretName)
}
objectKey := types.NamespacedName{
Name: credentialsSecretName,
Name... | [
0.09571059793233871,
-0.25805148482322693,
0.466415137052536,
1.005051612854004,
-0.07012814283370972,
0.3903154730796814,
-0.06061377376317978,
-0.15512248873710632,
0.5274937152862549,
-0.4060390889644623,
0.16562937200069427,
1.1229254007339478,
0.10831408947706223,
0.5829569697380066,
... |
func NewGitlabProvider() *Gitlab {
return &Gitlab{}
} | [
0.4991823434829712,
0.3926630914211273,
-0.28953006863594055,
-0.058721352368593216,
-1.3196479082107544,
0.9043872952461243,
-0.4791345000267029,
-0.6023408770561218,
0.20804902911186218,
0.6889281868934631,
0.1825944036245346,
-0.9177280068397522,
-1.1694035530090332,
-0.0048120594583451... |
func (g *Gitlab) NewClient(ctx context.Context, store esv1alpha1.GenericStore, kube kclient.Client, namespace string) (provider.SecretsClient, error) {
storeSpec := store.GetSpec()
if storeSpec == nil || storeSpec.Provider == nil || storeSpec.Provider.Gitlab == nil {
return nil, fmt.Errorf("no store type or wrong s... | [
0.48320502042770386,
0.06150301918387413,
0.3246392607688904,
-0.44728899002075195,
-0.2036358118057251,
0.8116471171379089,
-0.1628396213054657,
-0.18274597823619843,
0.07053536176681519,
1.09017014503479,
0.27564823627471924,
0.8698707818984985,
-0.597895085811615,
-0.13855591416358948,
... |
func (f *TextFormatter) Format(entry *logrus.Entry) ([]byte, error) {
var b *bytes.Buffer
if entry.Buffer != nil {
b = entry.Buffer
} else {
b = new(bytes.Buffer)
}
// Remove a single newline if it already exists in the message to keep
// the behavior of logrus text_formatter the same as the stdlib log packa... | [
0.42323413491249084,
-0.6557314991950989,
0.8537858724594116,
-0.7682661414146423,
-0.406312495470047,
-0.7539088726043701,
-0.8136076331138611,
-0.6057385802268982,
0.10127542912960052,
0.026435110718011856,
0.8226104974746704,
0.8557214140892029,
-0.22758899629116058,
1.1804927587509155,... |
func NewFromEnv(namespace string) (*Config, error) {
c := &Config{}
err := envconfig.Process(namespace, c)
if err != nil {
return nil, err
}
return c, nil
} | [
-0.19222335517406464,
-0.5644192695617676,
0.055707819759845734,
0.12348587065935135,
-0.6722040772438049,
-0.3882681429386139,
-1.2047696113586426,
-0.8367843627929688,
-0.26978805661201477,
0.3892960846424103,
-0.9109681248664856,
0.4052416980266571,
-0.23626035451889038,
0.6744000911712... |
func NewMinRequest(space string) *MinRequest {
req := new(MinRequest)
req.initImpl("crud.min")
req.setSpace(space)
req.index = []interface{}{}
req.opts = MinOpts{}
return req
} | [
-0.3651597797870636,
-0.6293035745620728,
0.22057020664215088,
0.281696081161499,
-0.7749847769737244,
-0.4591255187988281,
-0.8926592469215393,
-0.54885333776474,
0.9206074476242065,
-0.41604146361351013,
0.49844473600387573,
0.8052648901939392,
-0.562893807888031,
0.5833919644355774,
-... |
func (req *MinRequest) Index(index interface{}) *MinRequest {
req.index = index
return req
} | [
-1.3044503927230835,
-0.45908087491989136,
0.1898878514766693,
0.16678351163864136,
-0.19608397781848907,
0.6119786500930786,
0.37696564197540283,
0.36140477657318115,
1.18644380569458,
-0.8414989113807678,
-0.23342877626419067,
0.42847752571105957,
-0.5309494733810425,
-0.0169432442635297... |
func (req *MinRequest) Opts(opts MinOpts) *MinRequest {
req.opts = opts
return req
} | [
-1.2866625785827637,
-0.7867748737335205,
0.3789560794830322,
-0.19015614688396454,
-0.5326321721076965,
0.1504628211259842,
-0.7780407071113586,
-0.6462169289588928,
1.6878430843353271,
-1.2690900564193726,
0.6502588391304016,
0.6214035153388977,
-0.5136637091636658,
-0.25578489899635315,... |
func (req *MinRequest) Body(res tarantool.SchemaResolver, enc *encoder) error {
args := minArgs{Space: req.space, Index: req.index, Opts: req.opts}
req.impl = req.impl.Args(args)
return req.impl.Body(res, enc)
} | [
-0.8192199468612671,
-0.6451737880706787,
0.33037126064300537,
0.015005594119429588,
0.2540004849433899,
-0.10368341207504272,
-0.322333425283432,
-0.9069690704345703,
1.185945987701416,
-0.0037268574815243483,
0.05142423138022423,
-0.23596394062042236,
-0.3102143406867981,
0.1382842361927... |
func (req *MinRequest) Context(ctx context.Context) *MinRequest {
req.impl = req.impl.Context(ctx)
return req
} | [
-0.4378582835197449,
-0.4637305736541748,
0.5483132600784302,
-0.18565666675567627,
-0.028358876705169678,
0.9216431975364685,
0.22593364119529724,
-0.5423218011856079,
2.1705498695373535,
-0.8234504461288452,
0.11530905961990356,
1.1368712186813354,
0.1010589525103569,
0.19269366562366486... |
func OverrideGenesisStateDefaults(cdc *codec.Codec, genState map[string]json.RawMessage) (map[string]json.RawMessage, error) {
// Mint module params
{
moduleName, moduleState := mint.ModuleName, mint.GenesisState{}
if err := cdc.UnmarshalJSON(genState[moduleName], &moduleState); err != nil {
return nil, fmt.Er... | [
-0.8548029065132141,
-0.09209797531366348,
0.653943657875061,
-0.6069727540016174,
0.055370982736349106,
0.03946339339017868,
0.003465173998847604,
-0.8419869542121887,
-0.39197665452957153,
0.3119334578514099,
-0.21422530710697174,
0.6563920974731445,
-0.1524682193994522,
1.14424550533294... |
func NewMoney(a int, c string) *Money {
return &Money{amount: a, currency: c}
} | [
0.7381864786148071,
-0.9380658268928528,
0.31777068972587585,
-0.628954291343689,
-1.0923813581466675,
0.050580672919750214,
-0.9755510091781616,
-0.6612926721572876,
-0.12407919019460678,
0.32556310296058655,
0.06354747712612152,
0.19556847214698792,
-0.2775874733924866,
-0.04227898269891... |
func (m *Money) Equals(tm *Money) bool {
if m.currency != tm.currency {
return false
}
if m.amount != tm.amount {
return false
}
return true
} | [
-1.1218863725662231,
-0.9203839302062988,
0.3456723690032959,
-0.5619231462478638,
-0.34667569398880005,
0.36614105105400085,
-0.7692742347717285,
-0.9809972047805786,
-0.2375197857618332,
0.5461133718490601,
-0.8334791660308838,
0.13381126523017883,
-0.47433239221572876,
0.505248308181762... |
func MakeStatefulSet(name string) *appsbeta1.StatefulSet {
statefulSet := &appsbeta1.StatefulSet{}
statefulSet.Name = name
statefulSet.Namespace = "testing"
statefulSet.Spec.Replicas = pointer(int32(3))
statefulSet.Spec.Template.ObjectMeta.Labels = make(map[string]string)
if name == "fail" {
statefulSet.Spec.Te... | [
-0.23742951452732086,
-0.07239442318677902,
0.6608201265335083,
-0.86048823595047,
-1.58478581905365,
0.2508731484413147,
-0.09760476648807526,
-0.4803454279899597,
0.10330908745527267,
0.12325029075145721,
-0.8112281560897827,
-0.21227535605430603,
0.19873058795928955,
-0.5119082927703857... |
func (client *ApiECSClient) serviceClient() (*svc.AmazonEC2ContainerServiceV20141113Client, error) {
config := client.config
signer := authv4.NewHttpSigner(config.AWSRegion, ECS_SERVICE, client.CredentialProvider(), nil)
c := codec.AwsJson{Host: config.APIEndpoint, SignerV4: signer}
d, err := dialer.TLS(config.A... | [
-0.45121678709983826,
-0.6923348307609558,
0.5073660612106323,
-0.5687630772590637,
-0.25781816244125366,
-0.12370190769433975,
0.48385167121887207,
-0.46139585971832275,
-0.2414751499891281,
-0.2496284544467926,
-0.22457025945186615,
0.9160307049751282,
-0.38354000449180603,
-0.1124735102... |
func (client *ApiECSClient) CreateCluster(clusterName string) (string, error) {
svcRequest := svc.NewCreateClusterRequest()
svcRequest.SetClusterName(&clusterName)
svcClient, err := client.serviceClient()
if err != nil {
log.Error("Unable to get service client for frontend", "err", err)
return "", err
}
res... | [
-0.09814281761646271,
0.4893892705440521,
0.687241792678833,
-0.5455371737480164,
0.1281578093767166,
0.004170433152467012,
0.1832951158285141,
0.19899912178516388,
0.13711823523044586,
0.08839068561792374,
0.5647525191307068,
0.7828332781791687,
-0.33999407291412354,
0.198675736784935,
... |
func (*RegexMatcher) Descriptor() ([]byte, []int) {
return file_xds_type_matcher_v3_regex_proto_rawDescGZIP(), []int{0}
} | [
-0.638828456401825,
0.29594776034355164,
0.6721270680427551,
0.32695990800857544,
-0.22617077827453613,
-0.5452089309692383,
0.27465859055519104,
1.155370831489563,
0.4127524793148041,
-0.7748971581459045,
-0.47232508659362793,
-0.4082874357700348,
-0.8133392333984375,
0.7238653302192688,
... |
func (*RegexMatcher_GoogleRE2) Descriptor() ([]byte, []int) {
return file_xds_type_matcher_v3_regex_proto_rawDescGZIP(), []int{0, 0}
} | [
-1.059558391571045,
-0.09040185064077377,
0.585641622543335,
-0.025496574118733406,
-0.06118787080049515,
-1.2235535383224487,
-0.34109506011009216,
0.569134533405304,
-0.8130835890769958,
0.23783832788467407,
-0.626987636089325,
0.5096441507339478,
-1.0441904067993164,
1.1952489614486694,... |
func (c *client) Changes() []func(context.Context) (string, []string, error) {
return []func(context.Context) (string, []string, error){
func(ctx context.Context) (string, []string, error) {
return "Bumping index.md", []string{"docs/index.md"}, nil
},
}
} | [
-1.0219097137451172,
0.046207159757614136,
0.4591548442840576,
-0.4210284352302551,
0.34505218267440796,
0.3435167074203491,
-0.0684039443731308,
-0.6939484477043152,
0.295418918132782,
-0.5301192998886108,
-0.21920546889305115,
0.9679844379425049,
0.3506011962890625,
0.7042497396469116,
... |
func (c *client) PRTitleBody() (string, string, error) {
return "Update index.md", "", nil
} | [
-0.40229615569114685,
0.12657739222049713,
0.4749772250652313,
-0.34055086970329285,
-0.14234842360019684,
0.054230574518442154,
-1.3094393014907837,
-0.15642492473125458,
0.2968868315219879,
0.6440145969390869,
-0.4984150528907776,
0.04611322656273842,
-1.476506233215332,
-0.1379999220371... |
func (t *Task) Valid() error {
if t.Name == "" || t.Action == "" || t.ScheduledTime == "" {
return fmt.Errorf("name, action, and scheduled time required")
}
return nil
} | [
0.24559694528579712,
-0.44241997599601746,
0.5947789549827576,
0.17851664125919342,
-0.2669469118118286,
1.1708905696868896,
-0.9046591520309448,
0.47921207547187805,
-1.061960220336914,
0.6418161988258362,
-0.2594779431819916,
0.0846596509218216,
0.4497346878051758,
-0.03100714273750782,
... |
func CreateTask(name, action, schedTime string) *Task {
return &Task{
ID: rand.Int63n(10000),
Name: name,
Action: action,
ScheduledTime: schedTime,
}
} | [
0.4297328591346741,
-0.3023796081542969,
0.4573080837726593,
0.4267061948776245,
0.12802335619926453,
0.5376880764961243,
-0.8652414679527283,
0.04731808975338936,
0.560454785823822,
0.6058637499809265,
-0.7763586044311523,
0.20447851717472076,
0.2738776206970215,
-0.42426231503486633,
-... |
func (s DescribePatchBaselinesInput) String() string {
return awsutil.Prettify(s)
} | [
1.3685137033462524,
-0.17740900814533234,
-0.020213298499584198,
-0.8709347248077393,
-0.5275948643684387,
1.1045626401901245,
0.15303625166416168,
-0.8314895033836365,
0.004592712968587875,
-0.2695907652378082,
0.6183553338050842,
1.2957936525344849,
0.012980267405509949,
-0.8470059633255... |
func (s *DescribePatchBaselinesInput) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "DescribePatchBaselinesInput"}
if s.MaxResults != nil && *s.MaxResults < 1 {
invalidParams.Add(aws.NewErrParamMinValue("MaxResults", 1))
}
if s.Filters != nil {
for i, v := range s.Filters {
if err := v.Va... | [
0.0608573742210865,
0.8115729689598083,
0.48043176531791687,
-0.39007076621055603,
0.07968777418136597,
-0.036163222044706345,
-0.040915802121162415,
-0.3198592960834503,
-0.30129626393318176,
-0.29048603773117065,
1.1732836961746216,
0.8036301732063293,
-0.6862627863883972,
0.622777462005... |
func (s DescribePatchBaselinesOutput) String() string {
return awsutil.Prettify(s)
} | [
1.6847707033157349,
-0.5529016852378845,
0.032152529805898666,
-0.8049891591072083,
-0.7292532920837402,
0.4053361117839813,
0.14144930243492126,
-0.8068525195121765,
-0.3415254056453705,
-0.25408387184143066,
0.8296597599983215,
1.0702264308929443,
0.22357572615146637,
-0.9057368636131287... |
func (r DescribePatchBaselinesRequest) Send(ctx context.Context) (*DescribePatchBaselinesResponse, error) {
r.Request.SetContext(ctx)
err := r.Request.Send()
if err != nil {
return nil, err
}
resp := &DescribePatchBaselinesResponse{
DescribePatchBaselinesOutput: r.Request.Data.(*DescribePatchBaselinesOutput),... | [
-0.011958708055317402,
0.2722208797931671,
0.34949401021003723,
-0.3443712592124939,
-0.05086414888501167,
0.310871958732605,
-0.7808109521865845,
-0.8370699286460876,
0.3476378321647644,
-0.4538984000682831,
0.24054233729839325,
1.3225127458572388,
-0.6108163595199585,
-0.0941329598426818... |
func (r *DescribePatchBaselinesResponse) SDKResponseMetdata() *aws.Response {
return r.response
} | [
0.8388572931289673,
-0.18026092648506165,
0.24436138570308685,
-0.8460721969604492,
-0.4188762605190277,
0.6772843599319458,
-1.3309537172317505,
-0.3975694477558136,
1.1710050106048584,
-0.3712209463119507,
0.2486741989850998,
0.4349437654018402,
-0.1250278502702713,
-1.3361114263534546,
... |
func (this *Trie) Insert(word string) {
if len(word) == 0 {return}
if this.path == nil {
this.path = make([]*Trie, 26)
}
if this.path[word[0] - 'a'] == nil {
this.path[word[0]-'a'] = &Trie{}
this.path[word[0]- 'a'].end = len(word) == 1
} else {
if !this.path[word[0]-... | [
-0.22833307087421417,
0.6443444490432739,
0.6926746964454651,
-0.5150949358940125,
0.15471239387989044,
0.2605726420879364,
1.3953355550765991,
1.0206925868988037,
0.17373843491077423,
0.4243830740451813,
-0.3316936790943146,
0.04591915383934975,
-1.9139180183410645,
0.3791747987270355,
... |
func (this *Trie) Search(word string) bool {
if len(word) == 0 {return true}
if this == nil || this.path == nil || this.path[word[0] - 'a'] == nil {return false}
if len(word) == 1 { return this.path[word[0]-'a'].end}
this = this.path[word[0]-'a']
return this.Search(word[1:])
} | [
-0.5342016220092773,
0.5898661017417908,
0.6275005340576172,
0.20483018457889557,
-0.43879348039627075,
0.2964251935482025,
0.8820701241493225,
0.1315823644399643,
0.27305251359939575,
0.019513847306370735,
0.33269810676574707,
-0.19257284700870514,
-1.5245665311813354,
0.6508059501647949,... |
func (this *Trie) StartsWith(prefix string) bool {
if len(prefix) == 0 {return true}
if this == nil || this.path == nil || this.path[prefix[0] - 'a'] == nil {return false}
if len(prefix) == 1 {return this.path[prefix[0] - 'a'] != nil}
this = this.path[prefix[0] - 'a']
return this.StartsWith(prefix[1... | [
-0.04380173236131668,
-0.28876110911369324,
0.5993449687957764,
0.35218462347984314,
-0.3272688090801239,
-1.0899382829666138,
0.01183272060006857,
0.29330864548683167,
0.8737758994102478,
0.11767769604921341,
-0.05332139506936073,
0.10133016854524612,
-0.1324748992919922,
0.54920119047164... |
func newRouteGroup(prefix string, router *Router, handlers []Handler) *RouteGroup {
return &RouteGroup{
prefix: prefix,
router: router,
handlers: handlers,
}
} | [
-0.45649367570877075,
0.1954592913389206,
-0.1809036135673523,
-0.15846161544322968,
-1.0994292497634888,
-0.2698317766189575,
-0.9637761116027832,
0.465025395154953,
0.006031994707882404,
-0.7976481914520264,
-0.5090985894203186,
0.7315633893013,
0.19230152666568756,
1.2085245847702026,
... |
func (rg *RouteGroup) GET(path string, handlers ...Handler) *Route {
return rg.add("GET", path, handlers)
} | [
-0.6990388035774231,
0.14536045491695404,
0.15180900692939758,
-0.5088924765586853,
0.3631765842437744,
0.3987971246242523,
-0.8834024667739868,
-0.1321171373128891,
-1.0722320079803467,
-1.0766582489013672,
-0.19860315322875977,
1.216565728187561,
-0.37084150314331055,
-0.0858893916010856... |
func (rg *RouteGroup) POST(path string, handlers ...Handler) *Route {
return rg.add("POST", path, handlers)
} | [
-0.39393576979637146,
0.2157626450061798,
0.23636968433856964,
0.6800621747970581,
-0.5210798382759094,
0.8398626446723938,
-0.6218949556350708,
-0.2120896875858307,
-1.035578966140747,
-1.5995752811431885,
-0.5991973280906677,
-0.1147080585360527,
-0.4475134015083313,
0.7482086420059204,
... |
func (rg *RouteGroup) PUT(path string, handlers ...Handler) *Route {
return rg.add("PUT", path, handlers)
} | [
-0.7463403940200806,
0.37545910477638245,
0.1597435474395752,
-0.8270946741104126,
-0.1735750287771225,
0.9177452325820923,
0.11837661266326904,
-0.027978897094726562,
-1.1149027347564697,
-0.5427455306053162,
-0.48619768023490906,
0.5933465957641602,
-0.9713854193687439,
0.075750730931758... |
func (rg *RouteGroup) PATCH(path string, handlers ...Handler) *Route {
return rg.add("PATCH", path, handlers)
} | [
-0.31568440794944763,
-0.35985371470451355,
0.21074603497982025,
-0.40084168314933777,
-0.8642207980155945,
1.3186075687408447,
-0.34856781363487244,
0.28418299555778503,
-0.45157289505004883,
-1.1429694890975952,
-0.19413290917873383,
0.7293549180030823,
-0.4206201136112213,
0.52665776014... |
func (rg *RouteGroup) DELETE(path string, handlers ...Handler) *Route {
return rg.add("DELETE", path, handlers)
} | [
0.028690077364444733,
0.4239045977592468,
0.2621510326862335,
0.24278153479099274,
0.16669350862503052,
0.5923405289649963,
-0.07455562800168991,
0.13468001782894135,
-0.3345149755477905,
-0.7535929679870605,
-0.15589937567710876,
0.4002566635608673,
-0.7753342390060425,
0.3169191479682922... |
func (rg *RouteGroup) CONNECT(path string, handlers ...Handler) *Route {
return rg.add("CONNECT", path, handlers)
} | [
-0.7656823992729187,
-0.2592584788799286,
0.31385502219200134,
0.2844124734401703,
-0.9263870120048523,
0.7604933977127075,
-0.3245355188846588,
-0.6466795206069946,
-1.50896155834198,
-0.4855118691921234,
0.1718323975801468,
0.10060866177082062,
-0.2064656764268875,
0.9378094673156738,
... |
func (rg *RouteGroup) HEAD(path string, handlers ...Handler) *Route {
return rg.add("HEAD", path, handlers)
} | [
-0.8886925578117371,
0.02711528353393078,
0.3066248595714569,
0.5677899718284607,
-0.2101794332265854,
1.4086905717849731,
-0.20764122903347015,
-0.3141392171382904,
-0.1865229606628418,
-0.6930016875267029,
-0.5428306460380554,
0.8236026763916016,
-0.1196889877319336,
-0.18997855484485626... |
func (rg *RouteGroup) OPTIONS(path string, handlers ...Handler) *Route {
return rg.add("OPTIONS", path, handlers)
} | [
-0.7504688501358032,
0.34119147062301636,
0.3648182153701782,
-0.206692174077034,
0.2906934916973114,
0.5437920689582825,
-0.1564096212387085,
-0.2972095310688019,
-0.3083839416503906,
-0.8438194394111633,
-0.02182910405099392,
-0.10240600258111954,
-0.005941906478255987,
0.217964813113212... |
func (rg *RouteGroup) TRACE(path string, handlers ...Handler) *Route {
return rg.add("TRACE", path, handlers)
} | [
0.17970776557922363,
0.5220608711242676,
0.35431453585624695,
0.22245584428310394,
0.0821874663233757,
0.591297447681427,
0.019837021827697754,
-0.693483293056488,
-0.20310993492603302,
-0.9170461893081665,
-0.6147661209106445,
-0.19592447578907013,
-0.4682005047798157,
0.1233079582452774,... |
func (rg *RouteGroup) Any(path string, handlers ...Handler) *Route {
return rg.To(strings.Join(Methods, ","), path, handlers...)
} | [
-0.7029011249542236,
-0.026507385075092316,
0.28255289793014526,
0.018314717337489128,
0.3188807964324951,
0.03875783458352089,
-0.74471515417099,
-0.0358978733420372,
-1.353212833404541,
-1.1985960006713867,
0.24114222824573517,
0.16508834064006805,
-0.0915389433503151,
0.3429929316043854... |
func (rg *RouteGroup) File(path string, filePath string) *Route {
return rg.Any(path, func(c *Context) error {
if c.Request.Method != "GET" && c.Request.Method != "HEAD" {
return NewHTTPError(http.StatusMethodNotAllowed)
}
file, err := os.Open(filePath)
if err != nil {
return NewHTTPError(http.StatusNotF... | [
-0.4607515335083008,
-0.0781315341591835,
0.7185484170913696,
0.4800967574119568,
0.02248077094554901,
0.48313817381858826,
0.5694540739059448,
-0.14790505170822144,
-1.1320241689682007,
-0.059772659093141556,
1.4060474634170532,
0.07037322223186493,
-0.11516416817903519,
1.030019879341125... |
func (rg *RouteGroup) Static(path string, dir string) *Route {
return rg.Any(path, func(c *Context) error {
if c.Request.Method != "GET" && c.Request.Method != "HEAD" {
return NewHTTPError(http.StatusMethodNotAllowed)
}
filePath := ""
urlPath := c.Request.URL.Path
prefix := strings.TrimSuffix(path, "/*")
... | [
-1.0019354820251465,
-0.18365010619163513,
0.7828114032745361,
0.06573782116174698,
-0.33291420340538025,
-0.1679125428199768,
0.31519246101379395,
-0.48840850591659546,
-0.98194819688797,
0.032458845525979996,
0.9202608466148376,
0.7542521953582764,
0.22795774042606354,
0.7837264537811279... |
func (rg *RouteGroup) To(methods, path string, handlers ...Handler) *Route {
mm := strings.Split(methods, ",")
if len(mm) == 1 {
return rg.add(methods, path, handlers)
}
r := rg.newRoute(methods, path)
for _, method := range mm {
r.routes = append(r.routes, rg.add(method, path, handlers))
}
return r
} | [
-0.7642683386802673,
0.5274890661239624,
0.27217158675193787,
-0.5193259716033936,
0.6105490922927856,
-0.30251237750053406,
-0.2024858444929123,
-0.002946827793493867,
-0.5497956871986389,
-0.6091606616973877,
-0.0966961607336998,
0.37551069259643555,
-0.2565993368625641,
0.06106719374656... |
func (rg *RouteGroup) Group(prefix string, handlers ...Handler) *RouteGroup {
if len(handlers) == 0 {
handlers = make([]Handler, len(rg.handlers))
copy(handlers, rg.handlers)
}
return newRouteGroup(rg.prefix+prefix, rg.router, handlers)
} | [
-0.7171632647514343,
0.6580100059509277,
0.1773945391178131,
-0.05663975328207016,
-0.7068391442298889,
0.5092332363128662,
0.001480194739997387,
0.0288858525454998,
0.05498971417546272,
-1.1696697473526,
-0.15692433714866638,
0.7188587784767151,
-0.1788950264453888,
0.616479218006134,
-... |
func (rg *RouteGroup) Use(handlers ...Handler) {
rg.handlers = append(rg.handlers, handlers...)
} | [
-1.1064319610595703,
0.4759117364883423,
0.6671932935714722,
-0.16735193133354187,
0.38234448432922363,
0.18413522839546204,
-0.20651523768901825,
-0.3228228986263275,
-0.7538971304893494,
-0.6319198608398438,
-0.1672961264848709,
0.34427356719970703,
-1.352396845817566,
0.8957806825637817... |
func (rg *RouteGroup) newRoute(method, path string) *Route {
return &Route{
group: rg,
method: method,
path: path,
template: buildURLTemplate(rg.prefix + path),
}
} | [
-0.209865003824234,
-0.15028336644172668,
0.3201480805873871,
0.21015365421772003,
-0.7715522646903992,
-0.5093903541564941,
-0.46557796001434326,
-0.5483800172805786,
-0.6816768050193787,
-0.5023040175437927,
0.7944146990776062,
0.8657909631729126,
-0.5632576942443848,
0.3342689871788025,... |
func combineHandlers(h1 []Handler, h2 []Handler) []Handler {
hh := make([]Handler, len(h1)+len(h2))
copy(hh, h1)
copy(hh[len(h1):], h2)
return hh
} | [
-0.548660933971405,
-1.0017857551574707,
0.7101455330848694,
0.8771803379058838,
0.3613523542881012,
0.5962247252464294,
-0.6033444404602051,
-0.2555692791938782,
-0.8279821872711182,
0.3201058804988861,
-0.3380751609802246,
0.6917980313301086,
-0.6390518546104431,
-0.29190778732299805,
... |
func buildURLTemplate(path string) string {
path = strings.TrimRight(path, "*")
template, start, end := "", -1, -1
for i := 0; i < len(path); i++ {
if path[i] == '<' && start < 0 {
start = i
} else if path[i] == '>' && start >= 0 {
name := path[start+1 : i]
for j := start + 1; j < i; j++ {
if path[j... | [
-1.0078505277633667,
-0.891856849193573,
0.8775885105133057,
-0.4808507561683655,
-1.0993595123291016,
-0.23433226346969604,
-0.37602293491363525,
0.33619749546051025,
-0.010563216172158718,
0.41533708572387695,
-0.3575104773044586,
-0.34175869822502136,
-0.15364064276218414,
-0.8072576522... |
func main() {
fmt.Println("---- Slices ------")
// init slice
slice := make([]string, 3) // in C# it will be like List<string>
fmt.Println("slice empty:", slice)
// different ways to add element in slice
slice[0] = "text1"
slice = append(slice, "text2")
slice = append(slice, "text3")
slice = append(slice,... | [
0.18762829899787903,
-0.6686449646949768,
0.9662649035453796,
-0.10208408534526825,
-0.5637259483337402,
0.12541887164115906,
0.43019935488700867,
0.9583465456962585,
-0.023709164932370186,
0.4789663553237915,
-0.31911009550094604,
0.5595253109931946,
0.03430972248315811,
-0.41266310214996... |
func (c *Consumer) reportError(d string, errmsg string, err error) {
//c.status.ErrorCount.Add(1)
log.Errorf("%s when processing %s: %s", errmsg, d, err)
} | [
-0.39564186334609985,
0.32021060585975647,
0.5446334481239319,
-0.004676472395658493,
0.20501765608787537,
-0.16805806756019592,
0.2954692244529724,
1.4008796215057373,
0.0921153724193573,
0.06002797931432724,
-0.08160735666751862,
-0.1403682976961136,
-0.1682870239019394,
0.87708365917205... |
func New(values ...interface{}) *List {
list := &List{}
if len(values) > 0 {
list.Add(values...)
}
return list
} | [
-0.1901009976863861,
-0.18953551352024078,
0.2677171528339386,
0.5880603194236755,
0.4509996771812439,
0.19098971784114838,
-1.1055659055709839,
0.5436540842056274,
0.23891861736774445,
-0.7949026226997375,
-0.4262722432613373,
-0.5509739518165588,
0.7461961507797241,
1.2109142541885376,
... |
func (list *List) Add(values ...interface{}) {
for _, value := range values {
newElement := &element{value: value}
if list.size == 0 {
list.first = newElement
list.last = newElement
} else {
list.last.next = newElement
list.last = newElement
}
list.size++
}
} | [
-1.1508337259292603,
0.14352652430534363,
0.45076093077659607,
0.3956843316555023,
1.1506849527359009,
0.8611116409301758,
-0.5909829139709473,
0.778283417224884,
0.7424595952033997,
-0.8480945229530334,
-0.48241233825683594,
-0.1034039855003357,
-0.2737124562263489,
1.7370810508728027,
... |
func (list *List) Append(values ...interface{}) {
list.Add(values...)
} | [
-0.1365843415260315,
0.25293195247650146,
0.11806918680667877,
0.9618973135948181,
0.6188775300979614,
0.7234708070755005,
-1.2188327312469482,
0.9354847073554993,
0.27107518911361694,
-1.0043760538101196,
-0.9781482815742493,
-0.15063467621803284,
0.05637029930949211,
1.9059511423110962,
... |
func (list *List) Prepend(values ...interface{}) {
// in reverse to keep passed order i.e. ["c","d"] -> Prepend(["a","b"]) -> ["a","b","c",d"]
for v := len(values) - 1; v >= 0; v-- {
newElement := &element{value: values[v], next: list.first}
list.first = newElement
if list.size == 0 {
list.last = newElement
... | [
-0.6165520548820496,
0.38993263244628906,
0.6139233112335205,
0.6309921741485596,
0.4112783670425415,
0.6724338531494141,
-0.5217224359512329,
0.49723854660987854,
0.5594174861907959,
-0.4971863329410553,
-0.45881345868110657,
-0.0011359701165929437,
-0.00705637875944376,
1.272254586219787... |
func (list *List) Get(index int) (interface{}, bool) {
if !list.withinRange(index) {
return nil, false
}
element := list.first
for e := 0; e != index; e, element = e+1, element.next {
}
return element.value, true
} | [
-0.9794802069664001,
0.5981201529502869,
0.6932248473167419,
0.04746369272470474,
0.06946446001529694,
-0.36205172538757324,
-0.3967466950416565,
0.21207988262176514,
0.6790449619293213,
-0.08661824464797974,
-1.7014315128326416,
0.16287624835968018,
-0.6087791919708252,
0.1650249063968658... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.