text
stringlengths
11
6.3k
embedding
listlengths
768
768
func EncodeKeyValue(enc types.Encoder, key string, value interface{}) (err error) { err = enc.AddKey(key) if err != nil { return err } return EncodeValue(enc, value) }
[ -0.013669884763658047, 0.16056549549102783, 0.6059271097183228, 0.5893331170082092, -0.980296790599823, 0.634037435054779, -0.8170197606086731, -0.23131506145000458, 0.1698518842458725, 0.3723014295101166, -0.24139948189258575, 0.7063321471214294, 0.28306686878204346, 0.773009717464447, ...
func EncodeStringKeyValue(enc types.Encoder, key string, value string) (err error) { err = enc.AddKey(key) if err != nil { return err } return enc.AddString(value) }
[ 0.16402390599250793, -0.4623221158981323, 0.31392407417297363, -0.04742830991744995, -0.7437390089035034, 0.1725286841392517, -1.1652631759643555, -0.35898682475090027, -0.4160027503967285, 0.7031664848327637, -0.32590651512145996, 0.7546645998954773, 0.09729312360286713, -0.00206020195037...
func EncodeTimeKeyValue(enc types.Encoder, key string, value time.Time) (err error) { err = enc.AddKey(key) if err != nil { return err } return enc.AddTime(value) }
[ -0.7329312562942505, -0.01729319989681244, 0.6998777389526367, 0.2021912932395935, -0.8576391935348511, 0.29518285393714905, -0.7946881055831909, -0.6462056636810303, -0.26816612482070923, 1.3029733896255493, -0.5718929767608643, 0.13454791903495789, 0.14031818509101868, 1.201841115951538,...
func EncodeAddTimestampKeyValue( enc types.Encoder, key string, value time.Time, ) (err error) { err = enc.AddKey(key) if err != nil { return err } return enc.AddTimestamp(value) }
[ -0.583614706993103, 0.09417837113142014, 0.582456111907959, 0.3160629868507385, -0.5396337509155273, 0.5383982062339783, -0.9585744142532349, -0.5341414213180542, 0.5389140248298645, 0.4740663766860962, -0.7157564759254456, -0.042142368853092194, 0.31042012572288513, 0.7923303842544556, ...
func EncodeValue(enc types.Encoder, value interface{}) (err error) { switch val := value.(type) { case uint: return enc.AddUint64(uint64(val)) case *uint: return enc.AddUint64(uint64(*val)) case uint16: return enc.AddUint16(val) case *uint16: return enc.AddUint16(*val) case uint32: return enc.AddUi...
[ -0.32639431953430176, 0.24427814781665802, 1.0820646286010742, 0.37554559111595154, 0.2575925588607788, -0.22618059813976288, 0.22074708342552185, -0.6706467866897583, 0.9566423296928406, -0.023936854675412178, -0.21937185525894165, 0.4465281069278717, -0.07262104004621506, 1.3910557031631...
func (c *CheckedLock) Lock() { c.lock.Lock() c.locked = true }
[ 0.37059012055397034, 0.7140669226646423, 0.1425316333770752, 0.4559701681137085, 1.0290584564208984, 1.02615225315094, 1.3240607976913452, 0.19493404030799866, -0.33293962478637695, -1.8068972826004028, -0.3679707944393158, 0.22743593156337738, -0.7956205010414124, -0.1490548551082611, 0...
func (c *CheckedLock) Unlock() { if !c.locked { Bug("Double unlocking sync.Mutex") } c.locked = false c.lock.Unlock() }
[ 0.04988786578178406, 0.9132279753684998, 0.18657906353473663, 0.7144821286201477, 0.6029955148696899, 0.22718794643878937, 0.7936384081840515, 0.6527129411697388, -0.3191283941268921, -0.8012153506278992, -0.3039979934692383, 0.42042168974876404, -0.5095924735069275, -0.04173832759261131, ...
func Bug(s string, args ...interface{}) { panic(fmt.Sprintf("BUG: "+s, args...)) }
[ 0.5732179880142212, -0.3262692093849182, 0.46394118666648865, 0.6744748950004578, -0.005734908860176802, 0.5666365027427673, -0.04663927108049393, 0.6298791170120239, 0.09522496908903122, -0.6343991756439209, -0.18692819774150848, 0.8940362334251404, 0.5423744916915894, -0.6319524049758911...
func Fatal(s string, args ...interface{}) { panic(fmt.Sprintf("FATAL ERROR: "+s, args...)) }
[ 1.127553939819336, -0.23547355830669403, 0.27292442321777344, 0.6681283712387085, 0.2877877652645111, 0.5819816589355469, -1.0234242677688599, 0.6338177919387817, -0.21501579880714417, -0.0205624271184206, 0.5985022783279419, 0.8574017286300659, 0.5227239727973938, -0.29754555225372314, ...
func NotImplemented(s string, args ...interface{}) { panic(fmt.Sprintf("NOT IMPLEMENTED: "+s, args...)) }
[ 0.5492588877677917, -0.3430953919887543, 0.3660641312599182, -0.7575129270553589, -0.20458196103572845, 0.6438784599304199, 0.3149101734161377, 0.41465142369270325, -0.2621174454689026, 0.5582144856452942, -0.27820491790771484, 0.827557384967804, 0.33890432119369507, 0.5040624737739563, ...
func ConcatCopyPreAllocate(slices [][]byte) []byte { var totalLen int for _, s := range slices { totalLen += len(s) } tmp := make([]byte, totalLen) var i int for _, s := range slices { i += copy(tmp[i:], s) } return tmp }
[ 0.32039421796798706, -0.04954807832837105, 0.805284321308136, -0.04815637692809105, -1.1875956058502197, -0.3189627230167389, 0.13611815869808197, -0.2782978117465973, 1.1024818420410156, 0.1564253866672516, 0.8356875777244568, -0.10919920355081558, -0.17728939652442932, 0.2871392071247101...
func InColor(str string, color Color, style Style) string { return fmt.Sprintf("\033[%d;%dm%s\033[0m", style, color, str) }
[ 0.8979315161705017, -0.30625689029693604, 0.6004970669746399, -0.5183910131454468, -0.8058100342750549, 0.6230579018592834, -1.2270454168319702, 1.24583899974823, -0.5137057304382324, 0.44951120018959045, 0.4972977042198181, 1.1250871419906616, -0.522942304611206, -0.4577164053916931, 0....
func NewStringSet(lists ...[]string) StringSet { ret := make(map[string]bool) for _, list := range lists { for _, entry := range list { ret[entry] = true } } return ret }
[ -0.38113972544670105, 0.12603065371513367, 0.4690762162208557, 0.17001646757125854, -0.9565363526344299, 0.20635516941547394, -0.7219171524047852, 0.4276786744594574, -0.9637554883956909, 0.08464624732732773, -0.12585492432117462, -0.280006468296051, -0.6218559145927429, 0.6211316585540771...
func (s StringSet) Copy() StringSet { if s == nil { return nil } ret := make(StringSet, len(s)) for k, v := range s { ret[k] = v } return ret }
[ 0.06604649126529694, -0.8015682697296143, 0.3129443824291229, -0.8175327777862549, -1.4182124137878418, -0.5189453363418579, -0.6342027187347412, -1.0737568140029907, 0.6188972592353821, -0.03665129467844963, 0.8471946120262146, 1.0462183952331543, -0.7023100256919861, -0.7242432832717896,...
func (s StringSet) Keys() []string { ret := make([]string, 0, len(s)) for v := range s { ret = append(ret, v) } return ret }
[ -0.8016737699508667, -0.6295546293258667, -0.04616649076342583, -1.2682592868804932, 0.2758146822452545, -0.4513474106788635, -1.4519890546798706, -0.23283198475837708, 0.11849146336317062, 0.506242573261261, 0.4879201352596283, 1.4928865432739258, -0.9854893088340759, -0.4333440363407135,...
func (s StringSet) String() string { if s == nil { return "<nil StringSet>" } return fmt.Sprintf("[%s]", strings.Join(s.Keys(), ",")) }
[ 0.0659933090209961, -0.6710060238838196, 0.19280248880386353, -1.512367844581604, -0.17869538068771362, -0.6452732682228088, -0.3085940182209015, -0.9304230213165283, 0.19436386227607727, 0.1294509470462799, 0.639750063419342, 1.1285852193832397, 0.0822334811091423, 0.18554946780204773, ...
func (s StringSet) Intersect(other StringSet) StringSet { resultSet := make(StringSet, len(s)) for val := range s { if other[val] { resultSet[val] = true } } return resultSet }
[ 0.02162281423807144, -0.1388680785894394, 0.6307734847068787, -0.5485939383506775, -1.1396087408065796, -0.6312379837036133, -1.4601318836212158, -0.9144856929779053, -0.4117242991924286, 0.9619962573051453, 0.9322870969772339, 0.12213857471942902, -0.8610401153564453, 0.5591087341308594, ...
func (s StringSet) Complement(other StringSet) StringSet { resultSet := make(StringSet, len(s)) for val := range s { if !other[val] { resultSet[val] = true } } return resultSet }
[ -0.11647854745388031, -0.7302650213241577, 0.540604293346405, -1.0562984943389893, -1.1972841024398804, -0.143093079328537, -1.1107572317123413, -0.6543437242507935, 0.0955662801861763, 0.5397198796272278, -0.002336970530450344, 0.5094583034515381, -0.25451231002807617, 0.49124768376350403...
func (s StringSet) Union(other StringSet) StringSet { resultSet := make(StringSet, len(s)) for val := range s { resultSet[val] = true } for val := range other { resultSet[val] = true } return resultSet }
[ -0.43732836842536926, 0.03004065528512001, 0.4118610620498657, -1.0469802618026733, -0.6457904577255249, -0.7087370157241821, -0.8649098873138428, -0.575203001499176, 0.5396378040313721, -0.23079490661621094, 0.18925932049751282, 0.8771084547042847, -0.32248252630233765, -0.284153163433074...
func (s StringSet) AddLists(lists ...[]string) StringSet { for _, oneList := range lists { for _, item := range oneList { s[item] = true } } return s }
[ -0.02341115102171898, 0.2880333960056305, 0.4327385425567627, -0.38222408294677734, -0.0423637330532074, 0.799121618270874, -1.3728896379470825, 0.09730031341314316, 0.3204244077205658, -0.5519769787788391, 0.5489397644996643, -0.45834046602249146, -1.1006075143814087, 0.3598305284976959, ...
func AuthCallback(w http.ResponseWriter, r *http.Request) { code := r.FormValue("code") callbackState := r.FormValue("state") clientID, err := state.DecryptState(callbackState, os.Getenv("SECRET")) if err != nil { http.Error(w, "State could not be verified", http.StatusBadRequest) return } configValue, err ...
[ -0.0444922111928463, 0.2743503451347351, 0.7162516713142395, -0.11795849353075027, 0.29987630248069763, 0.1961265206336975, 0.5008874535560608, 0.2265021800994873, 1.203986406326294, 0.5582560300827026, 0.2897816598415375, 0.5982951521873474, 0.5082919597625732, 0.25534722208976746, 1.02...
func newHand(cards []string) Hand { trans := map[string]int{"A": 14, "K": 13, "Q": 12, "J": 11, "T": 10} var ranks []int // The ranks field. suits := make(map[string]bool) // The suits field. rankToCount := make(map[int]int) // Used to create other fields. for _, card := range cards { s := st...
[ -0.08942320942878723, -0.10710027813911438, 0.7328696846961975, -0.6012434959411621, -0.5213937163352966, 0.30819013714790344, 1.5980513095855713, -0.6040382981300354, -0.07160371541976929, -0.2317633479833603, -0.05698588490486145, 0.12589186429977417, 0.5146098136901855, -0.4668935835361...
func isEqual(x, y []int) bool { if len(x) != len(y) { return false } for i := 0; i < len(x); i++ { if x[i] != y[i] { return false } } return true }
[ -0.49234896898269653, 0.5758864879608154, 0.8559548258781433, 0.17447148263454437, 0.7983275055885315, 0.19996269047260284, -1.2787026166915894, -0.8372398018836975, -0.046283058822155, 1.0843771696090698, -1.3200984001159668, 0.6725212335586548, -0.7275840044021606, 0.2617594003677368, ...
func (h Hand) evaluate() int { switch { case h.straightflush(): return 8 case h.fourofakind(): return 7 case h.fullhouse(): return 6 case h.flush(): return 5 case h.straight(): return 4 case h.threeofakind(): return 3 case h.twopair(): return 2 case h.onepair(): return 1 default: return 0 }...
[ -0.6192418932914734, 0.6411210894584656, 0.6929294466972351, 0.05112993344664574, -0.48958632349967957, -0.047007691115140915, 0.20879092812538147, 0.10136771947145462, -0.5301709771156311, -0.29247188568115234, -0.23961010575294495, -0.44939330220222473, -0.6632698178291321, 0.94542431831...
func player1wins(h1, h2 Hand) bool { // First check whether hands have different value on eight-point scale. if v1, v2 := h1.evaluate(), h2.evaluate(); v1 != v2 { return v1 > v2 } // If those values are equal, perform lexicographic comparison based on // the groups field, a slice of [count rank] pairs ordered by...
[ -0.5206590294837952, -0.5047098398208618, 0.8447651267051697, 0.7371252775192261, -0.42925265431404114, 0.32274922728538513, -0.14148123562335968, -0.7179015278816223, -0.7116488814353943, 0.21367932856082916, -0.04255101829767227, 0.7740569710731506, -0.07500670850276947, 0.12993291020393...
func NewAllowallHandler() *AllowAllHandler { handler := &AllowAllHandler{logger: log.WithField("handler", "allowall")} return handler }
[ 1.1792582273483276, -0.8900899887084961, 0.31845200061798096, 0.3785923719406128, -2.2808988094329834, 0.39242276549339294, -0.5145226716995239, 0.8266427516937256, 0.22500984370708466, 0.07490615546703339, -0.011855042539536953, 0.7356531023979187, -0.6363354921340942, 0.8663358688354492,...
func (handler *AllowAllHandler) CheckQuery(sqlQuery string, parsedQuery sqlparser.Statement) (bool, error) { // allow any query and stop further checks handler.logger.Infof("Query has been allowed by Allowall handler") return false, nil }
[ 0.3125680685043335, -0.9573903679847717, 0.434571772813797, 0.6185869574546814, -0.935239851474762, 0.9460872411727905, -1.1155918836593628, 0.20309893786907196, -0.059057656675577164, 0.287596732378006, 1.0158748626708984, 0.3125804364681244, -0.7784889340400696, 0.6274683475494385, -0....
func (handler *AllowAllHandler) Release() { return }
[ -0.2387969046831131, -0.48147153854370117, 0.29438936710357666, 0.5201047658920288, -1.2184886932373047, 0.7787221670150757, 0.5584944486618042, 0.6822779774665833, 0.3285287916660309, -0.3160794675350189, 0.40303996205329895, 0.6145994663238525, -1.2496349811553955, 0.7027618288993835, ...
func RootRequest(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json") w.Header().Set("Access-Control-Allow-Origin", "*") json, _ := json.Marshal(Response{Player{"Test", Stats{1, 2, 3, 4, 5, 6}}}) w.Write(json) }
[ 0.10532267391681671, -1.0515369176864624, 0.6739581823348999, 0.2718118727207184, -0.3558650612831116, 0.023754548281431198, 0.25345325469970703, -0.9398941993713379, -0.041812121868133545, -0.20754685997962952, 0.494258850812912, 0.8970490097999573, 0.13677166402339935, 0.4126332998275757...
func stageNewRuns(ctx context.Context, c *prjpb.Component, cls map[int64]*clInfo, pm pmState) ([]*runcreator.Creator, time.Time, error) { var next time.Time var out []*runcreator.Creator rs := runStage{ pm: pm, c: c, cls: cls, visitedCLs: make(map[int64]struct{}, len(cls)), } // Fo...
[ -0.9053389430046082, -0.6168485879898071, 0.5820143818855286, 0.5434040427207947, -0.34062379598617554, -0.3810350298881531, -0.08636002242565155, -0.10141541808843613, -0.5964600443840027, 0.00852233450859785, -0.08149904757738113, 0.21378003060817719, -0.07398248463869095, 1.258349537849...
func (rs *runStage) markVisited(clid int64) bool { if _, visited := rs.visitedCLs[clid]; visited { return false } rs.visitedCLs[clid] = struct{}{} return true }
[ -1.8383702039718628, 0.43055084347724915, 0.5790815353393555, -0.4536835253238678, -0.06836515665054321, 0.33475586771965027, 1.3801144361495972, -0.38305506110191345, 0.15157581865787506, 0.3112698793411255, -0.6741818189620972, 0.5065327286720276, -0.21838213503360748, 0.7450934052467346...
func (c *combo) overlappingRuns() map[int32]int { res := map[int32]int{} for _, info := range c.all { for _, index := range info.runIndexes { res[index]++ } } return res }
[ -0.30444151163101196, -0.047420624643564224, 0.6241070032119751, 0.1211266815662384, -0.14310747385025024, 0.5448488593101501, 1.0483464002609253, 0.2613317668437958, -0.5173785090446472, -0.30060335993766785, 0.12080498039722443, -0.11851321905851364, -0.45514142513275146, 0.5271542072296...
func checkExisting(ctx context.Context, rc *runcreator.Creator, combo combo, useTrigger func(*run.Triggers) *run.Trigger) (bool, time.Time, error) { // Check if Run about to be created already exists in order to detect avoid // infinite retries if CL triggers are somehow re-used. existing := run.Run{ID: rc.ExpectedR...
[ -0.478861540555954, -0.07767672091722488, 0.758884608745575, -0.05323072895407677, 0.8207892179489136, -0.037379782646894455, 0.500427782535553, 0.13871917128562927, -0.29234668612480164, 0.5575005412101746, -0.4375806450843811, 0.07280122488737106, 0.025594674050807953, 0.7722488045692444...
func Part2(ctx context.Context, input string) (interface{}, error) { g1 := new4DSpace(strings.Split(input, "\n"), ".") g2 := new4DSpace(strings.Split(input, "\n"), ".") var curr, next map[coordinate4D]string for i := 0; i < 6; i++ { if i%2 == 0 { curr = g1 next = g2 } else { curr = g2 next = g1 }...
[ 0.5037214159965515, -0.9659969210624695, 1.0151536464691162, -0.41932860016822815, -1.1993422508239746, -0.25067174434661865, 0.876176118850708, -0.6378249526023865, -0.28731319308280945, 0.17545031011104584, -0.411247193813324, -0.23299723863601685, -0.3100353479385376, -0.139189943671226...
func NewMockUpdateConnectorClient(ctrl *gomock.Controller) *MockUpdateConnectorClient { mock := &MockUpdateConnectorClient{ctrl: ctrl} mock.recorder = &MockUpdateConnectorClientMockRecorder{mock} return mock }
[ -0.8193512558937073, -1.1857267618179321, 0.256801575422287, 0.12897756695747375, -0.8597540259361267, 0.05055956169962883, 0.5980961918830872, -0.18410257995128632, 0.4828791916370392, 0.5914312601089478, -0.11383944749832153, -0.5950292348861694, -0.6548542976379395, -0.00727782258763909...
func (m *MockUpdateConnectorClient) EXPECT() *MockUpdateConnectorClientMockRecorder { return m.recorder }
[ -0.21172742545604706, -0.5926718711853027, 0.2866726219654083, 0.0019515624735504389, -0.4169479310512543, 0.40392836928367615, -0.05287671834230423, 0.07811471074819565, 0.239361971616745, 0.005992684978991747, 0.8602790236473083, 0.256773978471756, -1.0547246932983398, 0.2850179970264435...
func (m *MockUpdateConnectorClient) UpdateConnectorStatus(ctx context.Context, connectorKey, state string) (*meroxa.Connector, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "UpdateConnectorStatus", ctx, connectorKey, state) ret0, _ := ret[0].(*meroxa.Connector) ret1, _ := ret[1].(error) return ret0, ret1 }
[ -1.3098564147949219, -1.2204326391220093, 0.3257633149623871, -0.049043867737054825, 0.28529906272888184, 0.27538567781448364, 0.367499440908432, -0.050658807158470154, -0.31134217977523804, -0.7385866641998291, -0.6420716047286987, -0.49644550681114197, -0.3607722222805023, 0.509570300579...
func (mr *MockUpdateConnectorClientMockRecorder) UpdateConnectorStatus(ctx, connectorKey, state interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateConnectorStatus", reflect.TypeOf((*MockUpdateConnectorClient)(nil).UpdateConnectorStatus), ctx, connectorKey,...
[ -0.8748046159744263, -0.6263374090194702, 0.06734266877174377, -0.23080134391784668, -0.4357357919216156, 0.3380748927593231, -0.6719176769256592, -0.41403183341026306, 0.9598715901374817, 0.45232093334198, 0.44379881024360657, 0.14956311881542206, -0.20388798415660858, 0.7744552493095398,...
func (m *HTTPReqDatum) GetHeaderValues(key string) []string { res := make([]string, 0) if m != nil { for _, h := range m.Headers { if h.Key == key { res = append(res, h.Value) } } } return res }
[ -0.9580124616622925, -0.12800616025924683, 0.8561030626296997, 0.7217472791671753, -0.3191860020160675, -0.07222308218479156, -1.3372020721435547, 0.05752900242805481, -0.6807306408882141, -0.0001780473830876872, 0.0795225203037262, 0.4665919542312622, -0.5047085285186768, 1.31947255134582...
func (m *HTTPReqDatum) GetHeader(key string) string { values := m.GetHeaderValues(key) if len(values) > 0 { return values[0] } return "" }
[ -0.696120023727417, 0.08787082880735397, 0.523316502571106, 0.6762446761131287, -0.006669322960078716, 0.170329749584198, -0.6368764638900757, -0.9224182367324829, -0.12479297071695328, -0.05939231440424919, 1.2864700555801392, -0.06627458333969116, -0.24455639719963074, 0.4406250119209289...
func (m *HTTPRespDatum) GetHeaderValues(key string) []string { res := make([]string, 0) if m != nil { for _, h := range m.Headers { if h.Key == key { res = append(res, h.Value) } } } return res }
[ -0.7606776356697083, -0.22533626854419708, 0.8293612599372864, 0.49078649282455444, -0.07756790518760681, -0.16802121698856354, -1.3723423480987549, 0.02189469337463379, -0.5214006304740906, -0.20795121788978577, 0.016684968024492264, -0.048949114978313446, -0.5818887948989868, 1.041701912...
func (m *HTTPRespDatum) GetHeader(key string) string { values := m.GetHeaderValues(key) if len(values) > 0 { return values[0] } return "" }
[ -0.17403577268123627, -0.02493647299706936, 0.4166538417339325, 0.12894494831562042, 0.3355499804019928, -0.10060445219278336, -0.4935135245323181, -1.0272847414016724, 0.18748028576374054, -0.36090755462646484, 1.1164008378982544, -0.8241720795631409, -0.41897839307785034, 0.0004955506883...
func main() { cmd.Execute(ExampleNewWatcher) }
[ 0.4402826726436615, -0.6868619918823242, 0.5221002697944641, 1.4567590951919556, 0.4331481456756592, 1.1174185276031494, 0.349348247051239, 0.37246331572532654, -1.2291837930679321, -0.5399147868156433, -0.5886014103889465, 0.7737663984298706, 0.35561078786849976, 0.6770439147949219, -0....
func NewAdministrativeUnit()(*AdministrativeUnit) { m := &AdministrativeUnit{ DirectoryObject: *NewDirectoryObject(), } odataTypeValue := "#microsoft.graph.administrativeUnit"; m.SetOdataType(&odataTypeValue); return m }
[ 0.527016282081604, -0.2190999984741211, -0.011510784737765789, -1.0323565006256104, -0.4515228271484375, 0.291089802980423, 0.12747149169445038, -0.4465811252593994, 0.15095154941082, -0.5770509839057922, -0.06507588922977448, 1.7507332563400269, -0.2055589258670807, 0.0859999805688858, ...
func CreateAdministrativeUnitFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewAdministrativeUnit(), nil }
[ 0.7152029871940613, -0.13358192145824432, 0.25704488158226013, -0.9056566953659058, -0.3810510039329529, 0.6392378211021423, -0.06888781487941742, 0.1864291876554489, 0.28419721126556396, -0.6096034646034241, 0.002841335255652666, 0.43210265040397644, 0.42341360449790955, 0.555324971675872...
func (m *AdministrativeUnit) GetDescription()(*string) { return m.description }
[ 0.6904609799385071, 0.3588825762271881, 0.058002717792987823, 0.525545597076416, 0.7690773010253906, 1.2060445547103882, 0.3586937189102173, -0.8271234035491943, 0.3722842335700989, 0.2100232094526291, 0.6013928055763245, 0.7037697434425354, -0.7325195074081421, 0.0706353709101677, 0.105...
func (m *AdministrativeUnit) GetDisplayName()(*string) { return m.displayName }
[ 0.6339920163154602, -0.11693617701530457, 0.37178313732147217, 0.680935800075531, -0.22734718024730682, 0.8555224537849426, 0.1320687085390091, -0.674939751625061, 0.04750283062458038, -0.1957184374332428, 0.48474445939064026, 0.05549679696559906, -0.2762192189693451, 0.21567696332931519, ...
func (m *AdministrativeUnit) GetExtensions()([]Extensionable) { return m.extensions }
[ 0.7963733077049255, 0.655038058757782, 0.05663904547691345, 1.2211687564849854, 0.904487133026123, 0.4826244115829468, -0.09815353900194168, -1.2528295516967773, 0.8555920124053955, -0.032116618007421494, -0.010598542168736458, 0.7163636088371277, -1.0243918895721436, 0.5536211729049683, ...
func (m *AdministrativeUnit) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := m.DirectoryObject.GetFieldDeserializers() res["description"] = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.SetStringValue(m.Set...
[ 0.016579382121562958, 0.026826130226254463, 0.5579764246940613, -1.1079264879226685, -0.24427497386932373, -0.2564884424209595, 0.4288288950920105, -0.19467449188232422, -0.4304966628551483, -0.582486629486084, -0.6844691038131714, 0.5748193264007568, -0.6402590870857239, 0.115745730698108...
func (m *AdministrativeUnit) GetMembers()([]DirectoryObjectable) { return m.members }
[ -0.341423362493515, 0.1682988554239273, 0.08483225852251053, 0.28248608112335205, 1.6356635093688965, 0.5495378971099854, 0.2649649381637573, -0.7918651103973389, 0.5493929386138916, -1.1329411268234253, 0.5649948716163635, 1.2812694311141968, -0.8103070259094238, 0.46425649523735046, -0...
func (m *AdministrativeUnit) GetScopedRoleMembers()([]ScopedRoleMembershipable) { return m.scopedRoleMembers }
[ -0.6237340569496155, -0.16589513421058655, -0.061595313251018524, 0.0074943965300917625, 1.0389618873596191, 0.34697145223617554, -0.9913821220397949, -0.5177291631698608, 0.48264452815055847, 0.3097897469997406, 0.019108938053250313, 1.7350034713745117, -1.528225064277649, 0.3501430451869...
func (m *AdministrativeUnit) GetVisibility()(*string) { return m.visibility }
[ 0.3738167881965637, 0.21039533615112305, 0.32677987217903137, 0.6604817509651184, 0.5919753909111023, 1.2020457983016968, 0.792608916759491, -0.7892851829528809, 0.36626434326171875, 0.42032408714294434, 0.3580586612224579, 0.12509365379810333, -0.2708360552787781, 0.21890652179718018, 0...
func (m *AdministrativeUnit) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { err := m.DirectoryObject.Serialize(writer) if err != nil { return err } { err = writer.WriteStringValue("description", m.GetDescription()) ...
[ -0.2795005142688751, -0.24695520102977753, 0.6865754723548889, -0.6412115693092346, 0.5034997463226318, 0.06767082959413528, 1.1127262115478516, -0.7367681860923767, -0.20800219476222992, -0.24637605249881744, -0.29982995986938477, 0.5436238646507263, -0.5476886034011841, 0.641762733459472...
func (m *AdministrativeUnit) SetDescription(value *string)() { m.description = value }
[ 0.19644959270954132, 0.8446438908576965, -0.007052417378872633, 0.22963160276412964, 0.6500097513198853, 1.5785322189331055, 0.4826450049877167, -0.4168958365917206, -0.08837053924798965, 0.5827393531799316, 0.29094794392585754, 0.049422238022089005, 0.007349402643740177, 1.152752757072448...
func (m *AdministrativeUnit) SetDisplayName(value *string)() { m.displayName = value }
[ 0.17385047674179077, 0.25959107279777527, 0.28816938400268555, 0.6057941317558289, -0.5960618853569031, 1.0720648765563965, 0.5734151005744934, -0.7616655230522156, -0.111326202750206, 0.2711057960987091, -0.0772182047367096, -0.804574191570282, 0.22284607589244843, 0.7876622080802917, 0...
func (m *AdministrativeUnit) SetExtensions(value []Extensionable)() { m.extensions = value }
[ 0.2308044135570526, 1.2078583240509033, -0.013112551532685757, 1.055448055267334, 0.6502895355224609, 0.6692132353782654, 0.37900298833847046, -1.005067229270935, 0.08443059772253036, -0.2842159867286682, -0.16306203603744507, -0.19630341231822968, -0.4768056571483612, 0.9809138774871826, ...
func (m *AdministrativeUnit) SetMembers(value []DirectoryObjectable)() { m.members = value }
[ -0.8241803646087646, 0.9669085741043091, -0.045241471379995346, -0.04051710665225983, 1.1824406385421753, 0.9690109491348267, 0.49929943680763245, -0.5867738723754883, -0.3030032515525818, -0.6239367723464966, 0.3058222532272339, 0.4251222014427185, -0.238022118806839, 0.9992895722389221, ...
func (m *AdministrativeUnit) SetScopedRoleMembers(value []ScopedRoleMembershipable)() { m.scopedRoleMembers = value }
[ -0.7903241515159607, -0.05183412507176399, -0.09592684358358383, -0.495315283536911, 0.7999489903450012, 0.7308622598648071, -0.35065412521362305, -0.416146844625473, -0.04540082439780235, 0.6114076972007751, -0.17516842484474182, 1.1595700979232788, -1.2804737091064453, 0.6971184015274048...
func (m *AdministrativeUnit) SetVisibility(value *string)() { m.visibility = value }
[ 0.10911771655082703, 0.846527636051178, 0.22291401028633118, 0.3747797906398773, 0.3230513632297516, 1.5023871660232544, 0.9051939249038696, -0.4004300832748413, -0.04597558081150055, 0.8679883480072021, 0.058942075818777084, -0.7692142724990845, 0.12032855302095413, 1.1164114475250244, ...
func main() { var isShow bool var age int var num int8 fmt.Println(isShow, age, num) // 多个变量的声明与赋值 //多个变量的声明 var a, b, c, d int // 多个变量的赋值 a, b, c, d = 1, 2, 3, 4 // 多个变量声明的同时赋值 var e, f, g, h int = 5, 6, 7, 8 // 省略变量类型,由系统推断 var i, j, k, l = 9, 10, 11, 12 // 多个变量声明与赋值的最简写法 i, m, n, o := 12, 23, 43...
[ 0.4186592698097229, 0.035130858421325684, 1.0454882383346558, 0.34648457169532776, -0.15339311957359314, 0.6299086809158325, 1.779695987701416, 0.34619632363319397, 0.2650102376937866, 0.9598745107650757, -0.2663975954055786, 0.8893675804138184, -0.052111297845840454, 0.9055430293083191, ...
func (t *Awattar) Rates() (api.Rates, error) { t.mux.Lock() defer t.mux.Unlock() return slices.Clone(t.data), outdatedError(t.updated, time.Hour) }
[ -0.27431046962738037, -0.06503255665302277, 0.1912347972393036, -0.5503376126289368, 0.3240151107311249, 0.09540976583957672, -1.1493384838104248, -1.0096989870071411, 0.023287178948521614, 0.28444042801856995, -0.09303978830575943, -0.020303718745708466, -0.8853347897529602, -0.0206094793...
func (t *Awattar) Type() api.TariffType { return api.TariffTypePriceDynamic }
[ -0.741841733455658, 0.018058383837342262, 0.5719361305236816, -0.27123355865478516, 0.677435040473938, 0.4965067207813263, 0.7060425877571106, -1.7901644706726074, -0.2932603061199188, 0.3517219126224518, -0.031244995072484016, 0.9822660088539124, 0.17237693071365356, 0.8980586528778076, ...
func (c *HMACStrategy) Generate() (string, string, error) { if len(c.GlobalSecret) < minimumSecretLength/2 { return "", "", errors.New("Secret is not strong enough") } if c.AuthCodeEntropy < minimumEntropy { c.AuthCodeEntropy = minimumEntropy } // When creating secrets not intended for usage by human users (...
[ -0.41011911630630493, -0.23944832384586334, 0.6696293950080872, 0.2646261155605316, 0.13630925118923187, -0.058889467269182205, -0.0409882627427578, -0.10584983229637146, -0.21715061366558075, 0.5910160541534424, -0.6169776916503906, 0.6880560517311096, -0.023781338706612587, 0.41568014025...
func (c *HMACStrategy) Validate(token string) error { split := strings.Split(token, ".") if len(split) != 2 { return errors.WithStack(fosite.ErrInvalidTokenFormat) } key := split[0] signature := split[1] if key == "" || signature == "" { return errors.WithStack(fosite.ErrInvalidTokenFormat) } decodedSigna...
[ 0.3867059350013733, 0.16672435402870178, 0.7678821682929993, 0.7231513261795044, 0.4823204278945923, -0.8760706782341003, -0.046780481934547424, -0.6855183839797974, -0.33920615911483765, 0.39848315715789795, -0.24808014929294586, 0.26462823152542114, -0.32905060052871704, 0.09479640424251...
func NewLogMetricsCollector(podStats func(ctx context.Context) ([]statsapi.PodStats, error)) metrics.StableCollector { return &logMetricsCollector{ podStats: podStats, } }
[ -0.3634795546531677, 0.01660289615392685, 0.36397337913513184, -0.2838101387023926, -0.978532075881958, -0.2910560667514801, -0.7178703546524048, -1.6584700345993042, 0.07362531870603561, -0.5396272540092468, -0.0042387694120407104, 0.7719835042953491, 0.05538639426231384, 0.04399549588561...
func (c *logMetricsCollector) DescribeWithStability(ch chan<- *metrics.Desc) { ch <- descLogSize }
[ 0.5210325121879578, 0.2830207347869873, 0.43562889099121094, -0.5280016660690308, 0.3209884762763977, -0.4279469847679138, -0.034105900675058365, -0.6589922308921814, -1.0985479354858398, 0.1527586281299591, -0.3591000437736511, 0.8335456252098083, 0.0877157598733902, 1.0670702457427979, ...
func (c *logMetricsCollector) CollectWithStability(ch chan<- metrics.Metric) { podStats, err := c.podStats(context.Background()) if err != nil { klog.ErrorS(err, "Failed to get pod stats") return } for _, ps := range podStats { for _, c := range ps.Containers { if c.Logs != nil && c.Logs.UsedBytes != nil ...
[ 0.3510224223136902, -1.0357967615127563, 0.8130818605422974, -0.10939405858516693, 0.22250398993492126, 0.03553634509444237, -0.07966888695955276, -1.2204644680023193, -0.7853665351867676, 0.2678321897983551, 0.09442006796598434, 0.1182916909456253, 0.44413578510284424, 1.2052185535430908,...
func Logger() log.Logger { stdErr := log.With(log.NewLogfmtLogger(log.NewSyncWriter(os.Stderr)), "ts", log.DefaultTimestampUTC) stdOut := log.With(log.NewLogfmtLogger(log.NewSyncWriter(os.Stdout)), "ts", log.DefaultTimestampUTC) switched := &toStdErrWhenErrorSet{err: stdErr, out: stdOut} return makeDebugLogger(sw...
[ -0.33273768424987793, -0.3421021103858948, 0.6411934494972229, -0.45596352219581604, -0.3634544610977173, -0.5584362149238586, -1.1752671003341675, -0.5301215648651123, -0.0184077899903059, -0.701246976852417, 0.30852851271629333, 0.43714606761932373, 0.9675720930099487, 0.7990445494651794...
func runEmitter() { emitter, err := goka.NewEmitter(brokers, topic, new(codec.String)) if err != nil { log.Fatalf("error creating emitter: %v", err) } defer emitter.Finish() err = emitter.EmitSync("some-key", "some-value") if err != nil { log.Fatalf("error emitting message: %v", err) } log.Println("message ...
[ -0.325176864862442, -0.3371883034706116, 0.37613850831985474, -0.13255921006202698, 0.3946720063686371, 0.3681612014770508, 0.3910979628562927, 0.11742953211069107, -0.9791363477706909, 0.3193225562572479, -0.13390766084194183, 1.0841574668884277, -1.032638669013977, 0.6033166646957397, ...
func runProcessor() { // process callback is invoked for each message delivered from // "example-stream" topic. cb := func(ctx goka.Context, msg interface{}) { var counter int64 // ctx.Value() gets from the group table the value that is stored for // the message's key. if val := ctx.Value(); val != nil { ...
[ -0.022984232753515244, -0.0827924907207489, 0.739773690700531, 0.02073921635746956, -0.2153286337852478, -0.9787488579750061, 0.9362910389900208, -0.22404161095619202, -0.8117421269416809, 0.5592774748802185, -0.050343289971351624, 0.44204097986221313, -0.9300529360771179, 0.58814388513565...
func DefaultHandler(w http.ResponseWriter, r *http.Request) { data := make(map[string]interface{}) uid := getCurrentUserID(r) if uid != "" { log.Printf("User has ID: %s, getting data...", uid) userData, err := stores.GetData(r.Context(), uid) if err != nil { log.Printf("Error while getting user data: %v",...
[ 0.38277968764305115, 0.005963105708360672, 0.5431455373764038, 1.052278995513916, -0.08397408574819565, 1.1417317390441895, 0.46099868416786194, 0.37736159563064575, 0.033356957137584686, -0.14759336411952972, 0.38261061906814575, -0.1356620490550995, -0.6798918843269348, 0.418944120407104...
func main() { dbConfig := Config.BuildDBConfig() db, err := gorm.Open(sqlite.Open(dbConfig.DBName), &gorm.Config{}) if err != nil { fmt.Println("Error connecting to the database...will exit") panic(err) } //defer db.Close() // this method no longer exists in GORM 2.0 fmt.Printf("Established connection...
[ -0.22361165285110474, -0.04239208996295929, 0.9779782295227051, 0.6100027561187744, 0.5146709084510803, 0.7853512763977051, 0.6966751217842102, -0.6750382781028748, -0.8179846405982971, 0.7562527656555176, -0.19029170274734497, -0.17844845354557037, -0.723432719707489, 0.5895688533782959, ...
func NewParser(builder builder.TestSuitesBuilder, stream bool) parser.TestOutputParser { return &testOutputParser{ builder: builder, stream: stream, } }
[ 0.7377212047576904, -1.0104564428329468, 0.15432725846767426, 0.48869404196739197, -1.5917763710021973, -0.18063293397426605, 0.8113497495651245, 0.18672500550746918, 0.10605476796627045, -0.7399764060974121, 0.13803426921367645, -0.3227115571498871, -0.8700908422470093, 0.505427896976471,...
func (p *testOutputParser) Parse(input *bufio.Scanner) (*api.TestSuites, error) { suites := &api.TestSuites{} var testNameStack []string var tests map[string]*api.TestCase var output map[string][]string var messages map[string][]string var currentSuite *api.TestSuite var state int var count int var orderedTes...
[ -0.15553055703639984, -0.6091514825820923, 0.7750494480133057, 0.2861953675746918, -0.603471040725708, -0.45334169268608093, 1.0186342000961304, -0.7143089771270752, -0.5733736157417297, -0.398197203874588, -0.037364330142736435, -0.5037372708320618, -0.666659414768219, 0.7317503094673157,...
func WriteToFixture(t *testing.T, identifier string, data []byte) { golden, err := golden(t, &Options{Suffix: identifier}) if err != nil { t.Fatalf("failed to get absolute path to testdata file: %v", err) } if err := os.MkdirAll(filepath.Dir(golden), 0755); err != nil { t.Fatalf("failed to create fixture direc...
[ 0.021965408697724342, -0.17299215495586395, 0.46594229340553284, -0.4558468163013458, 1.4077198505401611, 0.49134108424186707, 1.3287118673324585, 0.21054156124591827, 0.47699931263923645, -0.09114934504032135, -1.1721769571304321, 0.4838847517967224, -0.16022822260856628, 0.18822689354419...
func ReadFromFixture(t *testing.T, identifier string) []byte { golden, err := golden(t, &Options{Suffix: identifier}) if err != nil { t.Fatalf("failed to get absolute path to testdata file: %v", err) } data, err := os.ReadFile(golden) if err != nil { t.Fatalf("failed to read testdata file: %v", err) } retur...
[ 0.07733002305030823, -0.5390138030052185, 0.31983402371406555, -0.7360000610351562, -0.21940040588378906, 0.7626357078552246, 0.1435728222131729, -0.2908681631088257, 0.05399239808320999, 0.13135848939418793, -0.46049898862838745, 0.5038946866989136, -0.38288217782974243, -0.17541234195232...
func golden(t *testing.T, opts *Options) (string, error) { if opts.Extension == "" { opts.Extension = ".yaml" } return filepath.Abs(filepath.Join("testdata", sanitizeFilename(opts.Prefix+t.Name()+opts.Suffix)) + opts.Extension) }
[ 0.626882791519165, -0.47130078077316284, 0.6421734690666199, 0.0313875749707222, -0.4631582498550415, 0.7189455628395081, 0.8802552223205566, 0.08757871389389038, 0.4129815101623535, -0.17351943254470825, 0.2032124400138855, 1.2652286291122437, 0.5950534343719482, 0.06913404911756516, -0...
func (s *sizeTracker) set(key string, val int64) { if s.keyToSize == nil { s.keyToSize = make(map[string]int64) } prev, existed := s.keyToSize[key] s.keyToSize[key] = val s.total += val - prev if !existed { s.total += int64(len(key)) } }
[ -0.61537104845047, 0.4777049124240875, 0.5048048496246338, -0.4371771514415741, -0.5429019331932068, 0.12495026737451553, 0.5157250165939331, -0.680594265460968, -0.4588976800441742, 0.7767178416252136, -0.508195698261261, -0.3850192129611969, 0.31800928711891174, 0.4315602779388428, 0.2...
func (s *sizeTracker) get(key string) (int64, bool) { size, has := s.keyToSize[key] return size, has }
[ -1.267366886138916, 0.3772009015083313, 0.44052329659461975, -0.5751860737800598, -0.6066771745681763, -0.4363003373146057, 0.0564359687268734, 0.042832013219594955, -0.5065731406211853, 0.7056025862693787, -1.0322513580322266, -0.5685645937919617, -0.21664540469646454, 0.6502988934516907,...
func (s *sizeTracker) has(key string) bool { _, has := s.keyToSize[key] return has }
[ -0.2677440047264099, 0.286635160446167, 0.2779608368873596, -0.25736746191978455, -0.4856894612312317, 0.1244582012295723, -0.44305992126464844, 0.25362250208854675, -0.5789269208908081, 0.0013587655266746879, -1.1306802034378052, -0.9125561714172363, -0.10654928535223007, 1.18594753742218...
func (s *sizeTracker) numWrites() int { return len(s.keyToSize) }
[ -0.58910071849823, 0.21479414403438568, 0.4001672565937042, -0.31211376190185547, -0.21647973358631134, -0.7533184885978699, 0.6267534494400024, 0.3327723741531372, -0.14743800461292267, 0.10504641383886337, -0.6465983986854553, -0.7464842796325684, -0.2657396197319031, 0.3342191278934479,...
func (s *sizeTracker) dup() *sizeTracker { if len(s.keyToSize) == 0 { return &sizeTracker{} } k2s := make(map[string]int64, len(s.keyToSize)) for k, v := range s.keyToSize { k2s[k] = v } return &sizeTracker{k2s, s.total} }
[ -0.3612947165966034, 0.25208956003189087, 0.7192100882530212, -0.009730483405292034, -0.9275223016738892, -0.09990984201431274, 0.45154377818107605, -0.5138280987739563, 0.054344236850738525, 0.2385280430316925, -0.46613574028015137, -0.4708969295024872, 0.38544607162475586, 0.122705958783...
func toEncoded(keys []*datastore.Key) (full []string, roots stringset.Set) { roots = stringset.New(len(keys)) full = make([]string, len(keys)) for i, k := range keys { roots.Add(string(datastore.Serialize.ToBytes(k.Root()))) full[i] = string(datastore.Serialize.ToBytes(k)) } return }
[ -0.45998772978782654, -0.14878727495670319, 0.6924105286598206, -0.7573997378349304, 0.013819021172821522, -1.0055341720581055, -0.3235667049884796, 0.20816275477409363, 0.42319682240486145, 0.9273497462272644, -0.4987570643424988, 1.2449712753295898, 0.09311337769031525, 0.137979552149772...
func selectGossipID() []string { var num = len(Container) var res = make([]string, B) if num < 1 { rand.Seed(time.Now().Unix()) MT.Lock() for key := range MembershipList { _, okLeave := LeaveNodes[key] _, okFail := FailedNodes[key] if key != MyID && !okLeave && !okFail { Container = ap...
[ -0.8447746634483337, 0.04384439438581467, 0.8599326610565186, -0.09572778642177582, 0.06909793615341187, -0.33990880846977234, 0.36634930968284607, -0.8107463717460632, 0.9433550238609314, 0.5648446679115295, -0.10668188333511353, 0.5062991976737976, -1.450700283050537, -0.2931570410728454...
func mergeMemberShipList(recievedMemberShipList map[string]Membership) { for key, _ := range recievedMemberShipList { if key == MyOldID { return } } for key, receivedMembership := range recievedMemberShipList { MT.Lock() if existedMembership, ok := MembershipList[key]; ok { if receivedMembersh...
[ -0.7281942367553711, -0.008316446095705032, 0.9239498376846313, -0.32888004183769226, -0.14114564657211304, 0.22201701998710632, -0.18656609952449799, -0.25312933325767517, 0.38926324248313904, 0.39877086877822876, -0.18088389933109283, -0.17339828610420227, -0.9076407551765442, 1.02383971...
func broadcastUDP() { if !IsJoin { return } if CurrentProtocol == "All2All" { selfNode := make(map[string]Membership) MT.Lock() selfNode[MyID] = MembershipList[MyID] MT.Unlock() jsonString, err := json.Marshal(selfNode) if err != nil { panic(err) } msg := string(jsonString) MT.Lo...
[ -1.1065552234649658, -0.033663004636764526, 0.8889411091804504, -0.07395748049020767, -0.10691475123167038, 0.6134101748466492, 0.5170934200286865, -0.3146945536136627, 0.2580486834049225, 0.7563673853874207, -0.09714124351739883, 0.9354152083396912, -1.181389331817627, 0.2908269464969635,...
func (o *UserGroupListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewUserGroupListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil ca...
[ -0.7920547127723694, -0.866947591304779, 0.5213074684143066, 0.6385869383811951, -0.16223247349262238, -1.226446270942688, 0.12963391840457916, -0.18020738661289215, 0.2237197756767273, 0.6747530698776245, 0.15127813816070557, -0.7672642469406128, -1.3011597394943237, -0.24833089113235474,...
func NewUserGroupListOK() *UserGroupListOK { return &UserGroupListOK{} }
[ -0.523750901222229, -1.0552287101745605, -0.08351704478263855, 1.6021614074707031, -1.6948449611663818, -0.34675514698028564, 0.13521777093410492, 0.7640416026115417, -0.6723388433456421, 1.1895041465759277, -2.018918514251709, -1.019476294517517, -0.3042977452278137, 0.5538168549537659, ...
func NewUserGroupListBadRequest() *UserGroupListBadRequest { return &UserGroupListBadRequest{} }
[ -1.1014556884765625, -0.7229849696159363, -0.282166063785553, 1.6974576711654663, -0.49857714772224426, -0.7884056568145752, -1.2424721717834473, 0.3879706859588623, -0.531199038028717, -0.041446808725595474, -1.162752389907837, -0.34526121616363525, -0.9001783132553101, 0.775993287563324,...
func Reconcile(raw map[string]interface{}, spec v1alpha1.Spec, targets []*regexp.Regexp) (state manifest.List, err error) { extracted, err := extract(raw) if err != nil { return nil, errors.Wrap(err, "flattening manifests") } out := make(manifest.List, 0, len(extracted)) for _, m := range extracted { out = ap...
[ -0.4904812276363373, -1.0220333337783813, 0.8295961618423462, 0.23104499280452728, -0.005429582204669714, -0.8340958952903748, -0.5253499150276184, 0.2899540662765503, -0.3694096505641937, 0.34931933879852295, 0.598127007484436, -0.28087514638900757, 0.055866945534944534, 0.028839593753218...
func walkJSON(ptr interface{}, extracted map[string]manifest.Manifest, path trace) error { // check for known types switch v := ptr.(type) { case map[string]interface{}: return walkObj(v, extracted, path) case []interface{}: return walkList(v, extracted, path) } return ErrorPrimitiveReached{ path: pat...
[ -1.1648834943771362, -0.9740296006202698, 0.6062845587730408, -0.3933802843093872, -1.032116174697876, -0.025124307721853256, 0.519299328327179, -0.3468540906906128, 0.6362926363945007, -0.11379294097423553, -0.3032413423061371, 0.3961659371852875, 0.0802631750702858, 0.9020055532455444, ...
func isKubernetesManifest(obj objx.Map) bool { return obj.Get("apiVersion").IsStr() && obj.Get("apiVersion").Str() != "" && obj.Get("kind").IsStr() && obj.Get("kind").Str() != "" }
[ -1.0436910390853882, -1.6603924036026, 0.5303893685340881, 0.021485136821866035, -1.093458890914917, 0.16754183173179626, -2.2834503650665283, -0.0755540207028389, 1.3309589624404907, 0.29603317379951477, 0.36132967472076416, 0.20965291559696198, -0.13649706542491913, 0.7801671624183655, ...
func orchestratorCmd(cmd *cli.Cmd) { // orchestrator-specific CLI options var ( // Cosmos params cosmosChainID *string cosmosGRPC *string tendermintRPC *string cosmosGasPrices *string // Cosmos Key Management cosmosKeyringDir *string cosmosKeyringAppName *string cosmosKeyringBackend *s...
[ 0.08273009955883026, -0.6077324748039246, 1.0219643115997314, -0.5042836666107178, 0.32830166816711426, 0.29345592856407166, 0.8169666528701782, 0.36094367504119873, -0.33792930841445923, -0.23533926904201508, 0.3502485156059265, 0.24890345335006714, 0.7464152574539185, 0.580938994884491, ...
func NewService(repository Repository) Service { return &service{repository} }
[ 0.23826684057712555, -0.03615600988268852, -0.16643112897872925, 0.34463295340538025, -0.748130202293396, -0.21727755665779114, -1.0776662826538086, -1.0674071311950684, 0.09171361476182938, 0.11771049350500107, -0.36768844723701477, 0.9181857705116272, -0.1335870921611786, 0.8815357685089...
func (s *service) GetInstitutions() []Institution { return s.repository.GetAllInstitutions() }
[ -0.5787991285324097, 0.6134436726570129, 0.17881186306476593, 0.07714376598596573, 0.619694709777832, -0.25766462087631226, 0.331071674823761, -0.3155180811882019, 0.8804696798324585, -0.13566620647907257, -0.0762069895863533, 0.4392547011375427, -0.6677743196487427, 0.9189589619636536, ...
func (s *service) GetInstitution(id string) (Institution, error) { return s.repository.GetInstitution(id) }
[ -1.0507992506027222, 0.07032953202724457, 0.19396652281284332, -0.10435310751199722, 0.406573086977005, -1.1480528116226196, 0.32958337664604187, -0.44023507833480835, 0.7120809555053711, 0.4074600338935852, -0.37559959292411804, 0.8181537389755249, -0.10774360597133636, -0.083972677588462...
func New( argv []string, ) (*Cli, error) { ctx := context.Background() args := []string{} flags := map[string]string{} for _, a := range argv { if flagFilterRegexp.MatchString(a) { a = strings.Trim(a, "-") s := strings.Split(a, "=") if len(s) == 2 { flags[s[0]] = s[1] } else if len(s) == 1 { ...
[ -0.6030566692352295, -0.5451809167861938, 0.4856223464012146, 0.1654662787914276, -0.4180256724357605, 0.2121821641921997, -0.07343218475580215, -0.2465531826019287, -1.149970531463623, 0.384723037481308, 0.1777130365371704, 0.9349047541618347, 0.21278028190135956, 0.5968657732009888, -0...
func CheckRelabelConfigs() error { _, err := loadRelabelConfigs() return err }
[ -0.12932182848453522, -0.0890670120716095, 0.589245617389679, 0.22675305604934692, 0.10161134600639343, 0.4745972752571106, 0.098429374396801, -0.1779138147830963, -0.688682496547699, 1.3658496141433716, -0.6709462404251099, 0.5714735388755798, -0.6524181365966797, 0.5044018030166626, 1....
func initLabelsGlobal() { labelsGlobal = nil for _, s := range *unparsedLabelsGlobal { if len(s) == 0 { continue } n := strings.IndexByte(s, '=') if n < 0 { logger.Fatalf("missing '=' in `-remoteWrite.label`. It must contain label in the form `name=value`; got %q", s) } labelsGlobal = append(labelsG...
[ -0.6156472563743591, -0.29436954855918884, 0.5050225257873535, -0.9067821502685547, 0.5622895359992981, 0.934077799320221, -0.3561347424983978, 0.009360910393297672, -0.8324561715126038, 1.0278290510177612, -0.224483460187912, 0.5992704629898071, -1.0798548460006714, 0.7739007472991943, ...
func New() *Server { return &Server{ IdleTimeout: 620 * time.Second, TCPKeepAlivePeriod: 3 * time.Minute, GraceTimeout: 30 * time.Second, WaitBeforeShutdown: 10 * time.Second, TrustProxy: Trusted(), Handler: http.NotFoundHandler(), } }
[ -0.8091173768043518, -1.2205215692520142, 0.2757376730442047, -0.7126786708831787, 0.289451539516449, 0.6807993054389954, 0.2594073712825775, -0.18539650738239288, 0.10812608152627945, 0.04607146233320236, -0.30641376972198486, 0.4706331491470337, -0.5904590487480164, 0.17783154547214508, ...