text
stringlengths
11
6.3k
embedding
listlengths
768
768
func TestAcquireSameConnID(t *testing.T) { defer func() { err := recover() if err != nil { require.Equal(t, "Fail in goroutine after TestAcquireSameConnID has completed", err) } }() ctx := context.Background() conn, err := mysql.Connect(ctx, &vtParams) require.NoError(t, err) defer conn.Close() // star...
[ 0.3403131365776062, -0.3693367838859558, 0.9547046422958374, 0.6469860076904297, 0.8463439345359802, -0.9542312026023865, 0.01021488755941391, -0.44357067346572876, 0.2503668963909149, -0.2732893228530884, -0.18723277747631073, 0.6807976365089417, 0.006575364153832197, -0.0314883254468441,...
func Distance(a, b string) (int, error) { if len(a) != len(b) { return 0, errors.New("both strings do not have the same length") } distance := 0 for i := 0; i < len(a); i++ { if a[i:i + 1] != b[i:i + 1] { distance += 1 } } return distance, nil }
[ 0.12551234662532806, -0.015879105776548386, 0.5536985993385315, -0.20826077461242676, -0.5087259411811829, 0.15834321081638336, 0.2791144847869873, 0.21425074338912964, 0.49295687675476074, 1.1420269012451172, 0.09038680791854858, 1.1097428798675537, -1.0158071517944336, -0.130399361252784...
func Dial() error { var err error _session, err = mgo.Dial("localhost") if err != nil { return err } err = _session.Ping() if err != nil { return err } _session.SetMode(mgo.Monotonic, true) return err }
[ 0.46145111322402954, -0.19140763580799103, 0.802751362323761, 0.2572880983352661, 0.47243785858154297, 0.6404668688774109, -0.5492860078811646, -0.2269328385591507, 0.04020150378346443, 0.49217724800109863, -0.021746095269918442, 0.3436678946018219, -0.012022252194583416, 0.108799003064632...
func mockEntryDetail() *EntryDetail { entry := NewEntryDetail() entry.TransactionCode = CheckingCredit entry.SetRDFI("121042882") entry.DFIAccountNumber = "123456789" entry.Amount = 100000000 entry.IndividualName = "Wade Arnold" entry.SetTraceNumber(mockBatchHeader().ODFIIdentification, 1) entry.IdentificationN...
[ 0.11728762090206146, 0.04300302267074585, 0.2575092315673828, -0.5392605662345886, 0.2685270309448242, 0.4807440936565399, -0.20678190886974335, 0.45863789319992065, -0.08309074491262436, -0.0531134158372879, -0.8202893733978271, 0.028926610946655273, -0.5139867067337036, 0.135115548968315...
func testMockEntryDetail(t testing.TB) { entry := mockEntryDetail() if err := entry.Validate(); err != nil { t.Error("mockEntryDetail does not validate and will break other tests") } if entry.TransactionCode != CheckingCredit { t.Error("TransactionCode dependent default value has changed") } if entry.DFIAccou...
[ 0.47816184163093567, 0.6161093711853027, 0.4854886829853058, 0.23031644523143768, 1.0510145425796509, 0.6089345216751099, 0.7661569714546204, 0.26115742325782776, -0.00013801822206005454, -0.07674764096736908, -0.7680789232254028, 0.3183547556400299, -0.11548449099063873, 1.006182670593261...
func TestMockEntryDetail(t *testing.T) { testMockEntryDetail(t) }
[ 0.523260235786438, 0.9459516406059265, 0.25738289952278137, 0.3815080225467682, 0.8503880500793457, 0.28037235140800476, 0.764601469039917, 0.29639044404029846, 0.46786028146743774, -0.3003106415271759, -1.1705988645553589, 0.8643823862075806, 0.05284576490521431, 1.401663899421692, -0.4...
func BenchmarkMockEntryDetail(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { testMockEntryDetail(b) } }
[ 0.666430652141571, 1.3990658521652222, 0.2591749131679535, -0.1984669715166092, 1.2771142721176147, -0.3616960644721985, 1.4657070636749268, -0.16215474903583527, -0.008220987394452095, 0.026460247114300728, 0.32471105456352234, 0.4700985550880432, -0.2797028720378876, 1.5795737504959106, ...
func testParseEntryDetail(t testing.TB) { var line = "62705320001912345 0000010500c-1 Arnold Wade DD0076401255655291" r := NewReader(strings.NewReader(line)) r.addCurrentBatch(NewBatchPPD(mockBatchPPDHeader())) r.currentBatch.SetHeader(mockBatchHeader()) r.line = line if err := r.p...
[ 1.0259249210357666, -0.22277270257472992, 0.6878097653388977, -0.22964246571063995, 0.6208228468894958, 0.5721763968467712, 0.20949618518352509, 0.21283407509326935, -0.015371987596154213, -0.4616929888725281, -0.2517704963684082, 0.6215930581092834, 0.20103925466537476, 0.1344838440418243...
func TestParseEntryDetail(t *testing.T) { testParseEntryDetail(t) }
[ 1.4007383584976196, 0.3600483238697052, 0.22816821932792664, -0.1568884253501892, 0.54734867811203, 0.549008309841156, 0.3965144455432892, 0.43130671977996826, 0.24164479970932007, -0.8561697602272034, -1.6480355262756348, 0.660308837890625, 0.18832243978977203, 0.4362720847129822, -0.23...
func BenchmarkParseEntryDetail(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { testParseEntryDetail(b) } }
[ 1.5176841020584106, 0.9239391088485718, 0.3071970045566559, -0.5235633254051208, 1.0773839950561523, -0.13056112825870514, 1.0717747211456299, 0.08319685608148575, -0.038471903651952744, -0.2803523540496826, 0.11778159439563751, 0.509650707244873, -0.2854035496711731, 0.7704421281814575, ...
func testEDString(t testing.TB) { var line = "62705320001912345 0000010500c-1 Arnold Wade DD0076401255655291" r := NewReader(strings.NewReader(line)) r.addCurrentBatch(NewBatchPPD(mockBatchPPDHeader())) r.currentBatch.SetHeader(mockBatchHeader()) r.line = line if err := r.parseEntr...
[ 1.2916048765182495, -1.2033052444458008, 0.42858028411865234, -0.3380042612552643, 0.27161794900894165, 0.4018985629081726, 0.375873863697052, -0.09880272299051285, 0.10370448976755142, -0.6508760452270508, 0.21102948486804962, 0.32158342003822327, -0.28323206305503845, -0.4047138094902038...
func TestEDString(t *testing.T) { testEDString(t) }
[ 0.6400929689407349, -0.7193952202796936, 0.12854257225990295, -0.18359726667404175, -0.08768560737371445, 0.7943338751792908, 1.4218157529830933, -0.6909321546554565, 0.14895890653133392, -0.7187862992286682, -0.44830113649368286, 0.2757827341556549, -0.06998224556446075, -0.34607273340225...
func BenchmarkEDString(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { testEDString(b) } }
[ 0.9827626347541809, 0.3953261077404022, 0.28962066769599915, -0.4574163556098938, 0.8366286754608154, 0.30608823895454407, 1.393337607383728, -0.49294209480285645, 0.16055625677108765, -0.25957491993904114, 0.5992261171340942, 0.17311444878578186, -0.7858809232711792, 0.22235189378261566, ...
func testValidateEDTransactionCode(t testing.TB) { ed := mockEntryDetail() ed.TransactionCode = 63 err := ed.Validate() if !base.Match(err, ErrTransactionCode) { t.Errorf("%T: %s", err, err) } }
[ 0.47103479504585266, 0.5094195008277893, 0.6079003810882568, -0.16969558596611023, 0.47708573937416077, 0.25832444429397583, 0.11024143546819687, 0.10157711803913116, 0.4957205355167389, 0.2778629660606384, 0.01820579543709755, -0.02435736358165741, 0.2369963377714157, 0.35196274518966675,...
func TestValidateEDTransactionCode(t *testing.T) { testValidateEDTransactionCode(t) }
[ 0.5743430852890015, 0.2838512659072876, 0.48061683773994446, 0.008276034146547318, 0.3403061628341675, 0.258689820766449, 0.5955420732498169, -0.24214008450508118, 0.14362993836402893, -0.6040171384811401, -0.3552950620651245, -0.2605801820755005, 0.5996953248977661, 0.41982409358024597, ...
func BenchmarkValidateEDTransactionCode(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { testValidateEDTransactionCode(b) } }
[ 1.1394182443618774, 0.827189564704895, 0.40087732672691345, -0.22837388515472412, 0.8120927214622498, -0.31916117668151855, 0.9494198560714722, -0.35501664876937866, -0.26198330521583557, -0.10568872094154358, 0.597888171672821, -0.2910967469215393, -0.23301969468593597, 0.6207777261734009...
func testEDFieldInclusion(t testing.TB) { ed := mockEntryDetail() ed.Amount = 0 err := ed.Validate() if !base.Match(err, nil) { t.Errorf("%T: %s", err, err) } }
[ 0.9554365873336792, 0.7849973440170288, 0.4167018532752991, 0.0007142057293094695, 0.5805366039276123, 1.2030439376831055, 0.8509252071380615, 1.1251786947250366, 0.5840972065925598, -0.3889041244983673, -0.7745007276535034, -0.33478468656539917, -0.7286847233772278, 0.24952687323093414, ...
func TestEDFieldInclusion(t *testing.T) { testEDFieldInclusion(t) }
[ 0.7532418966293335, 0.7626938819885254, 0.1413954496383667, 0.12453287839889526, 0.052499912679195404, 1.388576865196228, 1.782238245010376, 0.6172916293144226, 0.606697678565979, -0.44876205921173096, -1.6628540754318237, 0.09445200860500336, -0.37458547949790955, -0.5579025745391846, 0...
func BenchmarkEDFieldInclusion(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { testEDFieldInclusion(b) } }
[ 1.4505465030670166, 1.8608218431472778, 0.31674936413764954, -0.0901380255818367, 0.9866195917129517, 0.7322087287902832, 1.8171883821487427, 0.48949968814849854, 0.4238077998161316, -0.15126176178455353, -0.16050754487514496, 0.0398995615541935, -1.0363050699234009, 0.23391366004943848, ...
func testEDdfiAccountNumberAlphaNumeric(t testing.TB) { ed := mockEntryDetail() ed.DFIAccountNumber = "®" err := ed.Validate() if !base.Match(err, ErrNonAlphanumeric) { t.Errorf("%T: %s", err, err) } }
[ -0.17226479947566986, 0.20715290307998657, 0.4476478695869446, -0.022906698286533356, 0.1257771998643875, 0.21867480874061584, 0.868198573589325, 0.5520604848861694, 0.40067458152770996, -0.8372780084609985, 0.4012647867202759, -0.2340720295906067, 0.218031108379364, -0.16959963738918304, ...
func TestEDdfiAccountNumberAlphaNumeric(t *testing.T) { testEDdfiAccountNumberAlphaNumeric(t) }
[ -0.7674582004547119, 0.32473284006118774, 0.39703962206840515, -0.21993951499462128, 0.32436996698379517, 0.18153990805149078, 1.2014893293380737, 0.18311762809753418, 0.20060719549655914, -1.3733097314834595, -0.15855403244495392, -0.19312265515327454, 0.5846860408782959, -0.0054144239984...
func BenchmarkEDdfiAccountNumberAlphaNumeric(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { testEDdfiAccountNumberAlphaNumeric(b) } }
[ -0.4680662155151367, 1.290482759475708, 0.34972912073135376, -0.19519859552383423, 1.1828019618988037, -0.14991439878940582, 2.0325546264648438, -0.23580266535282135, 0.31920623779296875, -0.7870029211044312, 0.9660629630088806, -0.21159188449382782, 0.04988265782594681, 0.4971443712711334...
func testEDIdentificationNumberAlphaNumeric(t testing.TB) { ed := mockEntryDetail() ed.IdentificationNumber = "®" err := ed.Validate() if !base.Match(err, ErrNonAlphanumeric) { t.Errorf("%T: %s", err, err) } }
[ -0.46782395243644714, -0.09942052513360977, 0.3321961760520935, 0.15812470018863678, -0.02541329711675644, 0.7863308787345886, 0.5980122685432434, 0.8412065505981445, 0.7334554195404053, -0.28793585300445557, -0.43059229850769043, 0.008236762136220932, -0.08556176722049713, 0.1483952552080...
func TestEDIdentificationNumberAlphaNumeric(t *testing.T) { testEDIdentificationNumberAlphaNumeric(t) }
[ -1.1966931819915771, -0.5261991024017334, 0.25011271238327026, 0.5378726124763489, 0.15286166965961456, 0.8361405730247498, 1.477411150932312, 0.36331093311309814, 0.8662282228469849, -0.7812305688858032, -1.025451898574829, 0.19362567365169525, 0.36139944195747375, -0.09368237853050232, ...
func BenchmarkEDIdentificationNumberAlphaNumeric(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { testEDIdentificationNumberAlphaNumeric(b) } }
[ -0.3225138783454895, 0.6578982472419739, 0.2960154116153717, 0.0870388075709343, 1.3944611549377441, 0.48527178168296814, 1.5970985889434814, -0.12318288534879684, 0.6017543077468872, -0.3051314353942871, 0.06514012068510056, 0.21710510551929474, -0.22555431723594666, 0.2594950497150421, ...
func testEDIndividualNameAlphaNumeric(t testing.TB) { ed := mockEntryDetail() ed.IndividualName = "W®DE" err := ed.Validate() if !base.Match(err, ErrNonAlphanumeric) { t.Errorf("%T: %s", err, err) } }
[ 0.07959005981683731, -0.03952508419752121, 0.43421101570129395, -0.06566569209098816, -0.46265605092048645, 1.5324472188949585, 0.25106799602508545, 0.7583197355270386, 0.33201807737350464, -0.2578558921813965, 0.02240043133497238, 0.16213934123516083, -0.14468611776828766, 0.2990898489952...
func TestEDIndividualNameAlphaNumeric(t *testing.T) { testEDIndividualNameAlphaNumeric(t) }
[ -0.6033927798271179, -0.40375787019729614, 0.3098825514316559, 0.47589021921157837, -0.31636035442352295, 1.5807729959487915, 1.1288750171661377, 0.24062255024909973, -0.110240638256073, -0.7820220589637756, -0.4584536552429199, 0.8020209074020386, 0.427910178899765, -0.059734147042036057,...
func BenchmarkEDIndividualNameAlphaNumeric(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { testEDIndividualNameAlphaNumeric(b) } }
[ -0.16299983859062195, 0.7106484770774841, 0.406382292509079, 0.03482348471879959, 0.7285525798797607, 0.9963101148605347, 1.5265597105026245, -0.2532002031803131, -0.10432782024145126, -0.289553701877594, 0.41149184107780457, 0.5402012467384338, -0.17146851122379303, 0.24234741926193237, ...
func testEDDiscretionaryDataAlphaNumeric(t testing.TB) { ed := mockEntryDetail() ed.DiscretionaryData = "®!" err := ed.Validate() if !base.Match(err, ErrNonAlphanumeric) { t.Errorf("%T: %s", err, err) } }
[ 0.32581669092178345, 0.44853687286376953, 0.423048734664917, -0.08774445205926895, -0.07183757424354553, 1.161849021911621, -0.053899332880973816, 0.8247700333595276, 0.2081129550933838, -0.35093870759010315, 0.017455583438277245, 0.7526730298995972, 0.44986793398857117, 0.3589185178279876...
func TestEDDiscretionaryDataAlphaNumeric(t *testing.T) { testEDDiscretionaryDataAlphaNumeric(t) }
[ -0.2645185589790344, 0.15487396717071533, 0.3526519238948822, -0.08034981042146683, 0.2009071260690689, 0.9845748543739319, 0.7609906792640686, 0.4246978461742401, 0.4173959493637085, -1.378105878829956, -0.1129937693476677, 0.7331060171127319, 1.6026352643966675, 0.026257922872900963, 0...
func BenchmarkEDDiscretionaryDataAlphaNumeric(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { testEDDiscretionaryDataAlphaNumeric(b) } }
[ 0.02734747901558876, 1.3168965578079224, 0.3596905469894409, -0.48048290610313416, 1.364165186882019, 0.5660223364830017, 1.1769770383834839, -0.021834049373865128, 0.3721083104610443, -0.849337100982666, 0.800787091255188, 0.4185715615749359, 0.401559442281723, 0.5714743733406067, 0.263...
func testEDisCheckDigit(t testing.TB) { ed := mockEntryDetail() ed.CheckDigit = "1" err := ed.Validate() if !base.Match(err, NewErrValidCheckDigit(7)) { t.Errorf("%T: %s", err, err) } }
[ 0.263409823179245, -0.0968129113316536, 0.39808353781700134, 0.6107538938522339, 0.48834308981895447, 0.6091664433479309, 0.18526063859462738, 0.08352980017662048, 0.38650989532470703, 0.17728005349636078, -0.354946106672287, 0.03153757378458977, -0.6582249402999878, 1.6186271905899048, ...
func TestEDisCheckDigit(t *testing.T) { testEDisCheckDigit(t) }
[ 0.19278109073638916, 0.10017743706703186, 0.21236467361450195, 0.9123506546020508, 0.5411567091941833, 0.12900319695472717, 1.0015658140182495, -0.2638634443283081, -0.012008167803287506, -0.5056502819061279, -1.0991487503051758, 0.2739514708518982, 0.17427043616771698, 0.949020266532898, ...
func BenchmarkEDisCheckDigit(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { testEDisCheckDigit(b) } }
[ 0.7409823536872864, 1.1910109519958496, 0.2643594741821289, 0.2904663681983948, 1.0638800859451294, 0.014761955477297306, 1.433610439300537, -0.4356541931629181, 0.033721067011356354, 0.033028293401002884, 0.2709096074104309, 0.19793260097503662, -0.3238714039325714, 1.1859873533248901, ...
func testEDSetRDFI(t testing.TB) { ed := NewEntryDetail() ed.SetRDFI("810866774") if ed.RDFIIdentification != "81086677" { t.Error("RDFI identification") } if ed.CheckDigit != "4" { t.Error("Unexpected check digit") } }
[ 0.245325967669487, 0.07492010295391083, 0.5418515801429749, -0.08226529508829117, 0.9885098934173584, 0.5761895775794983, 0.42431098222732544, -0.06677434593439102, 0.07803617417812347, -0.11450730264186859, -1.5652207136154175, 0.3391627371311188, -0.822934627532959, 0.003925628494471312,...
func TestEDSetRDFI(t *testing.T) { testEDSetRDFI(t) }
[ -0.22601911425590515, 0.23837542533874512, 0.3137277364730835, 0.16265182197093964, 0.4674836993217468, -0.043504197150468826, 1.536693811416626, -0.8809634447097778, -0.4059845507144928, -0.4551069736480713, -1.661286473274231, 0.39855074882507324, -0.6331375241279602, 0.03618179634213447...
func BenchmarkEDSetRDFI(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { testEDSetRDFI(b) } }
[ 0.3576505184173584, 1.0885629653930664, 0.3091234564781189, -0.14887724816799164, 1.1845977306365967, -0.48606669902801514, 1.5793612003326416, -0.7147722840309143, -0.3416600823402405, -0.0833430364727974, -0.15743352472782135, 0.1579580456018448, -0.916180431842804, 0.6764257550239563, ...
func testEDFieldInclusionTransactionCode(t testing.TB) { entry := mockEntryDetail() entry.TransactionCode = 0 err := entry.Validate() if !base.Match(err, ErrConstructor) { t.Errorf("%T: %s", err, err) } }
[ 1.1956623792648315, 0.8363316059112549, 0.46537068486213684, -0.4008348882198334, 0.3754596710205078, 0.15911965072155, 1.1805756092071533, 1.2215718030929565, 0.49023714661598206, 0.4569399058818817, -0.07128249108791351, 0.14928187429904938, -0.5165733695030212, 0.4426809847354889, 0.8...
func TestEDFieldInclusionTransactionCode(t *testing.T) { testEDFieldInclusionTransactionCode(t) }
[ 1.3838531970977783, 0.8848320841789246, 0.24762655794620514, 0.05601194500923157, -0.128623828291893, 0.11311886459589005, 1.7919461727142334, 0.6094028949737549, 0.7238181829452515, 0.373022198677063, -0.5980806946754456, -0.0349750742316246, -0.16097049415111542, -0.39730963110923767, ...
func BenchmarkEDFieldInclusionTransactionCode(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { testEDFieldInclusionTransactionCode(b) } }
[ 1.7170566320419312, 1.5921114683151245, 0.4442594349384308, -0.15061040222644806, 0.9715027809143066, -0.16839005053043365, 1.814713716506958, 0.2390434890985489, 0.2551283538341522, 0.4527064561843872, 0.3002866506576538, -0.08653957396745682, -0.6755542159080505, 0.010607789270579815, ...
func testEDFieldInclusionRDFIIdentification(t testing.TB) { entry := mockEntryDetail() entry.RDFIIdentification = "" err := entry.Validate() if !base.Match(err, ErrConstructor) { t.Errorf("%T: %s", err, err) } }
[ 0.6171937584877014, 0.7153786420822144, 0.3026927709579468, 0.034900106489658356, 0.9890192747116089, 0.9034655094146729, 0.8753995895385742, 0.8181491494178772, 0.77218097448349, 0.14018741250038147, -1.2843033075332642, -0.08345761150121689, -1.261145830154419, -0.33243486285209656, 1....
func TestEDFieldInclusionRDFIIdentification(t *testing.T) { testEDFieldInclusionRDFIIdentification(t) }
[ 0.6113904118537903, 0.7206594944000244, 0.19712041318416595, 0.6410050988197327, 0.7992581129074097, 0.8310973048210144, 1.7421427965164185, 0.9478344917297363, 0.8266445994377136, -0.5650730729103088, -1.7816466093063354, -0.23107488453388214, -1.0398167371749878, -0.6579265594482422, 0...
func BenchmarkEDFieldInclusionRDFIIdentification(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { testEDFieldInclusionRDFIIdentification(b) } }
[ 0.8952063322067261, 1.5406434535980225, 0.23044966161251068, 0.29358169436454773, 1.5893977880477905, 0.35253623127937317, 1.7314395904541016, 0.42494234442710876, 0.44597718119621277, -0.10802548378705978, -0.5799576640129089, -0.1256437748670578, -1.314858078956604, -0.02988590858876705,...
func testEDFieldInclusionDFIAccountNumber(t testing.TB) { entry := mockEntryDetail() entry.DFIAccountNumber = "" err := entry.Validate() if !base.Match(err, ErrConstructor) { t.Errorf("%T: %s", err, err) } }
[ 0.6185833811759949, 0.9737592339515686, 0.4874114394187927, 0.14737355709075928, 0.5667537450790405, 0.1827278584241867, 1.7619622945785522, 0.968768298625946, 0.7259765267372131, -1.017076015472412, -0.31513872742652893, 0.306919127702713, -0.5462273955345154, -0.07771289348602295, 1.29...
func TestEDFieldInclusionDFIAccountNumber(t *testing.T) { testEDFieldInclusionDFIAccountNumber(t) }
[ 0.2791469991207123, 0.9915026426315308, 0.37984317541122437, 0.05505398288369179, -0.04810686782002449, 0.14672289788722992, 2.044699192047119, 0.48213475942611694, 0.44147980213165283, -1.441965937614441, -0.9182402491569519, -0.016663582995533943, -0.18592232465744019, -0.050116747617721...
func BenchmarkEDFieldInclusionDFIAccountNumber(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { testEDFieldInclusionDFIAccountNumber(b) } }
[ 0.7444263696670532, 1.710836410522461, 0.3312455713748932, -0.08007089793682098, 0.9301686882972717, -0.011623063124716282, 2.124969244003296, 0.19032861292362213, 0.18950451910495758, -0.8312506079673767, 0.11808523535728455, -0.12611617147922516, -0.7219927906990051, 0.15824586153030396,...
func testEDFieldInclusionIndividualName(t testing.TB) { entry := mockEntryDetail() entry.IndividualName = "" err := entry.Validate() if !base.Match(err, ErrConstructor) { t.Errorf("%T: %s", err, err) } }
[ 0.5677759647369385, 0.9524531960487366, 0.42954036593437195, 0.051090411841869354, 0.26964128017425537, 1.5408974885940552, 0.8228464126586914, 1.0242897272109985, 0.43082618713378906, -0.42863398790359497, -0.5081494450569153, 0.45506036281585693, -0.9074180722236633, -0.04955666139721870...
func TestEDFieldInclusionIndividualName(t *testing.T) { testEDFieldInclusionIndividualName(t) }
[ 0.5715060830116272, 1.0653140544891357, 0.3427627384662628, 0.6705761551856995, -0.32962092757225037, 1.616895079612732, 1.5620753765106201, 0.729467511177063, 0.15725155174732208, -0.8090887665748596, -1.0473897457122803, 0.228682279586792, -0.5563662052154541, -0.3602292537689209, -0.0...
func BenchmarkEDFieldInclusionIndividualName(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { testEDFieldInclusionIndividualName(b) } }
[ 0.9242846965789795, 1.830396056175232, 0.4329065680503845, 0.3186386823654175, 0.6216105818748474, 0.9462895393371582, 1.704215407371521, 0.21028642356395721, -0.031819961965084076, -0.29179999232292175, -0.03858105093240738, 0.22967016696929932, -0.9356005787849426, 0.15138205885887146, ...
func testEDFieldInclusionTraceNumber(t testing.TB) { entry := mockEntryDetail() entry.TraceNumber = "0" err := entry.Validate() // TODO: are we expecting to see no error here? if !base.Match(err, nil) { t.Errorf("%T: %s", err, err) } }
[ 1.1064436435699463, 0.6318966150283813, 0.49588149785995483, 0.12113399058580399, 0.8102579116821289, 0.9634198546409607, 1.3598552942276, 1.3557125329971313, 0.8321927189826965, -0.5949552059173584, -0.739519476890564, 0.1980988085269928, -0.48084792494773865, 0.30729588866233826, 0.503...
func TestEDFieldInclusionTraceNumber(t *testing.T) { testEDFieldInclusionTraceNumber(t) }
[ 1.1336009502410889, 0.7470795512199402, 0.2195189893245697, 0.5504825711250305, 0.1834023892879486, 0.7857487201690674, 2.6462795734405518, 0.49390941858291626, 0.7162728905677795, -0.6271609663963318, -1.2353169918060303, -0.1619153767824173, -0.16535809636116028, -0.5095287561416626, -...
func BenchmarkEDFieldInclusionTraceNumber(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { testEDFieldInclusionTraceNumber(b) } }
[ 1.4227653741836548, 1.576311469078064, 0.2953999936580658, 0.22721658647060394, 1.073746919631958, 0.40376242995262146, 2.250746011734009, 0.23916280269622803, 0.39782339334487915, -0.3487754762172699, -0.00263340026140213, -0.2505778670310974, -0.6959599256515503, 0.0892019122838974, -0...
func testEDAddAddenda99(t testing.TB) { entry := mockEntryDetail() entry.Addenda99 = mockAddenda99() entry.Category = CategoryReturn entry.AddendaRecordIndicator = 1 if entry.Category != CategoryReturn { t.Error("Addenda99 added and isReturn is false") } if entry.AddendaRecordIndicator != 1 { t.Error("Addend...
[ 0.2987486720085144, 0.42305105924606323, 0.3792809545993805, 0.22925138473510742, 0.3373354375362396, 1.0429340600967407, 0.7065157890319824, 0.6840860247612, 0.8873156905174255, -0.6542437076568604, 0.24915120005607605, 0.45309698581695557, -0.1943863481283188, 0.41160306334495544, 0.92...
func TestEDAddAddenda99(t *testing.T) { testEDAddAddenda99(t) }
[ 1.081155776977539, 0.5204241871833801, 0.22947312891483307, 0.1572183221578598, 0.04583080857992172, 0.9411861300468445, 0.9222095012664795, -0.1055886298418045, 1.2016310691833496, -1.5996758937835693, -0.3898138403892517, 1.1376606225967407, 0.5476741194725037, 0.2846659719944, 0.69608...
func BenchmarkEDAddAddenda99(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { testEDAddAddenda99(b) } }
[ 1.0656492710113525, 1.23762047290802, 0.2947668731212616, -0.48557981848716736, 0.9308333396911621, 0.7010712623596191, 1.3006802797317505, -0.3868020474910736, 0.8093883395195007, -0.8570053577423096, 0.6731564402580261, 0.7209411859512329, 0.062001556158065796, 0.8470574617385864, 0.09...
func testEDAddAddenda99Twice(t testing.TB) { entry := mockEntryDetail() entry.Addenda99 = mockAddenda99() entry.Addenda99 = mockAddenda99() entry.Category = CategoryReturn if entry.Category != CategoryReturn { t.Error("Addenda99 added and Category is not CategoryReturn") } }
[ 0.3710489869117737, 0.4257566034793854, 0.4887606203556061, 0.16679713129997253, 0.84639573097229, 0.7465893030166626, 0.4082212746143341, -0.2511691451072693, 0.7272685766220093, -0.6953429579734802, -0.3836093842983246, 0.5176475644111633, 0.32955116033554077, 0.4730895459651947, 0.665...
func TestEDAddAddenda99Twice(t *testing.T) { testEDAddAddenda99Twice(t) }
[ 0.559352695941925, 0.6127209663391113, 0.31920570135116577, 0.11703550070524216, 0.43520331382751465, 0.7428351640701294, 0.5103055238723755, -0.9736630916595459, 0.6519640684127808, -1.3769989013671875, -0.7906785011291504, 0.753714382648468, 0.24081099033355713, 0.461980402469635, 0.61...
func BenchmarkEDAddAddenda99Twice(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { testEDAddAddenda99Twice(b) } }
[ 0.7525779604911804, 1.086901068687439, 0.2972653806209564, -0.34437015652656555, 1.1548181772232056, 0.43177247047424316, 1.1481709480285645, -1.0156941413879395, 0.4748319387435913, -0.8227934837341309, 0.2503550350666046, 0.6730799078941345, -0.013890443369746208, 0.8143743276596069, 0...
func testEDCreditOrDebit(t testing.TB) { entry := mockEntryDetail() if entry.CreditOrDebit() != "C" { // our mock's default t.Errorf("TransactionCode %v expected a Credit(C) got %v", entry.TransactionCode, entry.CreditOrDebit()) } // TransactionCode -> C or D var cases = map[int]string{ // invalid -1: "", ...
[ 0.27093133330345154, 0.06566432863473892, 0.5595733523368835, -0.9570896625518799, 1.0558276176452637, 0.39773330092430115, 0.7591041326522827, -0.13548240065574646, 0.13618691265583038, -0.18654966354370117, -0.33653005957603455, 0.220028817653656, -0.30244922637939453, 0.4040064811706543...
func TestEDCreditOrDebit(t *testing.T) { testEDCreditOrDebit(t) }
[ -0.054509419947862625, 0.11294522881507874, 0.06614167988300323, -0.04131943732500076, 1.169395089149475, 0.3620336353778839, 0.8563578128814697, -1.0221836566925049, 0.09527451545000076, -0.8889763951301575, -0.3586420714855194, 0.6979676485061646, -0.3169352114200592, -0.2150091230869293...
func BenchmarkEDCreditOrDebit(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { testEDCreditOrDebit(b) } }
[ 0.29470202326774597, 1.0834596157073975, 0.3306916356086731, -0.18965044617652893, 1.7378668785095215, 0.1477411538362503, 1.1426191329956055, -0.8164228200912476, -0.039633698761463165, -0.3680937588214874, 0.5001057982444763, 0.2538217604160309, -0.8873924016952515, 0.2968026399612427, ...
func testValidateEDCheckDigit(t testing.TB) { ed := mockEntryDetail() ed.CheckDigit = "XYZ" err := ed.Validate() if !base.Match(err, &strconv.NumError{}) { t.Errorf("%T: %s", err, err) } }
[ 0.6947635412216187, -0.12203782796859741, 0.31233444809913635, 0.21753543615341187, 0.4261679947376251, 1.1466376781463623, 0.1754613220691681, 0.17418064177036285, 0.18402858078479767, -0.477960467338562, -0.4199645519256592, 0.12450097501277924, -0.24655570089817047, 1.205811619758606, ...
func TestValidateEDCheckDigit(t *testing.T) { testValidateEDCheckDigit(t) }
[ 0.5037151575088501, 0.23580880463123322, 0.30174776911735535, 0.806272029876709, 0.5182792544364929, 1.0536590814590454, 0.8532787561416626, -0.47136855125427246, 0.06272325664758682, -1.2806544303894043, -0.2669401168823242, 0.023254629224538803, 0.6355499029159546, 1.0971333980560303, ...
func BenchmarkValidateEDCheckDigit(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { testValidateEDCheckDigit(b) } }
[ 1.027496576309204, 0.9855239987373352, 0.18487578630447388, 0.4623048007488251, 0.8574767112731934, 0.3155561685562134, 1.2701574563980103, -0.5340332388877869, 0.02575918659567833, -0.6146782040596008, 0.6701295375823975, -0.02195228450000286, -0.16358953714370728, 1.2064642906188965, -...
func (u *User) Valid() error { if u.BearerToken != "" { return nil } if u.Username == "" { return errors.New("Empty username") } if u.ApiToken == "" && u.Password == "" { return errors.New("Empty API token and password") } return nil }
[ 0.429560124874115, -0.7347007393836975, 0.5466477870941162, 0.1950037032365799, -0.024170737713575363, 0.9857987761497498, -0.9172705411911011, 0.4965430796146393, -0.4163648188114166, -0.37540242075920105, -0.2752614915370941, -0.04183537885546684, -0.3870042860507965, -0.4220706820487976...
func (s *Server) Valid() error { if len(s.Users) == 0 { return fmt.Errorf("%s server has no users", s.Name) } if s.URL == "" { return fmt.Errorf("%s server has an empty URL", s.Name) } for _, u := range s.Users { err := u.Valid() if err != nil { return err } } return nil }
[ -0.4668252766132355, -0.473707914352417, 0.4155116677284241, -0.1654815822839737, -0.28681471943855286, 1.05179762840271, -0.019938427954912186, 1.0191575288772583, -0.4728148281574249, -0.04033840075135231, 0.34045717120170593, 0.9740801453590393, -0.6316118836402893, 0.9744012355804443, ...
func (s *Server) PipelineUser() User { for _, user := range s.Users { if user.Kind == UserKindPipeline { return *user } } if len(s.Users) > 0 { return *s.Users[0] } return User{} }
[ -0.5493553876876831, -0.14629200100898743, 0.24201074242591858, 0.12456430494785309, -0.5114458203315735, -0.6109789609909058, 0.13579444587230682, -0.17007872462272644, -0.46124786138534546, -0.06283283233642578, 0.2125561237335205, 0.6277502179145813, -0.5642209053039551, -0.449387311935...
func (c *Config) Valid() error { if len(c.Servers) == 0 { return fmt.Errorf("No servers in config") } for _, s := range c.Servers { err := s.Valid() if err != nil { return err } } return nil }
[ -0.17781536281108856, -0.34311962127685547, 0.5364846587181091, -0.18552839756011963, 0.460235595703125, 1.0713082551956177, -0.03454797714948654, 0.44515278935432434, -0.9107793569564819, 0.5174668431282043, 0.14864449203014374, 0.4486365020275116, -0.15530997514724731, 0.6739381551742554...
func (s Service) Invoke(ctx context.Context, method string, params json.RawMessage) zenrpc.Response { resp := zenrpc.Response{} var err error switch method { case RPC.Service.Getinfo: resp.Set(s.Getinfo()) case RPC.Service.GetNewAddress: resp.Set(s.GetNewAddress()) case RPC.Service.ValidateAddress: var a...
[ -0.20555360615253448, 0.25264719128608704, 1.2848384380340576, -0.4909936785697937, -0.412718266248703, -1.2364259958267212, 0.0023648685310035944, -0.5698699951171875, 0.3517530560493469, 0.7261577844619751, 0.658887505531311, 0.4690690338611603, -0.9947173595428467, -0.03562945872545242,...
func (client *Client) Instances() ([]Instance, error) { output := new(bytes.Buffer) if err := client.director.RunAuthenticatedCommand( output, client.stderr, false, "--deployment", concourseDeploymentName, "instances", "--json", ); err != nil { // if there is an error, copy the stdout to the main st...
[ -1.446376919746399, 0.23264339566230774, 0.399535208940506, -1.4386019706726074, -0.25289982557296753, -0.001880024210549891, -0.7318797707557678, 0.4613063931465149, -0.4435391128063202, 0.7409080862998962, -0.039356622844934464, 0.5643010139465332, -0.4199742376804352, 0.1837600618600845...
func NewFoodmenuController(router gin.IRouter, client *ent.Client) *FoodmenuController { fc := &FoodmenuController{ client: client, router: router, } fc.register() return fc }
[ -0.6307876706123352, 0.013302657753229141, 0.16013003885746002, -0.08897614479064941, -0.10759235918521881, -0.9588048458099365, -0.359035849571228, -0.4671365022659302, -0.6688740849494934, -0.4413779079914093, -0.6714853048324585, -0.39370864629745483, 0.5324118733406067, 0.8815744519233...
func (ctl *FoodmenuController) register() { foodmenus := ctl.router.Group("/foodmenus") foodmenus.GET("", ctl.ListFoodmenu) // CRUD foodmenus.POST("", ctl.CreateFoodmenu) foodmenus.GET(":id", ctl.GetFoodmenu) foodmenus.PUT(":id", ctl.UpdateFoodmenu) foodmenus.DELETE(":id", ctl.DeleteFoodmenu) }
[ -1.078519582748413, 0.745520830154419, 0.7110843658447266, 0.4925452768802643, 1.5710662603378296, -1.119659662246704, -0.21962060034275055, 0.37355944514274597, -0.4145306944847107, -0.5586702823638916, -0.8231518864631653, -0.11245813965797424, 0.43024709820747375, 0.8595399856567383, ...
func NewLinuxPlatformFlavor(hostReport *hcTypes.HostManifest, tagCertificate *cm.X509AttributeCertificate) PlatformFlavor { log.Trace("flavor/types/linux_platform_flavor:NewLinuxPlatformFlavor() Entering") defer log.Trace("flavor/types/linux_platform_flavor:NewLinuxPlatformFlavor() Leaving") return LinuxPlatformFla...
[ 0.9394205212593079, -0.7490527629852295, 0.13535238802433014, -0.08135563880205154, -1.0230830907821655, 0.5472805500030518, -0.9997125864028931, 0.8514862060546875, -0.6561481356620789, -0.5344746112823486, -0.1713372766971588, 0.10277896374464035, -1.101567268371582, 0.8560296297073364, ...
func (rhelpf LinuxPlatformFlavor) GetFlavorPartRaw(name cf.FlavorPart) ([]cm.Flavor, error) { log.Trace("flavor/types/linux_platform_flavor:GetFlavorPartRaw() Entering") defer log.Trace("flavor/types/linux_platform_flavor:GetFlavorPartRaw() Leaving") switch name { case cf.FlavorPartPlatform: return rhelpf.getPla...
[ 0.09014226496219635, -0.6116752028465271, 0.6091611385345459, 0.17559215426445007, -0.8689994215965271, -0.8533873558044434, -0.7240629196166992, -0.19048745930194855, -0.1270870864391327, -0.5378366112709045, -0.15017688274383545, -0.005394513253122568, -0.47499969601631165, 1.20491921901...
func (rhelpf LinuxPlatformFlavor) GetFlavorPartNames() ([]cf.FlavorPart, error) { log.Trace("flavor/types/linux_platform_flavor:GetFlavorPartNames() Entering") defer log.Trace("flavor/types/linux_platform_flavor:GetFlavorPartNames() Leaving") flavorPartList := []cf.FlavorPart{cf.FlavorPartPlatform, cf.FlavorPartOs,...
[ 0.546210527420044, -0.6836837530136108, 0.4604335427284241, -0.05292455106973648, 0.13878461718559265, -0.005185860674828291, -1.0674571990966797, 0.2147378772497177, -0.6418406367301941, 0.5467944145202637, 0.38041555881500244, -0.12795674800872803, -1.1231601238250732, 1.349881649017334,...
func (rhelpf LinuxPlatformFlavor) getPcrList(flavorPart cf.FlavorPart) []int { log.Trace("flavor/types/linux_platform_flavor:getPcrList() Entering") defer log.Trace("flavor/types/linux_platform_flavor:getPcrList() Leaving") var pcrSet = make(map[int]bool) var pcrs []int var isTboot bool hostInfo := *rhelpf.Host...
[ 0.3397580683231354, -0.25198403000831604, 0.6408320069313049, 0.04790191352367401, 0.3941131830215454, -0.3516189455986023, -0.47416451573371887, 0.2614922821521759, -1.098318099975586, 0.3743443191051483, -0.005074996966868639, -0.3173045814037323, -1.2941067218780518, 1.788377046585083, ...
func (rhelpf LinuxPlatformFlavor) eventLogRequired(flavorPartName cf.FlavorPart) bool { log.Trace("flavor/types/linux_platform_flavor:eventLogRequired() Entering") defer log.Trace("flavor/types/linux_platform_flavor:eventLogRequired() Leaving") // defaults to false var eventLogRequired bool switch flavorPartName...
[ -0.2749870717525482, -0.29426804184913635, 0.6571404933929443, 0.06119736656546593, -0.6089974641799927, 0.2571091055870056, -0.7001705169677734, 0.32650524377822876, -0.8137255907058716, 0.20211364328861237, -0.2259545624256134, 0.254260390996933, -0.48835569620132446, 1.2672288417816162,...
func (rhelpf LinuxPlatformFlavor) getPlatformFlavor() ([]cm.Flavor, error) { log.Trace("flavor/types/linux_platform_flavor:getPlatformFlavor() Entering") defer log.Trace("flavor/types/linux_platform_flavor:getPlatformFlavor() Leaving") var errorMessage = "Error during creation of PLATFORM flavor" var platformPcrs ...
[ 0.3305061161518097, -0.513036847114563, 0.6282946467399597, 0.5503597855567932, 0.33246490359306335, 0.009797051548957825, 0.07255852967500687, 0.2836998701095581, -1.3865538835525513, -0.28072378039360046, -0.07352365553379059, 0.369493693113327, -0.7097328901290894, 1.8390815258026123, ...
func (rhelpf LinuxPlatformFlavor) getOsFlavor() ([]cm.Flavor, error) { log.Trace("flavor/types/linux_platform_flavor:getOsFlavor() Entering") defer log.Trace("flavor/types/linux_platform_flavor:getOsFlavor() Leaving") var errorMessage = "Error during creation of OS flavor" var err error var osPcrs = rhelpf.getPcr...
[ 0.18895402550697327, -0.29654866456985474, 0.46648335456848145, 0.2844758927822113, 0.23296694457530975, -0.45399782061576843, -0.2939613163471222, 0.40806132555007935, -1.034321665763855, -0.2850610613822937, 0.04453223943710327, 0.5490987300872803, 0.011366614140570164, 1.388045310974121...
func (rhelpf LinuxPlatformFlavor) getHostUniqueFlavor() ([]cm.Flavor, error) { log.Trace("flavor/types/linux_platform_flavor:getHostUniqueFlavor() Entering") defer log.Trace("flavor/types/linux_platform_flavor:getHostUniqueFlavor() Leaving") var errorMessage = "Error during creation of HOST_UNIQUE flavor" var err ...
[ 0.2807968556880951, -0.44418442249298096, 0.6365129351615906, 0.34824877977371216, 0.32421165704727173, -0.008411628194153309, 0.017745185643434525, 1.3905878067016602, -1.1735813617706299, -0.520775318145752, -0.41131341457366943, 0.9655126333236694, -0.14028137922286987, 0.55664342641830...
func (rhelpf LinuxPlatformFlavor) getAssetTagFlavor() ([]cm.Flavor, error) { log.Trace("flavor/types/linux_platform_flavor:getAssetTagFlavor() Entering") defer log.Trace("flavor/types/linux_platform_flavor:getAssetTagFlavor() Leaving") var errorMessage = "Error during creation of ASSET_TAG flavor" var err error ...
[ 0.08289596438407898, -0.2641257643699646, 0.6130529046058655, -0.03457706794142723, 0.010394701734185219, -0.447287380695343, -0.09314064681529999, -0.3450023829936981, -1.5424518585205078, 0.13397853076457977, 0.15149638056755066, 0.30063149333000183, -0.24258026480674744, 1.2606701850891...
func (rhelpf LinuxPlatformFlavor) getDefaultSoftwareFlavor() ([]cm.Flavor, error) { log.Trace("flavor/types/linux_platform_flavor:getDefaultSoftwareFlavor() Entering") defer log.Trace("flavor/types/linux_platform_flavor:getDefaultSoftwareFlavor() Leaving") var softwareFlavors []cm.Flavor var errorMessage = cf.SOFT...
[ 0.45303207635879517, -0.05548727139830589, 0.3754754066467285, 1.5585678815841675, 0.8303744196891785, 0.049834124743938446, -0.30025994777679443, 0.10056008398532867, -0.11604961007833481, -0.7291587591171265, -0.3881852328777313, -0.2293146401643753, -0.7481123208999634, 1.98453629016876...
func (rhelpf LinuxPlatformFlavor) getDefaultMeasurement() ([]string, error) { log.Trace("flavor/types/linux_platform_flavor:getDefaultMeasurement() Entering") defer log.Trace("flavor/types/linux_platform_flavor:getDefaultMeasurement() Leaving") var measurementXmlCollection []string var err error for _, measureme...
[ -0.21443790197372437, 0.37132126092910767, 0.5989257097244263, 0.9525877237319946, 0.2457650750875473, 0.1992579698562622, -0.24943611025810242, -0.051143862307071686, 0.18858015537261963, -0.06874231994152069, 0.4742134213447571, -0.9350020885467529, -1.1689831018447876, 1.816662549972534...
func ( c *Controller ) OpenURI( uri_string string ) ( result string ) { adb := adb.Connect( c.Settings.BinaryPath , c.Settings.Host , c.Settings.Port ) fmt.Printf( "Opening === %s\n" , uri_string ) result = adb.OpenURI( uri_string ) return }
[ -1.0163487195968628, -0.20015375316143036, 0.668207049369812, 0.24014310538768768, -0.7881292104721069, 0.11513912677764893, 0.46269190311431885, 0.2903604209423065, 0.08039436489343643, -0.7139700651168823, 0.36399421095848083, 0.40760838985443115, -1.5116140842437744, -0.6263039112091064...
func InitAndRun(ctx context.Context, opts Opts, rc *rest.Config, eb record.EventBroadcaster, initCallback func()) error { if !opts.Enabled { return nil } scheme := runtime.NewScheme() err := coordv1.AddToScheme(scheme) if err != nil { klog.Error(err) return err } leaderelector, err := leaderelection.NewLe...
[ -0.22898896038532257, -0.7828332781791687, 0.8476335406303406, 0.07741020619869232, 0.30544140934944153, 0.13841894268989563, 0.18424123525619507, 0.08624333888292313, 0.6738926768302917, -0.01847839169204235, -0.44517725706100464, 1.228283405303955, -1.110347032546997, 0.09879057854413986...
func IsLeader() bool { lock.RLock() defer lock.RUnlock() return leading }
[ -0.10327702760696411, -0.9411014914512634, 0.6096889972686768, -0.2895231544971466, -0.08635932207107544, 0.5989221930503845, -0.4515451490879059, -0.40745809674263, 0.4906841218471527, -0.2589786648750305, 0.24959099292755127, -0.301783949136734, -1.6715471744537354, 0.3875553607940674, ...
func LoadUretProbeExample() (*ebpf.CollectionSpec, error) { reader := bytes.NewReader(_UretProbeExampleBytes) spec, err := ebpf.LoadCollectionSpecFromReader(reader) if err != nil { return nil, fmt.Errorf("can't load UretProbeExample: %w", err) } return spec, err }
[ 0.20686937868595123, -0.17687156796455383, 0.5315107703208923, -0.4956163763999939, -0.005857502575963736, 0.25052452087402344, 0.06513302028179169, -0.2171410471200943, -0.18393293023109436, 0.5233036279678345, -0.28558677434921265, -0.14388641715049744, -0.8950137495994568, -0.9825421571...
func LoadUretProbeExampleObjects(obj interface{}, opts *ebpf.CollectionOptions) error { spec, err := LoadUretProbeExample() if err != nil { return err } return spec.LoadAndAssign(obj, opts) }
[ -0.6116900444030762, -0.05572345107793808, 0.6625036001205444, 0.18771065771579742, 0.026659486815333366, 0.5336951613426208, 0.3630010783672333, -0.12181954085826874, 0.300733357667923, 1.2888128757476807, -0.8909850716590881, -0.3169066905975342, -0.5044350624084473, 0.07934246957302094,...
func AssertRoleRequired(obj Role) error { elements := map[string]interface{}{ "name": obj.Name, } for name, el := range elements { if isZero := IsZeroValue(el); isZero { return &RequiredError{Field: name} } } return nil }
[ -0.7747296690940857, -0.06282297521829605, 0.5421617031097412, -0.7235603928565979, 0.6418768763542175, 0.12643249332904816, -0.31163230538368225, -0.1507757157087326, 0.06192546710371971, 0.11234141141176224, -0.11506426334381104, -0.30092594027519226, -0.4117748439311981, 1.7255426645278...
func (c baseClient) getEngineConfigFilePath(ctx context.Context, engine containerd.Container) (string, error) { spec, err := engine.Spec(ctx) configFile := "" if err != nil { return configFile, err } for i := 0; i < len(spec.Process.Args); i++ { arg := spec.Process.Args[i] if strings.HasPrefix(arg, "--config...
[ -0.7793571352958679, -0.20079012215137482, 0.6864376664161682, -0.30353793501853943, 0.8023026585578918, -0.13467614352703094, 0.9233112335205078, -0.1581779420375824, -1.908901333808899, 1.0024610757827759, 0.3774622678756714, -0.7966793775558472, -0.46268123388290405, 0.921333909034729, ...
func UnmarshalForm(form *map[string][]string, v interface{}, autofill bool) error { // check v is valid rv := reflect.ValueOf(v).Elem() // dereference pointer if rv.Kind() == reflect.Ptr { rv = rv.Elem() } if rv.Kind() == reflect.Struct { // for each struct field on v unmarshalStructInForm("", form, rv, 0...
[ -0.368551105260849, -0.4506528675556183, 0.7623150944709778, -0.819424569606781, -0.25432273745536804, -0.43730977177619934, 0.24457687139511108, 0.581027626991272, 0.3654923141002655, -0.5547938346862793, 0.2618649899959564, 0.25139206647872925, 0.25675711035728455, 0.8129078149795532, ...
func New(address, apiKey string, httpClient *http.Client) *Client { client := Client{ Address: strings.TrimRight(address, "/"), APIKey: apiKey, httpClient: httpClient, } return &client }
[ -0.002301895059645176, -0.6745094656944275, 0.25783607363700867, -0.7782060503959656, -1.0080236196517944, -0.17969296872615814, -0.23675110936164856, 0.3079485595226288, -0.5349045395851135, 0.12020956724882126, 0.1341615915298462, 0.8901987671852112, 0.25767359137535095, -0.4023118019104...
func newManager(shape []int, k int) (m *manager) { m = &manager{ rand: newRandom(), monitor: stats.New(), shape: shape, } m.watch = newWatcher(m.onPing, 500*time.Millisecond) m.work = async.Repeat(context.Background(), 5*time.Second, func(ctx context.Context) (interface{}, error) { m.update(k) retur...
[ -0.22199362516403198, 0.05024218186736107, 0.6103726625442505, 0.0002136699331458658, -0.6761101484298706, 0.1753007173538208, -0.3793896734714508, -0.9291864037513733, 0.21645492315292358, 0.11080078035593033, -0.6489331722259521, -0.06292157620191574, -0.3498491942882538, 1.5840178728103...
func (m *manager) WeightOf(addr string) float64 { if v, ok := m.weights.Load(addr); ok { return v.(float64) } return 0.0 }
[ 0.7522745132446289, 0.08275426924228668, 0.30211180448532104, -0.10359802097082138, -0.4830772876739502, -0.5548176765441895, 0.03321712464094162, -0.8727623224258423, -0.03652563691139221, 0.4487050175666809, 0.8619787096977234, -0.20407924056053162, -0.44559991359710693, 0.85340356826782...
func (m *manager) onPing(addr string, rtt time.Duration) error { v := int32(rtt.Nanoseconds() / 1000) if v == 0 { // Don't let it be zero, otherwise the update would fail v = 1 } m.monitor.Measure(addr, v) return nil }
[ 0.4648670256137848, 0.14184556901454926, 0.277764230966568, 0.041817717254161835, -0.6389597654342651, 0.34481462836265564, -0.3341694176197052, -0.1007668524980545, 0.42113766074180603, 0.8281185030937195, 0.6292515993118286, -0.4370652139186859, -0.07759101688861847, 1.1650375127792358, ...
func (m *manager) Watch(addr string) { m.watch.Watch(addr) }
[ 0.3350571393966675, -0.8208723068237305, 0.021538209170103073, -0.33180463314056396, -0.5390306711196899, 0.8214237093925476, 0.47917860746383667, 0.5358008742332458, 0.023438772186636925, -0.8165390491485596, -0.6520371437072754, 1.5184334516525269, 0.8293962478637695, 0.4195800721645355,...
func (m *manager) Unwatch(addr string) { m.watch.Unwatch(addr) }
[ 0.5210784673690796, -0.08324956893920898, 0.13692225515842438, -0.7080166339874268, -0.3975864052772522, -0.08786963671445847, 0.5826830863952637, 0.12170334160327911, -0.1628447026014328, -0.36992335319519043, -0.29363739490509033, 1.1594138145446777, 0.09904234856367111, 0.12404891848564...
func (m *manager) Close() error { m.work.Cancel() return m.watch.Close() }
[ 0.11837267875671387, -0.36303648352622986, 0.5841377973556519, 0.4481503963470459, -0.4407126009464264, 0.7926527857780457, 0.2468675822019577, -0.512378454208374, -0.5594373941421509, -0.5804199576377869, 0.23627574741840363, 0.29707908630371094, -0.937446117401123, 1.4914096593856812, ...
func makeObservation(addr string, hist []stats.Bin) kmeans.Observation { vector := make([]float64, 0, len(hist)) for _, v := range hist { vector = append(vector, float64(v.Count)) } return kmeans.Observation{ Label: addr, Point: vector, } }
[ 0.102827288210392, 0.06351908296346664, 0.26488441228866577, -0.8963353037834167, -0.5675725936889648, 0.3329939842224121, 0.2971789538860321, 1.014891505241394, 0.510529100894928, 0.7642958760261536, 0.043317582458257675, 0.2726314961910248, 0.7443858981132507, -0.7970564961433411, 0.40...
func TestDBInit() *Sqlite { testdb := &Sqlite{} testdb.OpenDB("./../gorm_test.db") testdb.setMaxIdleConns(3) testdb.logMode(true) return testdb }
[ 0.6737034916877747, 0.2744144797325134, 0.34253671765327454, 0.014338862150907516, 0.3226498067378998, 0.6018125414848328, 0.1666983962059021, 0.06705041229724884, 0.2146885246038437, -0.5867624878883362, -0.18808145821094513, 0.15370172262191772, -1.4302676916122437, -0.46253538131713867,...