text
stringlengths
11
6.3k
embedding
listlengths
768
768
func Int64ToUint32(number int64) (result uint32, err error) { var newNumber uint64 newNumber, err = strconv.ParseUint(fmt.Sprintf("%d", number), 10, 32) if err != nil { return 0, err } result = uint32(newNumber) return result, nil }
[ -0.9482325315475464, 0.29631152749061584, 0.5603579878807068, -0.3847537934780121, -0.1621362715959549, 0.2996733486652374, -0.6985843181610107, -0.19258487224578857, -0.16179294884204865, -0.5716871619224548, 0.3703918755054474, -0.2733933925628662, -0.019874287769198418, -0.2923021912574...
func Int64ToInt32(number int64) (result int32, err error) { var newNumber int64 newNumber, err = strconv.ParseInt(fmt.Sprintf("%d", number), 10, 32) if err != nil { return 0, err } return int32(newNumber), nil }
[ -0.6891348958015442, -0.0018191459821537137, 0.5478472709655762, -0.11543639749288559, -0.32065603137016296, -0.0603439062833786, -0.33055487275123596, -0.6348900198936462, -0.07828766107559204, 0.11450271308422089, 0.08703020960092545, 0.04167358949780464, -0.08236701041460037, 0.18851704...
func Constructor() MyHashMap { hm := new(MyHashMap) capacity := 10000 hm.HMap = make([]*HMListNode, capacity) return *hm }
[ -0.04392864182591438, 0.14550307393074036, 0.38294893503189087, 0.8164271116256714, -0.05537904426455498, 0.09851203858852386, 0.1702236831188202, 1.217675805091858, 0.3866615891456604, -0.4430987536907196, -0.9883340001106262, -0.5048953890800476, -0.5265244841575623, 1.0319936275482178, ...
func (hm *MyHashMap) Put(key int, value int) { l := len(hm.HMap) idx := key % l if hm.HMap[idx] == nil { hm.HMap[idx] = &HMListNode{key, value, nil} } else { cur, prev := hm.HMap[idx], &HMListNode{Next: hm.HMap[idx]} for cur != nil { if cur.Key == key { cur.Val = value return } prev, cur = cu...
[ -0.7012688517570496, 0.763797402381897, 0.6020218133926392, -0.9460572004318237, -0.4744057357311249, 0.1329049915075302, 0.5637375116348267, 0.6823695302009583, 0.12467608600854874, 0.35537222027778625, -0.444103866815567, 0.02099975198507309, -1.2507611513137817, 0.5977407097816467, 0....
func (hm *MyHashMap) Get(key int) int { l := len(hm.HMap) idx := key % l cur := hm.HMap[idx] for cur != nil { if cur.Key == key { return cur.Val } cur = cur.Next } return -1 }
[ -1.2828510999679565, 0.09951077401638031, 0.6754989624023438, 0.02077465131878853, -0.837059497833252, -0.7442309856414795, 0.13019485771656036, 0.26220637559890747, -0.44892096519470215, -0.43196073174476624, 0.21437925100326538, -0.09419228136539459, -1.5042672157287598, 0.64959204196929...
func (hm *MyHashMap) Remove(key int) { idx := key % len(hm.HMap) cur, prev := hm.HMap[idx], &HMListNode{Next: hm.HMap[idx]} for cur != nil { if cur.Key == key { if cur == hm.HMap[idx] { hm.HMap[idx] = cur.Next } else { prev.Next = cur.Next } break } prev, cur = cur, cur.Next } }
[ -1.0454394817352295, 0.05633888393640518, 0.6373826265335083, -0.637695848941803, -1.344818115234375, -0.2704518139362335, 0.7425985932350159, 1.3982229232788086, 0.5792729258537292, 0.7020421624183655, -0.5505571961402893, -0.1820669174194336, -1.7495373487472534, 0.8206384778022766, 0....
func NewMockRepository(ctrl *gomock.Controller) *MockRepository { mock := &MockRepository{ctrl: ctrl} mock.recorder = &MockRepositoryMockRecorder{mock} return mock }
[ -0.40566781163215637, 0.15040701627731323, 0.3481570780277252, 0.11657092720270157, 0.4086928963661194, -0.6009275317192078, 0.8525921702384949, -0.3010445833206177, 0.8942181468009949, 0.26631760597229004, -0.6556568741798401, -0.31424465775489807, -0.24112838506698608, 1.2045669555664062...
func (m *MockRepository) EXPECT() *MockRepositoryMockRecorder { return m.recorder }
[ -0.19566214084625244, 0.4861186146736145, 0.21518853306770325, -0.2768508791923523, 0.6835972666740417, -0.08574516326189041, -0.040901992470026016, 0.2764807641506195, 0.23481252789497375, -0.03424634411931038, 0.5396379232406616, 0.4172093868255615, -0.9473356008529663, 0.601226568222045...
func (m *MockRepository) Create(arg0 entity.FeiraLivre) (*entity.FeiraLivre, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Create", arg0) ret0, _ := ret[0].(*entity.FeiraLivre) ret1, _ := ret[1].(error) return ret0, ret1 }
[ -0.47268474102020264, 0.27338629961013794, 0.24394704401493073, 0.4016759395599365, 1.8070842027664185, 0.3167944848537445, 0.8694764971733093, -0.3124893307685852, -1.578208088874817, 0.04229039326310158, -0.17164625227451324, -1.596272587776184, -0.07702983170747757, 1.63523530960083, ...
func (mr *MockRepositoryMockRecorder) Create(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockRepository)(nil).Create), arg0) }
[ -0.21827088296413422, 0.6800954937934875, 0.1376168429851532, 0.5301125645637512, 0.4367500841617584, 0.5482231974601746, -0.44719913601875305, -1.3486344814300537, -0.18113912642002106, 0.8319497108459473, 0.6810685992240906, -0.20521757006645203, -0.6992440223693848, 2.023125410079956, ...
func (m *MockRepository) CreateOrUpdate(feiraLive entity.FeiraLivre) (*entity.FeiraLivre, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "CreateOrUpdate", feiraLive) ret0, _ := ret[0].(*entity.FeiraLivre) ret1, _ := ret[1].(error) return ret0, ret1 }
[ -0.15347859263420105, -0.6559768319129944, 0.0610535591840744, -0.5090497136116028, 1.3057562112808228, 0.09717503190040588, 0.6023624539375305, -0.18853667378425598, -0.7561951279640198, 0.1342971920967102, -0.13210508227348328, -2.0603604316711426, -0.5821918249130249, 0.8725451231002808...
func (mr *MockRepositoryMockRecorder) CreateOrUpdate(feiraLive interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockRepository)(nil).CreateOrUpdate), feiraLive) }
[ -0.021129896864295006, -0.18532060086727142, -0.1101323664188385, -0.21361865103244781, -0.005892511457204819, 0.6241819262504578, -0.7190684080123901, -1.1544103622436523, 0.5381914973258972, 0.9376566410064697, 0.5871835350990295, -0.7661153674125671, -0.6513044834136963, 1.1330158710479...
func (m *MockRepository) GetByID(arg0 int) (*entity.FeiraLivre, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetByID", arg0) ret0, _ := ret[0].(*entity.FeiraLivre) ret1, _ := ret[1].(error) return ret0, ret1 }
[ 0.6637280583381653, -0.2194604128599167, 0.39880889654159546, 0.17434701323509216, 1.286661982536316, 0.19032326340675354, 1.1308107376098633, -0.5026347041130066, -0.5894906520843506, -0.30472996830940247, -0.8977215886116028, 0.029427317902445793, -0.5476768016815186, 1.295597791671753, ...
func (mr *MockRepositoryMockRecorder) GetByID(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockRepository)(nil).GetByID), arg0) }
[ 0.7810729146003723, 0.510692298412323, 0.26847413182258606, 0.1705074906349182, 0.47433796525001526, 0.1605546772480011, 0.14935597777366638, -1.1328526735305786, 0.5229337811470032, 0.7998111248016357, -0.045201290398836136, 1.0390338897705078, -0.9939544796943665, 1.1031599044799805, 0...
func (m *MockRepository) GetByQueryParams(arg0 QueryParams) ([]entity.FeiraLivre, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetByQueryParams", arg0) ret0, _ := ret[0].([]entity.FeiraLivre) ret1, _ := ret[1].(error) return ret0, ret1 }
[ 0.22035212814807892, -0.029753047972917557, 0.2734645903110504, 0.4736670255661011, 1.2256072759628296, 0.10534298419952393, 0.6358215808868408, -0.6637061834335327, -0.7242376804351807, -0.5196507573127747, -1.131113886833191, -0.3098452091217041, -0.8112584352493286, 0.49173951148986816,...
func (mr *MockRepositoryMockRecorder) GetByQueryParams(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByQueryParams", reflect.TypeOf((*MockRepository)(nil).GetByQueryParams), arg0) }
[ 0.2772998511791229, 0.5891931653022766, 0.26045259833335876, 0.5273420810699463, 0.5272145867347717, 0.218474879860878, -0.49061474204063416, -1.4901633262634277, 0.41513240337371826, 0.4467534124851227, -0.5479324460029602, 0.5419607162475586, -0.8841689825057983, 0.595236599445343, -0....
func (m *MockRepository) Remove(arg0 int) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Remove", arg0) ret0, _ := ret[0].(error) return ret0 }
[ -0.6205949187278748, -0.38817691802978516, 0.28255048394203186, 0.17681041359901428, 1.0111808776855469, -0.2211529165506363, 0.6478189826011658, 0.27112269401550293, -0.38275235891342163, 0.06892138719558716, -0.5874781012535095, -0.8513703942298889, -1.3721122741699219, 1.405187606811523...
func (mr *MockRepositoryMockRecorder) Remove(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockRepository)(nil).Remove), arg0) }
[ -0.5084858536720276, 0.26433467864990234, 0.40090614557266235, 0.12417317926883698, -0.4272991120815277, -0.16485977172851562, -0.2502220869064331, -0.4440370500087738, 0.8393859267234802, 0.8013685941696167, 0.2516155540943146, -0.03586362302303314, -1.298703670501709, 1.663595199584961, ...
func (m *MockRepository) SyncPK() error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SyncPK") ret0, _ := ret[0].(error) return ret0 }
[ 0.022439707070589066, -0.07670214027166367, 0.3498205244541168, 0.8494305610656738, 0.6606568098068237, 0.6852088570594788, 1.3303486108779907, 0.0736892968416214, -0.6045160889625549, -0.30925890803337097, -0.6855456233024597, -0.429593950510025, -0.1463773101568222, 1.2819609642028809, ...
func (mr *MockRepositoryMockRecorder) SyncPK() *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncPK", reflect.TypeOf((*MockRepository)(nil).SyncPK)) }
[ 0.15231196582317352, 0.6634767055511475, 0.4487953782081604, 0.750767171382904, -0.06486435979604721, 0.7346743941307068, 0.25533327460289, -0.36244630813598633, 0.6693195700645447, 0.5135037899017334, 0.06831982731819153, 0.15284453332424164, -0.31091809272766113, 1.3984624147415161, -0...
func (m *MockRepository) Update(arg0 int, arg1 entity.FeiraLivre) (*entity.FeiraLivre, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Update", arg0, arg1) ret0, _ := ret[0].(*entity.FeiraLivre) ret1, _ := ret[1].(error) return ret0, ret1 }
[ -0.49325934052467346, -0.40326055884361267, 0.4439120888710022, -0.027112208306789398, 0.8945856690406799, 0.3258049190044403, 0.7422991394996643, -0.08457121253013611, -0.6804500222206116, 0.232500359416008, -0.14051590859889984, -1.2478669881820679, -0.575115442276001, 0.9610906839370728...
func (mr *MockRepositoryMockRecorder) Update(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockRepository)(nil).Update), arg0, arg1) }
[ -0.3844994902610779, 0.0687471255660057, 0.33251819014549255, 0.08509458601474762, -0.2549385130405426, 0.4555511772632599, -0.4957732558250427, -0.8689255118370056, 0.587775468826294, 0.8438184261322021, 0.6803975701332092, 0.2424262911081314, -1.2360749244689941, 1.2892361879348755, -0...
func (s *Service) CreateDocumentStore(ctx context.Context, ns string) (influxdb.DocumentStore, error) { // TODO(desa): keep track of which namespaces exist. return s.createDocumentStore(ctx, ns) }
[ -0.050417520105838776, -0.16352052986621857, -0.13802117109298706, 0.5163195729255676, -0.5283803939819336, 0.11706417798995972, -0.4335659444332123, -1.8967927694320679, 0.7769613265991211, -0.8784684538841248, -0.13910724222660065, -0.20838811993598938, -0.4425692558288574, 0.39445212483...
func (s *Service) FindDocumentStore(ctx context.Context, ns string) (influxdb.DocumentStore, error) { var ds influxdb.DocumentStore err := s.kv.View(ctx, func(tx Tx) error { if _, err := tx.Bucket([]byte(path.Join(ns, documentContentBucket))); err != nil { return err } if _, err := tx.Bucket([]byte(path.Jo...
[ 0.2425331026315689, -0.18601614236831665, 0.11886582523584366, -0.0818241760134697, -1.1398890018463135, -0.4015624225139618, -0.18455642461776733, -1.6156584024429321, 0.08037232607603073, -0.4012424349784851, 0.3050036132335663, 0.09766475111246109, -1.2094568014144897, 0.644476234912872...
func (s *DocumentStore) CreateDocument(ctx context.Context, d *influxdb.Document) error { return s.service.kv.Update(ctx, func(tx Tx) error { // Check that labels exist before creating the document. // Mapping creation would check for that, but cannot anticipate that until we // have a valid document ID. for _...
[ -0.2889477014541626, -0.2111545205116272, 0.5711670517921448, -0.24336956441402435, 0.13139647245407104, 0.6072084903717041, 0.017137449234724045, -0.5704412460327148, 0.24483877420425415, -0.1849554181098938, 0.7408189177513123, -0.3747773766517639, 0.04661135375499725, -0.136532232165336...
func (s *Service) addDocumentOwner(ctx context.Context, tx Tx, orgID influxdb.ID, docID influxdb.ID) error { // In this case UserID refers to an organization rather than a user. m := &influxdb.UserResourceMapping{ UserID: orgID, UserType: influxdb.Owner, MappingType: influxdb.OrgMappingType, Resour...
[ -0.47189420461654663, 0.12214166671037674, 0.268482506275177, 1.0581172704696655, -1.1800625324249268, 0.17153093218803406, 0.7372345328330994, -0.28587397933006287, 0.052822209894657135, -0.7412506341934204, 0.04357077553868294, 0.4477420151233673, -0.2954036593437195, -0.3492418527603149...
func (s *DocumentStore) FindDocument(ctx context.Context, id influxdb.ID) (*influxdb.Document, error) { var d *influxdb.Document err := s.service.kv.View(ctx, func(tx Tx) error { m, err := s.service.findDocumentMetaByID(ctx, tx, s.namespace, id) if err != nil { return err } c, err := s.service.findDocument...
[ 0.036461491137742996, -0.32590222358703613, 0.5302324295043945, -0.1427275389432907, -0.5834758281707764, 0.15384149551391602, 0.17168621718883514, -0.7010153532028198, 0.34970542788505554, 0.06861177831888199, 0.8082358837127686, 0.6147427558898926, -0.6898688077926636, 0.1749709695577621...
func (s *DocumentStore) FindDocuments(ctx context.Context, opts ...influxdb.DocumentFindOptions) ([]*influxdb.Document, error) { var ds []*influxdb.Document err := s.service.kv.View(ctx, func(tx Tx) error { if len(opts) == 0 { // TODO(desa): might be a better way to do get all. if err := s.service.findDocumen...
[ -0.4696435034275055, 0.1748744249343872, 0.6423240900039673, 0.21203383803367615, 0.2805889844894409, -0.4609828293323517, -0.04472531005740166, -0.8651308417320251, 0.37884601950645447, -0.20358853042125702, 0.5213799476623535, 0.4705461263656616, -0.7439436912536621, 0.2277449518442154, ...
func (s *DocumentStore) DeleteDocument(ctx context.Context, id influxdb.ID) error { return s.service.kv.Update(ctx, func(tx Tx) error { if err := s.service.deleteDocument(ctx, tx, s.namespace, id); err != nil { if IsNotFound(err) { return &influxdb.Error{ Code: influxdb.ENotFound, Msg: influxdb.Err...
[ 0.23418161273002625, -0.5849624276161194, 0.2926647663116455, -0.25215262174606323, -0.33073994517326355, 0.42582330107688904, -0.11275510489940643, -0.436031311750412, 1.1148841381072998, -0.2550823390483856, 0.12679868936538696, 0.5879991054534912, -0.873288094997406, -0.2005446702241897...
func (s *DocumentStore) DeleteDocuments(ctx context.Context, opts ...influxdb.DocumentFindOptions) error { return s.service.kv.Update(ctx, func(tx Tx) error { idx := &DocumentIndex{ service: s.service, namespace: s.namespace, tx: tx, ctx: ctx, writable: true, } dd := &DocumentDecor...
[ -0.4476000964641571, 0.1632857620716095, 0.3777289390563965, 0.42097577452659607, 0.47701409459114075, -0.04090321809053421, 0.4488984942436218, -0.5880696177482605, 0.6521382331848145, -0.3326427936553955, 0.6477406620979309, 0.3417814373970032, -0.901833176612854, 0.08198822289705276, ...
func (s *DocumentStore) UpdateDocument(ctx context.Context, d *influxdb.Document) error { return s.service.kv.Update(ctx, func(tx Tx) error { if err := s.service.updateDocument(ctx, tx, s.namespace, d); err != nil { return err } if err := s.decorateDocumentWithLabels(ctx, tx, d); err != nil { return err ...
[ -0.8379337787628174, -0.25335022807121277, 0.4268104135990143, 0.053276512771844864, -0.9423012137413025, 0.7204711437225342, -0.1595248430967331, -0.3713257908821106, 0.6759259104728699, 0.38591429591178894, 0.45651325583457947, 0.8870452642440796, -0.03180839493870735, 0.1120758205652237...
func (t Term) String() string { return fmt.Sprintf("%s : %s | ", t.Name, t.Value) }
[ -0.04884762316942215, -1.7144336700439453, 0.30269765853881836, -0.7585071921348572, -0.893362283706665, 1.2150799036026, -0.6598608493804932, -0.659465491771698, -1.3171268701553345, 0.6576622128486633, -0.5441716313362122, 0.5530637502670288, 0.675502359867096, -0.9864184260368347, 0.4...
func (c *bannedUserClient) listByHashedLabel(labelKey, labelValue string) (*crtapi.BannedUserList, error) { // Calculate the md5 hash for the phoneNumber md5hash := md5.New() // Ignore the error, as this implementation cannot return one _, _ = md5hash.Write([]byte(labelValue)) hash := hex.EncodeToString(md5hash.Su...
[ 0.2348659634590149, -0.3664342164993286, 0.4055578410625458, 0.574680507183075, 0.0664711445569992, 0.27764490246772766, -0.7832431197166443, -0.4706978499889374, 0.2391926497220993, 0.4212818443775177, -0.20667782425880432, 0.02900388091802597, -0.7695636749267578, 0.4583333432674408, -...
func NewKeyStore() *KeyStore { return &KeyStore{} }
[ 0.5706692337989807, -0.9128612875938416, -0.21169371902942657, 0.3889199197292328, -1.7161706686019897, -0.3497982919216156, -1.2495172023773193, -0.7943339943885803, 0.07864011079072952, -0.8482174277305603, -0.47293978929519653, 0.03310316056013107, -0.9026176929473877, 0.086946435272693...
func (s *KeyStore) AddKeys(role string, threshold uint, expiry string, keys map[string]*KeyInfo) error { if threshold == 0 { return errors.Errorf("invalid threshold (0)") } rk := roleKeys{threshold: threshold, expiry: expiry, keys: &sync.Map{}} for id, info := range keys { pub, err := info.publicKey() if er...
[ -0.6258366703987122, -0.2750796675682068, 0.2942716181278229, -0.47296109795570374, -0.3419383466243744, -0.017723295837640762, -1.2227007150650024, 0.2371440976858139, -0.4485434889793396, 0.1626153290271759, -0.028626034036278725, 0.0018152081174775958, 0.178286612033844, 0.4868949353694...
func (s *KeyStore) transitionRoot(signed []byte, newThreshold uint, expiry string, signatures []Signature, newKeys map[string]*KeyInfo) error { if s == nil { return nil } oldKeys, hasOldKeys := s.Load(ManifestTypeRoot) err := s.AddKeys(ManifestTypeRoot, newThreshold, expiry, newKeys) if err != nil { return e...
[ 0.7618086934089661, -0.25139591097831726, 0.4925379753112793, 0.06635122746229172, -0.2809833884239197, -0.19847944378852844, -0.6070287227630615, -0.20653000473976135, 0.18299587070941925, 0.4761444926261902, -0.48824307322502136, 0.6357676982879639, -0.5719789266586304, 0.702100872993469...
func (s *KeyStore) verifySignature(signed []byte, role string, signatures []Signature, filename string) error { if s == nil { return nil } // Check for duplicate signatures. has := make(map[string]struct{}) for _, sig := range signatures { if _, ok := has[sig.KeyID]; ok { return newSignatureError(filename,...
[ 0.16508419811725616, -0.7250405550003052, 0.4990437626838684, 0.5813568234443665, -0.06852858513593674, -0.8495058417320251, -0.19880971312522888, 0.09969896823167801, -0.16368864476680756, 0.312486857175827, -0.5419013500213623, -0.34815463423728943, 0.13045336306095123, 0.830624401569366...
func NewServer() *gin.Engine { r := gin.Default() setMetricsCollectors(r) r.GET("/ping", pingHandler) r.GET("/metrics", gin.WrapH(promhttp.Handler())) return r }
[ 0.1788867861032486, 0.127219095826149, 0.3174988329410553, 0.7035126686096191, 0.7488043904304504, 0.7315294742584229, 0.41871100664138794, 0.5811425447463989, -0.7615933418273926, -0.5635666251182556, 0.15605472028255463, 0.3306942284107208, -0.3652840256690979, 0.6180443167686462, -0.0...
func Verify(models []Model, ignored ...string) error { // build index index := map[string]*Meta{} for _, model := range models { index[GetMeta(model).PluralName] = GetMeta(model) } // check models for _, model := range models { // get meta modelMeta := GetMeta(model) // check relationships for name, f...
[ -0.16563335061073303, 0.3818935453891754, 0.9712103009223938, -0.014540115371346474, 0.5119798183441162, 0.659285306930542, 0.6150447130203247, -0.5193324685096741, -0.21282166242599487, 0.28444868326187134, -0.2057562917470932, -0.13029029965400696, -0.4274330735206604, -0.028916353359818...
func NewRouter(id string, topic string, filterExpression string, downStreamParts map[string]common.Part, routingMap map[uint16]string, sourceCRMode base.ConflictResolutionMode, logger_context *log.LoggerContext, req_creator ReqCreator, utilsIn utilities.UtilsIface) (*Router, error) { // compile filter expression ...
[ -0.49716323614120483, -0.5619956254959106, 0.5875528454780579, 0.2984093427658081, -0.3555484712123871, 0.1593208760023117, 0.2470466047525406, 0.18908075988292694, 0.1806672215461731, -0.3196635842323303, 0.5113353729248047, 0.3115222752094269, -0.4634150564670563, 0.3432743549346924, 0...
func (router *Router) route(data interface{}) (map[string]interface{}, error) { result := make(map[string]interface{}) // only *mc.UprEvent type data is accepted uprEvent, ok := data.(*mcc.UprEvent) if !ok { return nil, ErrorInvalidDataForRouter } if router.routingMap == nil { return nil, ErrorNoRoutingMapF...
[ -0.7545326352119446, 0.21504223346710205, 0.834143340587616, 0.3986639082431793, -0.8958484530448914, -0.8907536864280701, 0.08645155280828476, -0.36888211965560913, -0.03556494787335396, 0.8315107226371765, 0.6751992702484131, 0.4401353597640991, -0.7278256416320801, 0.3638864755630493, ...
func (app *instructionAdapterBuilder) Create() InstructionAdapterBuilder { return createInstructionAdapterBuilder( app.testInstructionBuilder, app.assertBuilder, app.readFileBuilder, app.relativePathBuilder, app.labelInstructionBuilder, app.instructionBuilder, app.exitBuilder, app.callBuilder, app.mo...
[ 0.1402217447757721, -0.264393150806427, 0.3689363896846771, 0.93314528465271, -0.5463951230049133, 0.1746836155653, 0.7926509380340576, 0.28001439571380615, 0.5968183279037476, -0.3549395203590393, 0.5768716335296631, 0.26390188932418823, -1.1581774950027466, 0.296431303024292, 0.2943875...
func (app *instructionAdapterBuilder) WithLocalStackFrame(localStackFrame stackframes.StackFrame) InstructionAdapterBuilder { app.localStackFrame = localStackFrame return app }
[ 0.8118665814399719, 0.014359883032739162, 0.34152212738990784, 0.29648229479789734, -1.176233172416687, -1.048210859298706, 0.008484568446874619, 0.6807122826576233, 0.7767483592033386, 0.026960570365190506, -0.34980508685112, 0.031219027936458588, 0.15459337830543518, 0.49263691902160645,...
func (app *instructionAdapterBuilder) WithStackFrame(stackFrame stackframes.StackFrame) InstructionAdapterBuilder { app.stackFrame = stackFrame return app }
[ 0.5624182820320129, 0.22851526737213135, 0.16921868920326233, 0.8713019490242004, -0.9721627235412598, -0.9611010551452637, 0.522550642490387, 0.04577350616455078, 0.634076714515686, 0.1315843015909195, -0.1865423023700714, 0.1950080692768097, 0.10324713587760925, 0.591705858707428, -0.2...
func (app *instructionAdapterBuilder) Now() (InstructionAdapter, error) { if app.localStackFrame != nil { return nil, errors.New("the local StackFrame is mandatory in order to build an InstructionAdapter instance") } if app.stackFrame != nil { return nil, errors.New("the stackFrame is mandatory in order to buil...
[ -0.0910269096493721, -0.5976451635360718, 0.5504899621009827, 0.7924801707267761, -0.5261293053627014, -0.3159726560115814, 0.5431815385818481, 0.3972291052341461, 0.1632966250181198, -0.49123454093933105, 0.07390108704566956, 0.488163024187088, -0.8418434262275696, 0.4850963056087494, 0...
func (v *VFFFS) parseEntries(data []byte) []FATFile { var fileInfo []FATFile for dirOffset := 0; dirOffset < len(data); dirOffset += 32 { var dirEntry FATEntry contents := data[dirOffset : dirOffset+32] err := binary.Read(bytes.NewBuffer(contents), binary.LittleEndian, &dirEntry) if err != nil { panic(err...
[ 0.33371424674987793, -0.49381589889526367, 0.5033617615699768, -0.8969914317131042, -0.19105620682239532, -0.49902355670928955, -0.0968189388513565, -0.6365336775779724, -0.08697722852230072, -0.009314969182014465, 0.2850775420665741, -0.31820181012153625, 0.34446561336517334, 1.3730940818...
func (f FATFile) Read(buffer []byte) (int, error) { data, err := f.source.readChain(f.info.currentFile.ClusterNum) if err != nil { return 0, err } return copy(buffer, data), nil }
[ -0.16544151306152344, -0.12409643828868866, 0.5339117646217346, -0.5821714997291565, 0.38979238271713257, 0.26509857177734375, 1.1160074472427368, -0.6169725060462952, -0.6341239809989929, -0.8078070282936096, 0.135346457362175, 0.4534573554992676, -0.8446468114852905, 0.2134314328432083, ...
func (f FATFile) Stat() (fs.FileInfo, error) { return f.info, nil }
[ 0.8381885886192322, -1.2645211219787598, 0.34445637464523315, -0.8915711045265198, 0.6740952730178833, 0.08978494256734848, 0.3127862811088562, -0.5432131886482239, -0.8900883793830872, -1.4667631387710571, -0.4008321464061737, -0.2626439034938812, 0.4759269058704376, 0.7031683921813965, ...
func (f *FATFile) Close() error { return nil }
[ 0.662172794342041, -0.27796581387519836, 0.521412193775177, -0.24139104783535004, 0.0730891078710556, 0.9481589198112488, 0.642832338809967, -0.55038982629776, -1.1686979532241821, -1.7232074737548828, 0.38029971718788147, -0.24000497162342072, -0.5798460841178894, 1.1112583875656128, 0....
func (e FATFileInfo) Size() int64 { return int64(e.currentFile.Size) }
[ -0.08126556873321533, -0.46170520782470703, 0.42720019817352295, -0.6923305988311768, 0.536204993724823, 0.1501510590314865, 0.9418970346450806, -0.06629102677106857, -0.864556610584259, -0.754127562046051, 0.4355235993862152, -0.10037389397621155, -0.26763200759887695, 0.8664577603340149,...
func (e FATFileInfo) Mode() fs.FileMode { if e.currentFile.Attributes&FATAddrDirectory == FATAddrDirectory { return fs.ModeDir } else { return 0 } }
[ -0.6266496181488037, -0.8792486786842346, 0.603183388710022, -0.8672689199447632, 0.2628055512905121, 0.2657707929611206, 0.805224597454071, 0.4282074570655823, 0.29788175225257874, -0.7571045756340027, 1.291493535041809, -0.6181753277778625, 0.1644059270620346, 0.905127763748169, 0.6614...
func (e FATFileInfo) IsDir() bool { return e.currentFile.Attributes&FATAddrDirectory == FATAddrDirectory }
[ 0.4194340705871582, -1.3653678894042969, 0.4468749761581421, -0.23346269130706787, 0.12577275931835175, 0.12269699573516846, 0.9202597141265869, 0.45991250872612, 0.4823819398880005, -0.9955333471298218, 1.0173492431640625, 0.08613448590040207, 0.22699511051177979, 1.1915746927261353, -0...
func (e FATFileInfo) Name() string { dirEntry := e.currentFile name := strings.TrimSpace(string(dirEntry.Name[:])) if name[len(name)-1:] == "." { name = name[:] } // Directories have no extension. if e.IsDir() { return name } extension := strings.TrimSpace(string(dirEntry.Extension[:])) return name + "."...
[ 0.10783492773771286, -1.1637297868728638, 0.8368836641311646, -0.38657042384147644, -0.3912273943424225, -0.2226046770811081, 0.6290580630302429, -0.2755608856678009, -0.28776055574417114, 0.5911471843719482, 0.7316470742225647, -0.025995125994086266, 0.2233518362045288, 0.4276577234268188...
func (d FATDirEntryInfo) Name() string { return d.currentInfo.Name() }
[ -0.2473718374967575, -1.2125976085662842, 0.4708417057991028, -0.9615598917007446, -0.38086673617362976, 0.5239996910095215, 0.0998743325471878, -0.19130578637123108, -0.8455881476402283, -0.01769031584262848, 0.5245210528373718, 0.4439922571182251, 0.32546085119247437, 0.5648270845413208,...
func (d FATDirEntryInfo) IsDir() bool { return d.currentInfo.IsDir() }
[ 0.11434344947338104, -1.0525513887405396, 0.31341680884361267, 0.31454211473464966, -0.07479546219110489, 0.5726097822189331, 0.186274915933609, 0.48822763562202454, 0.12775000929832458, -1.3132147789001465, 0.896401047706604, 0.545928955078125, -0.4142056703567505, 1.1099504232406616, -...
func (d FATDirEntryInfo) Type() fs.FileMode { return d.currentInfo.Mode().Type() }
[ -0.22870537638664246, -0.6938485503196716, 0.5236982703208923, -0.5440067052841187, 0.9457195997238159, 0.5759620666503906, 0.7954487204551697, -0.7318184971809387, -0.5427088141441345, -1.004252552986145, 0.46242326498031616, 0.302139014005661, -0.28303518891334534, 0.5476795434951782, ...
func (d FATDirEntryInfo) Info() (fs.FileInfo, error) { return d.currentInfo, nil }
[ 0.26121795177459717, -1.0337516069412231, 0.29102155566215515, -0.9091363549232483, 0.3840392827987671, -0.08128464967012405, 0.5995887517929077, -0.5624662041664124, -1.0413166284561157, -0.9424391388893127, 0.3672226369380951, 0.2597380578517914, 0.595316469669342, 0.5532307028770447, ...
func (o *Options) Run(ctx context.Context) error { ctx, cancel := context.WithTimeout(ctx, o.Timeout) defer cancel() // Create and initialize cluster 1. cluster1 := inband.NewCluster(o.LocalFactory, o.RemoteFactory) if err := cluster1.Init(ctx); err != nil { return err } // Create and initialize cluster 2. ...
[ -0.32709604501724243, 0.4040559232234955, 0.8784785866737366, -0.004766001831740141, 0.9485360980033875, 0.3385852873325348, 0.7780835032463074, -0.7730966806411743, 0.08122479915618896, 0.3091643750667572, -0.2809202969074249, 0.05325082689523697, -0.2681284248828888, 0.07338856905698776,...
func (client AzureClient) Login(httpClient httpclient.HttpClient, browser browser.Browser) (string, error) { authCode(browser) if authCodeValue == "" { return "", errors.New("No auth code received") } token, err := accessToken(httpClient) return token, err }
[ -0.10268906503915787, -0.45161351561546326, 0.5999220609664917, 0.42647165060043335, -0.72027587890625, 0.24076391756534576, 0.19817641377449036, 0.5390625596046448, 0.2807757258415222, 0.2692098021507263, 0.4275438189506531, 1.0607250928878784, -0.2028367519378662, 0.27347424626350403, ...
func (e *AudioListeners) Attach(listener AudioListener) Detacher { item := &audioEventItem{ parent: e, prev: e.tail, listener: listener, streams: make(map[*User]chan *AudioPacket), } if e.head == nil { e.head = item } if e.tail == nil { e.tail = item } else { e.tail.next = item } return ite...
[ 0.7291016578674316, -0.729495108127594, 0.5929322242736816, -0.9686155915260315, -0.743902325630188, 0.9283269047737122, -0.46678149700164795, -0.3071794807910919, 0.06486883014440536, 0.13439378142356873, -0.14608970284461975, -0.29628676176071167, -0.32309237122535706, 0.5112341046333313...
func NewTransport(options ...Option) *ExtensibleTransport { tr := &ExtensibleTransport{ delegate: http.DefaultTransport, extensions: []HTTPRequestExtension{ &TIDFromContextExtension{}, }, } tr.AddOptions(options...) return tr }
[ 0.458106130361557, 0.36695927381515503, 0.46090325713157654, 0.5224719047546387, -0.3048397898674011, 0.22426800429821014, -0.3234654366970062, -1.1338701248168945, 0.5105259418487549, -0.15942434966564178, -0.4309805929660797, 0.3501993715763092, -0.7737786769866943, -0.7140509486198425, ...
func (d *ExtensibleTransport) RoundTrip(req *http.Request) (*http.Response, error) { for _, e := range d.extensions { e.ExtendRequest(req) } return d.delegate.RoundTrip(req) }
[ -0.6702675223350525, 0.26146411895751953, 0.5801620483398438, 0.19530797004699707, 0.18735718727111816, 0.013123559765517712, -0.04449417069554329, -0.3353233337402344, 0.6014279127120972, -0.5050594806671143, 0.7091733813285828, 0.15427184104919434, 0.22835418581962585, -0.179544419050216...
func (d *ExtensibleTransport) AddOptions(options ...Option) { for _, opt := range options { opt(d) } }
[ -0.3235790431499481, 1.0750412940979004, 0.3934226930141449, 0.4005153477191925, 1.452282190322876, 0.5965012311935425, -0.5186771750450134, -0.5731094479560852, 0.2505360245704651, -0.5076745748519897, -0.11472342908382416, -0.49335870146751404, -0.39360561966896057, 0.6306535005569458, ...
func WithLogger(log *logger.UPPLogger) Option { return func(d *ExtensibleTransport) { tr := d.delegate d.delegate = &loggingTransport{ log: log, transport: tr, } } }
[ -0.0066346535459160805, 0.4974316656589508, 0.6000350713729858, -0.6200399994850159, -0.550987184047699, 0.06698102504014969, 0.11392629146575928, 0.4131999909877777, 1.0858371257781982, -0.5726597905158997, -0.3782227635383606, -0.06471382826566696, 0.6452345848083496, -0.0616974458098411...
func WithUserAgent(userAgent string) Option { return func(d *ExtensibleTransport) { ext := NewUserAgentExtension(userAgent) d.extensions = append(d.extensions, ext) } }
[ 0.6280840635299683, 0.04708779975771904, 0.5126767158508301, -0.1771291196346283, -1.1930227279663086, 0.23498697578907013, 0.7262443900108337, -0.13721124827861786, 1.9113123416900635, -0.4827326834201813, -1.3300385475158691, -0.47461411356925964, 0.20228540897369385, -0.7838384509086609...
func WithStandardUserAgent(platform string, systemCode string) Option { return func(d *ExtensibleTransport) { ext := NewUserAgentExtension(standardUserAgent(platform, systemCode)) d.extensions = append(d.extensions, ext) } }
[ 0.8249233365058899, 0.5408110618591309, 0.4226061999797821, -0.20489303767681122, -1.0568771362304688, 0.37232184410095215, 0.5289148688316345, -0.20708490908145905, 1.3800302743911743, -0.5268610119819641, -1.142972707748413, -0.0036898816470056772, -0.4224497973918915, -0.576961874961853...
func (point Point) Equal(obj Objecter) bool { otherPoint, ok := obj.(Point) if !ok { return false } switch { case point.X != otherPoint.X: return false case point.Y != otherPoint.Y: return false } return true }
[ -0.3624218702316284, -0.7880499958992004, 0.38035503029823303, 0.8104093074798584, 0.6800305843353271, 0.8026768565177917, 0.071897491812706, -0.3729834258556366, 0.3828344941139221, 0.9385173916816711, -1.0953164100646973, -0.12224461883306503, -0.15493181347846985, -0.05741051957011223, ...
func NewDataRequest() *DataRequest { // Set Defaults req := DataRequest{ Step: "1m", TimeSeries: []string{ "etcd_disk_wal_fsync_duration_seconds_bucket", "etcd_disk_backend_commit_duration_seconds_bucket", "etcd_network_peer_round_trip_time_seconds_bucket", }, } return &req }
[ -0.4402821958065033, 0.08685331791639328, 0.2045266330242157, 0.453005850315094, -0.3078930079936981, -0.30119258165359497, -1.095799207687378, 0.015368405729532242, -1.0240360498428345, -0.37235960364341736, 0.006816473789513111, 0.6962608695030212, 0.3462376296520233, 0.6949976682662964,...
func (m *DropMonitorObj) Marshal() (dAtA []byte, err error) { return json.Marshal(*m) }
[ -0.5299126505851746, -0.24596132338047028, 0.48839208483695984, -0.47464752197265625, -0.06539230048656464, 0.8149078488349915, -0.9441915154457092, -1.258850336074829, 0.23680457472801208, -0.4773668646812439, -0.7858225703239441, 0.9111860394477844, -0.5350422263145447, 0.657043278217315...
func (m *DropMonitorObj) Unmarshal(dAtA []byte) error { return json.Unmarshal(dAtA, m) }
[ -1.1156539916992188, 0.07809444516897202, 0.5633918046951294, -1.3700854778289795, -0.15909519791603088, 0.6272860169410706, -0.16981740295886993, -0.6392516493797302, 0.22993268072605133, -0.025095045566558838, -0.9040912985801697, -0.1666148602962494, -0.7143527865409851, -0.042807955294...
func (m *FlowMonitorObj) Marshal() (dAtA []byte, err error) { return json.Marshal(*m) }
[ 0.12295101583003998, -0.4240376353263855, 0.34598180651664734, -0.4325595200061798, -0.508343517780304, 0.4857849180698395, -0.5969940423965454, -1.1156742572784424, 0.29356810450553894, -0.8468568325042725, -0.7420443296432495, 0.8807228207588196, -0.586118221282959, 0.7192994356155396, ...
func (m *FlowMonitorObj) Unmarshal(dAtA []byte) error { return json.Unmarshal(dAtA, m) }
[ -0.37004518508911133, -0.13225045800209045, 0.4325454533100128, -1.252791166305542, -0.33276069164276123, 0.12901407480239868, 0.24996794760227203, -0.251633882522583, 0.47154515981674194, -0.5695815682411194, -0.7489272356033325, -0.20768412947654724, -0.7496238350868225, 0.07444196194410...
func (m *MirrorSessionObj) Marshal() (dAtA []byte, err error) { return json.Marshal(*m) }
[ -0.19060763716697693, -0.4761708974838257, 0.33304136991500854, -0.2797255218029022, -0.9728893637657166, 0.4822978377342224, -0.16341061890125275, -0.3919939696788788, 0.8177462816238403, -0.202464759349823, -1.1525466442108154, 1.5805048942565918, 0.4782257080078125, 0.06432326138019562,...
func (m *MirrorSessionObj) Unmarshal(dAtA []byte) error { return json.Unmarshal(dAtA, m) }
[ -0.7332972884178162, 0.07699741423130035, 0.44243788719177246, -1.1996245384216309, -1.1508392095565796, 0.15382467210292816, 0.41613924503326416, 0.3943515717983246, 0.8613952994346619, 0.23078346252441406, -1.1923496723175049, 0.5966657996177673, 0.140590637922287, -0.712361752986908, ...
func (m *memClient) PutObjectRateLimiter(ctx context.Context, objectName string, reader io.Reader, metaData map[string]string, rsize int, rduration time.Duration) (int64, error) { defer m.Unlock() m.Lock() o, ok := m.store[objectName] if ok { o.buf.Reset() } else { o.buf = memBuffer{bytes.NewBuffer(nil)} m.s...
[ -0.4844488799571991, 0.11936542391777039, 0.8226703405380249, -0.7954764366149902, -0.7871127128601074, -0.07539736479520798, -0.5397645831108093, -0.44302791357040405, -0.037423986941576004, 0.9655737280845642, -0.5727850198745728, 0.7707158327102661, -1.4969016313552856, -1.0872715711593...
func (m *memClient) PutObject(ctx context.Context, objectName string, reader io.Reader, metaData map[string]string) (int64, error) { defer m.Unlock() m.Lock() o, ok := m.store[objectName] if ok { o.buf.Reset() } else { o.buf = memBuffer{bytes.NewBuffer(nil)} m.store[objectName] = o } o.meta = metaData o.m...
[ -0.5207569599151611, -0.27456367015838623, 0.6879029273986816, -1.0594488382339478, -0.5306488275527954, 0.0781833752989769, 0.29394710063934326, -0.4124944508075714, -0.4529348611831665, 0.21260176599025726, -0.5073462128639221, 0.18986545503139496, -1.0841697454452515, -1.086930274963379...
func (m *memClient) PutObjectOfSize(ctx context.Context, objectName string, reader io.Reader, size int64, metaData map[string]string) (int64, error) { return 0, errors.New("unimplemented") }
[ -0.9005423188209534, -0.6884771585464478, 0.5655359625816345, -1.2652562856674194, -0.4426250755786896, -0.1682521104812622, 0.8682358860969543, -0.6301325559616089, -0.044213779270648956, 0.25754475593566895, -1.004395842552185, -0.014666966162621975, -0.59909588098526, -0.621588408946991...
func (m *memClient) PutObjectExplicit(ctx context.Context, serviceName string, objectName string, reader io.Reader, size int64, metaData map[string]string, contentType string) (int64, error) { return 0, errors.New("unimplemented") }
[ -0.044935036450624466, -0.45252376794815063, 0.6722540259361267, -1.4321798086166382, -1.014051079750061, 0.48937907814979553, -0.18800702691078186, 0.18264280259609222, -0.2833152711391449, 0.7608417272567749, -0.8138428926467896, 0.4898257553577423, -0.8099440336227417, -0.16155846416950...
func (m *memClient) PutStreamObject(ctx context.Context, objectName string, metaData map[string]string) (io.WriteCloser, error) { return nil, errors.New("unimplemented") }
[ -0.3119555413722992, -0.6829824447631836, 0.7992209792137146, -0.32258284091949463, -0.5978447198867798, 0.6350418329238892, 0.4081760048866272, -0.7808699607849121, -0.3561858534812927, 0.2422143965959549, -0.6743208169937134, 1.0591412782669067, -0.8227350115776062, 0.3242456614971161, ...
func (m *memClient) GetObject(ctx context.Context, objectName string) (io.ReadCloser, error) { defer m.Unlock() m.Lock() o, ok := m.store[objectName] if ok { return ioutil.NopCloser(bytes.NewReader(o.buf.Bytes())), nil // return &o.buf, nil } return nil, nil }
[ 0.10147738456726074, -0.5198904871940613, 0.7358447909355164, -0.12249234318733215, -0.8473265171051025, 0.33705610036849976, 0.2657914459705353, -1.272566556930542, -0.06444308161735535, -0.5317286849021912, 0.04124738276004791, 0.3923150300979614, -0.7529643177986145, -0.9019463062286377...
func (m *memClient) GetObjectExplicit(ctx context.Context, serviceName string, objectName string) (io.ReadCloser, error) { return nil, errors.New("unimplemented") }
[ 0.6899960041046143, -0.3661768138408661, 0.7514285445213318, -0.40628790855407715, -0.9207807779312134, 0.7431586384773254, -0.4861556589603424, -0.41593503952026367, -0.18879415094852448, -0.2255706638097763, -0.2952605187892914, 0.9981138110160828, -0.140935018658638, -0.2627131938934326...
func (m *memClient) GetStreamObjectAtOffset(ctx context.Context, objectName string, offset int) (io.ReadCloser, error) { return nil, errors.New("unimplemented") }
[ -0.1181599348783493, -1.2205160856246948, 0.6825701594352722, -0.2779637277126312, -0.6889020800590515, 0.491974800825119, 0.6406155228614807, -1.2296655178070068, -0.717075765132904, -0.5041804909706116, -0.42577555775642395, 1.2789472341537476, -0.30445414781570435, -0.04144168645143509,...
func (m *memClient) StatObject(objectName string) (*objstore.ObjectStats, error) { defer m.Unlock() m.Lock() if o, ok := m.store[objectName]; ok { return &objstore.ObjectStats{ LastModified: o.modified, Size: int64(o.buf.Len()), MetaData: o.meta, }, nil } return nil, errors.New("not found...
[ 0.3097750246524811, -0.7473219037055969, 0.5159090757369995, -0.9043874144554138, -0.4714736342430115, -0.07833731174468994, 0.1318318396806717, -1.3516370058059692, 0.12191556394100189, 0.020075850188732147, -0.79792320728302, 0.22937893867492676, -0.7491418719291687, -0.47813665866851807...
func (m *memClient) ListObjects(prefix string) ([]string, error) { defer m.Unlock() m.Lock() ret := []string{} for k := range m.store { ret = append(ret, k) } return ret, nil }
[ -1.0861804485321045, -0.5500955581665039, 0.44810736179351807, -0.6122223734855652, -0.5051378607749939, -0.27405357360839844, -0.9175427556037903, -0.5001551508903503, 0.17646828293800354, -0.07409568876028061, -0.6074259877204895, 0.6682478189468384, -1.0142674446105957, 0.03430064767599...
func (m *memClient) ListObjectsExplicit(serviceName string, prefix string, recursive bool) ([]string, error) { return nil, errors.New("unimplemented") }
[ -0.049948420375585556, -0.2954849898815155, 0.4770084321498871, -0.5340557098388672, -0.7960530519485474, -0.21634456515312195, -0.9107046127319336, 0.3584173023700714, 0.47857263684272766, 0.4051874876022339, -1.1618719100952148, 0.6887513399124146, -0.3143923580646515, 0.2656756639480591...
func (m *memClient) RemoveObjects(prefix string) error { defer m.Unlock() m.Lock() var delKeys []string for k := range m.store { if strings.HasPrefix(k, prefix) { delKeys = append(delKeys, k) } } for i := range delKeys { delete(m.store, delKeys[i]) } return nil }
[ -1.2122279405593872, -0.1979723423719406, 0.4714023470878601, -0.7829787731170654, -0.9373350739479065, -0.7504779696464539, -0.23004132509231567, 0.5241681337356567, -0.3618519902229309, 0.2199935019016266, -0.9153439998626709, 0.0011221515014767647, -1.1009832620620728, -0.14675928652286...
func (m *memClient) RemoveObject(path string) error { defer m.Unlock() m.Lock() delete(m.store, path) return nil }
[ 0.22419175505638123, -0.6998993754386902, 0.21268613636493683, -0.4876742959022522, -0.750541090965271, 0.2955472469329834, 0.2901924252510071, 0.11564986407756805, -0.1725330799818039, -0.41130223870277405, -0.7073652148246765, -0.8566214442253113, -0.9748221635818481, -0.875747561454773,...
func (m *memClient) RemoveObjectsWithContext(ctx context.Context, bucketName string, objectsCh <-chan string) <-chan objstore.RemoveObjectError { ch := make(chan objstore.RemoveObjectError) go func() { ch <- objstore.RemoveObjectError{ObjectName: "", Err: errors.New("unimplemented")} }() return ch }
[ -0.25557741522789, -1.1856648921966553, 0.8093267679214478, -0.7167674899101257, -0.6113548278808594, 0.16186730563640594, 0.398845374584198, -1.0306315422058105, 0.4794045090675354, -0.091736800968647, -1.3378084897994995, 0.3155149817466736, -0.42569419741630554, -0.021992580965161324, ...
func (m *memClient) SetServiceLifecycleWithContext(ctx context.Context, serviceName string, lc objstore.Lifecycle) error { return errors.New("unimplemented") }
[ 0.28240910172462463, -0.36201736330986023, 0.47739720344543457, -0.34199258685112, -0.6201431155204773, 0.6009601950645447, -0.21126021444797516, -1.2852228879928589, 0.9671579599380493, -0.13266168534755707, -0.606708824634552, 0.17368145287036896, -0.4653991162776947, 0.9179660081863403,...
func (m *memClient) FPutObjectExplicit(ctx context.Context, serviceName, objectName, filePath string, metaData map[string]string, contentType string) (int64, error) { return 0, errors.New("unimplemented") }
[ 0.08041580021381378, -0.47756725549697876, 0.6638476848602295, -0.8354877233505249, -1.1770206689834595, 0.3966999053955078, 0.24811531603336334, 0.047170765697956085, -0.5083390474319458, 0.7004120349884033, -0.9201326370239258, 0.19703033566474915, -0.4805602431297302, -0.137841701507568...
func (m *memClient) SelectObjectContentExplicit(ctx context.Context, serviceName string, objectName string, sqlExpression string, inputSerializationType objstore.InputSerializationType, outputSerializationType objstore.OutputSerializationType) (io.ReadCloser, error) { return nil, errors.New("unimplemented") }
[ -0.03087766095995903, -0.8854619264602661, 0.517328143119812, -0.11175292730331421, -1.2415155172348022, 0.3071006238460541, -0.2992058992385864, -0.6564749479293823, 0.24520917236804962, 0.4353531002998352, 0.08262599259614944, 0.7100182175636292, -0.49458351731300354, -0.4984403252601623...
func (m *memClient) ListBuckets(ctx context.Context) ([]string, error) { return nil, errors.New("unimplemented") }
[ 0.32867616415023804, -0.29534053802490234, 0.5155467391014099, -0.4723877012729645, 0.0624999925494194, 0.4559399485588074, -0.37469878792762756, -1.738476276397705, 0.2985154688358307, -0.4267578125, 0.012119983322918415, 0.22908832132816315, -0.6481703519821167, -0.09044982492923737, -...
func NewMemObjstore() objstore.Client { return &memClient{store: make(map[string]memObj)} }
[ 0.7420448064804077, -1.3008179664611816, 0.22869113087654114, -0.6074984669685364, -1.6651036739349365, -0.19391843676567078, -0.47866854071617126, -0.8139592409133911, 0.2986149191856384, 0.028388071805238724, -0.622879147529602, 0.2598574459552765, -0.8489322066307068, -0.329909563064575...
func NewSemver(major, minor, patch uint32) Semver { return Semver{major, minor, patch} }
[ -0.3490135669708252, -0.5474366545677185, 0.47042298316955566, -0.04490755498409271, -1.2039004564285278, -0.40208563208580017, -0.12190864980220795, -0.1777064949274063, 0.9793582558631897, -0.4657241404056549, -1.3143236637115479, -0.28129667043685913, -0.496982604265213, -0.018325388431...
func SemverCompatible(required, actual Semver) bool { switch { case required.major != actual.major: return false case required.minor > actual.minor: return false case required.minor == actual.minor && required.patch > actual.patch: return false default: return true } }
[ -0.8453953266143799, -1.2415088415145874, 0.764053463935852, 0.2526545524597168, -0.8481752276420593, 1.0671788454055786, -0.4026990532875061, 0.6882982850074768, 0.6547691226005554, 0.9552251100540161, -0.04611612856388092, -0.2626514136791229, -0.3127385079860687, 0.5547316074371338, -...
func (m *DbManager) DropCol(name string) { if err := m.tdConn.Drop(name); err != nil { panic(err) } }
[ -0.5747202038764954, 0.009515571407973766, 0.5015198588371277, -0.39390993118286133, 0.148412823677063, 0.7480268478393555, -0.286792516708374, -0.4387272596359253, -1.1230216026306152, 0.5060099959373474, -0.8838900923728943, -0.5658672451972961, 0.15521013736724854, -0.2769243121147156, ...
func (m *DbManager) ScrubCol(name string) { if err := m.tdConn.Scrub(name); err != nil { panic(err) } }
[ -0.015500918962061405, 0.36145949363708496, 0.3058509826660156, -0.3063925802707672, -0.2208271324634552, 0.6950206756591797, 0.030466880649328232, -0.31226029992103577, -0.6934517621994019, 0.4292103350162506, -0.2976723313331604, -0.11066360026597977, 0.2860707640647888, 0.04484958201646...
func TestRemoveEdge(t *testing.T) { var ctx context.Context c := createClient(t, nil) db := ensureDatabase(ctx, c, "edge_test", nil, t) prefix := "remove_edge_" g := ensureGraph(ctx, db, prefix+"graph", nil, t) ec := ensureEdgeCollection(ctx, g, prefix+"citiesPerState", []string{prefix + "city"}, []string{prefix ...
[ 0.16580775380134583, 0.04711324721574783, 0.9471840858459473, -1.050450086593628, 0.5321767330169678, 0.4167984127998352, 0.5403162240982056, 0.7282988429069519, -0.07049698382616043, 0.8794119358062744, -0.11846266686916351, -0.2704768478870392, -0.8752207159996033, -0.6614492535591125, ...
func TestRemoveEdgeReturnOld(t *testing.T) { var ctx context.Context c := createClient(t, nil) skipBelowVersion(c, "3.4", t) // See https://github.com/arangodb/arangodb/issues/2363 db := ensureDatabase(ctx, c, "edge_test", nil, t) prefix := "remove_edge_returnOld_" g := ensureGraph(ctx, db, prefix+"graph", nil, t...
[ 0.5332757830619812, -0.3918536603450775, 0.9454944729804993, -1.1263309717178345, 0.04700947925448418, -0.04962199553847313, 0.527569591999054, 0.3932233452796936, 0.17938964068889618, 0.4979628324508667, 0.07733260840177536, -0.10281632095575333, -0.7624855637550354, -0.8804733753204346, ...
func TestRemoveEdgeSilent(t *testing.T) { var ctx context.Context c := createClient(t, nil) db := ensureDatabase(ctx, c, "edge_test", nil, t) prefix := "remove_edge_silent_" g := ensureGraph(ctx, db, prefix+"graph", nil, t) ec := ensureEdgeCollection(ctx, g, prefix+"citiesPerState", []string{prefix + "city"}, []s...
[ 0.8718651533126831, -0.2406967282295227, 1.053362488746643, -0.9020897150039673, -0.001750453724525869, 0.3820873498916626, 0.10047776997089386, 0.774451494216919, 0.37157142162323, 0.7815267443656921, -0.3205098807811737, -0.026676837354898453, -0.4897086024284363, -0.827987551689148, 0...