text
stringlengths
11
6.3k
embedding
listlengths
768
768
func (p *Processor) GenerateReport(cssList []types.ContainerSecuritySpec, pssList []types.PodSecuritySpec) *report.Report { r := report.NewReport() for _, c := range cssList { r.AddContainer(c) } for _, p := range pssList { r.AddPod(p) } return r }
[ -0.37481626868247986, 0.6973469853401184, 0.4576050341129303, 0.17549708485603333, 1.1825206279754639, 0.7291094660758972, -0.7000097632408142, -0.06059938669204712, 0.019838718697428703, -0.454505056142807, -0.25916218757629395, -0.3834623396396637, -0.4620266258716583, 0.2135354429483413...
func (d *DockerClient) GetImages() ([]DockerImage, error) { resp, err := d.makeRequest("GET", fmt.Sprintf("%s/images/json", d.pathPrefix), nil) if err != nil { return nil, err } else if resp.StatusCode != 200 { return nil, fmt.Errorf("GetImages: error status code %s", resp.StatusCode) } defer resp.Body.Close()...
[ -1.446393370628357, 0.5170185565948486, 0.4743155539035797, -0.033258106559515, 0.6810577511787415, -0.5922254323959351, -0.5627764463424683, -0.6495976448059082, -0.36132344603538513, 0.1550169438123703, -0.01866910792887211, 0.7353112101554871, -0.5371523499488831, 0.9191892743110657, ...
func (d *DockerClient) GetContainers(all bool, filters map[string][]string) ([]DockerContainer, error) { resp, err := d.makeRequest("GET", fmt.Sprintf("%s/containers/json?all=%s", d.pathPrefix, strconv.FormatBool(all)), nil) defer resp.Body.Close() if err != nil { return nil, err } else if resp.StatusCode != 200 ...
[ -1.3467317819595337, 0.0609205923974514, 0.8989037275314331, 0.32136270403862, 0.3223450779914856, -0.651626467704773, -0.4901067614555359, -0.0897609293460846, -0.3517640233039856, 0.6343160271644592, 0.24085146188735962, 0.6751326322555542, -0.49665164947509766, 1.0195413827896118, -0....
func (d *DockerClient) StopContainer(idOrName string, t int) error { resp, err := d.makeRequest("POST", fmt.Sprintf("%s/containers/%s/stop?t=%d", d.pathPrefix, idOrName, t), nil) if err != nil { return err } else if resp.StatusCode != 204 { return fmt.Errorf("StopContainier: error status code %d", resp.StatusCod...
[ -2.0420517921447754, -0.7401151061058044, 0.39497503638267517, -0.6427936553955078, 0.17249228060245514, -0.23621898889541626, -0.24214722216129303, -0.5817356705665588, -0.676328182220459, 0.501297116279602, -0.6004264950752258, 0.23995885252952576, 0.11061163246631622, 0.2923066616058349...
func (d *DockerClient) AttachContainer(idOrName string, logs, stream, stdin, stdout, stderr bool) (chan string, error) { uri := fmt.Sprintf("%s/containers/%s/attach/ws?logs=%v&stream=%v&stdin=%v&stdout=%v&stderr=%v", d.wsPrefix, idOrName, logs, stream, stdin, stdout, stderr) ws, err := websocket.Dial(uri, "", "http:/...
[ -0.4581752121448517, -0.19356916844844818, 0.9550291895866394, -0.7158263325691223, -0.670439600944519, -0.2072921097278595, 0.27340182662010193, -1.5556296110153198, 0.09725143760442734, 0.017692675814032555, 0.5650341510772705, 1.2977838516235352, -0.8387282490730286, 1.3742082118988037,...
func (d *DockerClient) WaitContainer(idOrName string) error { resp, err := d.makeRequest("POST", fmt.Sprintf("%s/containers/%s/wait", d.pathPrefix, idOrName), nil) if err != nil { return err } else if resp.StatusCode != 200 { return fmt.Errorf("WaitContainier: error status code %d", resp.StatusCode) } return n...
[ -1.0640445947647095, -0.2780035734176636, 0.6483968496322632, -0.1964319795370102, 0.04912491515278816, 0.2965008616447449, 0.38606464862823486, -0.6530945897102356, -0.3725602626800537, -0.1931491494178772, -0.47355931997299194, 0.06769992411136627, 0.36769554018974304, 0.6683800220489502...
func NewCard(suit string, value string) Card { return Card{suit, value} }
[ 0.3586024045944214, -0.5647059082984924, 0.19997943937778473, -0.4150584042072296, -1.1327826976776123, 0.5159702301025391, -1.2024019956588745, 0.3555620610713959, 0.012320837005972862, -0.014943355694413185, 0.190871924161911, 1.6197535991668701, 0.41011887788772583, -0.4051275849342346,...
func newDeck() Deck { deck := Deck{} cardSuits := []string{"Spade", "Heart", "Club", "Diamond"} cardValues := []string{"Ace", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten", "Jack", "Queen", "King"} for _, suit := range cardSuits { for _, value := range cardValues { c := Card{suit, valu...
[ 0.21517916023731232, -0.386164128780365, 0.6816107034683228, 0.25220489501953125, -0.960398256778717, 0.39978837966918945, -0.5407403111457825, -0.2205880582332611, -0.1047452837228775, -0.8980026841163635, 0.37976112961769104, 0.6765481233596802, 1.187056541442871, 0.7012196779251099, 0...
func SetDecoderFunc(u UtilDecoderFunc) { decoderFunc = u }
[ 0.38716450333595276, -0.034389182925224304, 0.1202203556895256, 0.0995621457695961, -0.6748252511024475, -0.8637629747390747, 0.8864246010780334, 0.9773025512695312, -0.27233994007110596, -1.3482235670089722, -0.8532288670539856, 0.6838330030441284, 1.1554774045944214, 0.6433041095733643, ...
func AddToSDKScheme(addToScheme addToSchemeFunc) { addToScheme(scheme) }
[ -0.732895016670227, 1.6971542835235596, 0.5372309684753418, 0.3632294237613678, 0.5960907936096191, -0.9185830354690552, -0.2255212962627411, 0.3375777006149292, 0.6877111196517944, -0.05308229476213455, 0.05952003225684166, -0.33388552069664, 1.5298864841461182, 0.5814344882965088, -0.6...
func RuntimeObjectFromUnstructured(u *unstructured.Unstructured) (runtime.Object, error) { gvk := u.GroupVersionKind() decoder := decoderFunc(gvk.GroupVersion(), codecs) b, err := u.MarshalJSON() if err != nil { return nil, fmt.Errorf("error running MarshalJSON on unstructured object: %v", err) } ro, _, err :=...
[ -0.17234797775745392, -0.758816123008728, 0.5670658946037292, -0.07917658984661102, -0.8689072132110596, 0.10839742422103882, -0.2561943531036377, -0.5350401997566223, -0.2123211771249771, -0.48558083176612854, -0.8664935231208801, 0.470316082239151, -0.11400704085826874, -0.36158511042594...
func UnstructuredFromRuntimeObject(ro runtime.Object) (*unstructured.Unstructured, error) { b, err := json.Marshal(ro) if err != nil { return nil, fmt.Errorf("error running MarshalJSON on runtime object: %v", err) } var u unstructured.Unstructured if err := json.Unmarshal(b, &u.Object); err != nil { return nil...
[ -0.087798111140728, -0.9797272682189941, 0.5951610207557678, -0.5413520336151123, -0.3110728859901428, -0.5358192920684814, -0.0920274406671524, -0.8292006850242615, 0.35715368390083313, -0.7109568119049072, -0.545692503452301, 0.3055761456489563, -0.2244420200586319, -0.10573217272758484,...
func UnstructuredIntoRuntimeObject(u *unstructured.Unstructured, into runtime.Object) error { gvk := u.GroupVersionKind() decoder := decoderFunc(gvk.GroupVersion(), codecs) b, err := u.MarshalJSON() if err != nil { return err } _, _, err = decoder.Decode(b, &gvk, into) if err != nil { return fmt.Errorf("fai...
[ -0.2898855209350586, -0.2312334030866623, 0.6255597472190857, -0.8303045630455017, -0.6045563817024231, 0.1714893877506256, -0.10301389545202255, -0.2897258698940277, -1.0825145244598389, 0.09674163162708282, -0.5557916760444641, 0.4321252703666687, -0.49757733941078186, -0.678868532180786...
func RuntimeObjectIntoRuntimeObject(from runtime.Object, into runtime.Object) error { b, err := json.Marshal(from) if err != nil { return err } gvk := from.GetObjectKind().GroupVersionKind() decoder := decoderFunc(gvk.GroupVersion(), codecs) _, _, err = decoder.Decode(b, &gvk, into) if err != nil { return fm...
[ -0.1471329629421234, -0.2833825945854187, 0.7341746687889099, -0.6794810891151428, -0.6536499261856079, 0.07478850334882736, -0.5387942790985107, -0.20738789439201355, -1.2135109901428223, 0.10485353320837021, -0.4448396861553192, 1.0828158855438232, -0.8992189764976501, -0.735721528530120...
func GetNameAndNamespace(object runtime.Object) (string, string, error) { accessor := meta.NewAccessor() name, err := accessor.Name(object) if err != nil { return "", "", fmt.Errorf("failed to get name for object: %v", err) } namespace, err := accessor.Namespace(object) if err != nil { return "", "", fmt.Erro...
[ -0.6409788727760315, -1.1918338537216187, 0.7914308309555054, -0.4137952923774719, -1.0040197372436523, -0.036948446184396744, 0.1647409349679947, -1.0704492330551147, 0.7915199995040894, 0.19012439250946045, -0.4747249186038971, 0.7534154653549194, 0.680188775062561, 1.7967984676361084, ...
func GetWatchNamespace() (string, error) { ns, found := os.LookupEnv(WatchNamespaceEnvVar) if !found { return "", fmt.Errorf("%s must be set", WatchNamespaceEnvVar) } return ns, nil }
[ 0.3414236903190613, -0.17641088366508484, 0.6695162057876587, 0.05869428813457489, 0.13506776094436646, 0.18488021194934845, 0.9467470645904541, -1.276071548461914, 0.2078692764043808, -0.05757007747888565, -0.24600690603256226, 1.040150761604309, -0.21897728741168976, 1.0363329648971558, ...
func GetOperatorName() (string, error) { operatorName, found := os.LookupEnv(OperatorNameEnvVar) if !found { return "", fmt.Errorf("%s must be set", OperatorNameEnvVar) } if len(operatorName) == 0 { return "", fmt.Errorf("%s must not be empty", OperatorNameEnvVar) } return operatorName, nil }
[ -0.5109384059906006, 0.012525090016424656, 1.0161429643630981, 0.2213493436574936, -0.40564218163490295, 0.11345066130161285, 0.7099054455757141, 0.19121673703193665, -0.3488638401031494, 0.49707239866256714, 0.3180873394012451, -0.40110257267951965, -0.7728992700576782, 1.2263092994689941...
func InitOperatorService() (*v1.Service, error) { operatorName, err := GetOperatorName() if err != nil { return nil, err } namespace, err := GetWatchNamespace() if err != nil { return nil, err } service := &v1.Service{ ObjectMeta: metav1.ObjectMeta{ Name: operatorName, Namespace: namespace, L...
[ -0.47667717933654785, -0.2045573890209198, 0.6195226907730103, -0.7346533536911011, -0.5074163675308228, 0.5613036751747131, 0.29395145177841187, -0.24644078314304352, -0.4734487533569336, 0.5934082865715027, 0.2899138927459717, 0.6754984855651855, -0.8839687705039978, 0.12788884341716766,...
func CreateInventoryTable() { ctx, _ := context.WithTimeout(context.Background(), 1*time.Minute) sqlStatement := `CREATE TABLE IF NOT EXISTS inventory ( id SERIAL primary key NOT NULL, name VARCHAR(2083) NOT NULL, count Integer NOT NULL, userid Integer NOT NULL, created_at timestamptz NOT NULL DEFAULT NOW()...
[ 0.335990309715271, -0.2802087664604187, 0.5911617279052734, 0.8174617290496826, 0.4563896059989929, 0.41038891673088074, 0.8407378792762756, -0.7014274597167969, -0.7371399402618408, 0.48062893748283386, -0.07752393931150436, 0.16394191980361938, -0.41145169734954834, 0.15490177273750305, ...
func CreateInventoryInsertUpdateTrigger() { ctx, _ := context.WithTimeout(context.Background(), 1*time.Minute) sqlStatement := `CREATE OR REPLACE FUNCTION process_inventory_insert_update() RETURNS TRIGGER AS $inventory_insert_update$ BEGIN INSERT INTO inventorylog(inventoryid, userid, count) SELECT NEW.id, NEW...
[ -0.16837528347969055, -0.6041869521141052, 0.5499895215034485, 0.2567753493785858, 0.06719300895929337, -0.07256162166595459, -0.010774821043014526, 0.4584771394729614, -0.48273059725761414, 0.33359047770500183, -0.6423966288566589, -0.6225571632385254, -1.0076698064804077, -0.558154523372...
func ReorderList(head *Node) *Node { if head == nil || head.Next == nil { return head } p1, p2 := head, head for p1 != nil { p2 = p2.Next p1 = p1.Next if p1 != nil { p1 = p1.Next } } p3 := head for p3.Next != p2 { p3 = p3.Next } p3.Next = nil p2 = Reverse(p2) p1 = head for p2 != nil && ...
[ -0.11741523444652557, -0.18374577164649963, 1.1581921577453613, 0.07894566655158997, -0.09385363012552261, -0.2886852025985718, -0.0998050644993782, 0.7039899230003357, 0.5180190801620483, 0.4834350049495697, -0.5798730254173279, 0.4134458303451538, -0.6578609943389893, 0.13374164700508118...
func (s UnstakeSuite) TestValidateUnstake(c *C) { accountAddr := GetRandomNodeAccount(NodeWhiteListed).NodeAddress runeAddress, err := common.NewAddress("bnb1g0xakzh03tpa54khxyvheeu92hwzypkdce77rm") if err != nil { c.Error("fail to create new BNB Address") } inputs := []struct { name string msg ...
[ 0.38461247086524963, 0.2759515047073364, 0.810871958732605, -0.5719496011734009, 0.8440037369728088, -0.08239129930734634, 0.39923954010009766, -0.09053177386522293, -0.6174308657646179, -0.5987706184387207, -0.4382573366165161, 0.5538785457611084, -0.21055524051189423, 0.29739370942115784...
func initKeyRenewal(registry *KeyRegistry, period time.Duration, cutoffTime time.Time) (func(), error) { // Create a new key if it's the first key, // or if it's older than cutoff time. if len(registry.keys) == 0 || registry.mostRecentKey.creationTime.Before(cutoffTime) { if _, err := registry.generateKey(); err !...
[ -0.4691402018070221, 0.28844892978668213, 0.9634127020835876, -0.009485813789069653, -0.7542150020599365, -0.2369932234287262, -0.2092457264661789, 0.6353769898414612, -0.36957788467407227, 0.03723110258579254, 0.23631328344345093, 0.6572621464729309, -0.1102883517742157, -0.09112004190683...
func StartApp() { db.ConnectToDB() db.Client.AutoMigrate(&users.User{}) mapUrls() log.Fatal(router.Run(os.Getenv("PORT"))) }
[ 0.4169839322566986, -0.17973290383815765, 0.544847846031189, 1.400205135345459, 0.4816618263721466, 1.0459165573120117, 0.5163695216178894, 0.570456326007843, -0.6329773664474487, 0.6613341569900513, -0.21642157435417175, 0.3089377284049988, 0.4530547857284546, 0.6911799311637878, 0.0359...
func NewBranch(buildName, storeName string) Builder { return NewBranch2(&Branch{ BuildName: buildName, StoreName: storeName, UpdateDate: time.Now().Format("2006-01-02 15:04:05"), }) }
[ 0.24163417518138885, -0.7448610067367554, 0.4459804594516754, 1.556712031364441, -1.1707875728607178, 0.3902980089187622, -0.5555426478385925, 0.28161901235580444, -0.05922139436006546, -0.4578514099121094, -0.19216132164001465, 1.330794334411621, -0.3441801071166992, -0.0673917606472969, ...
func (b *BrBuilder) Name() string { return b.StoreName }
[ -0.23226307332515717, -0.019059326499700546, 0.42848002910614014, 1.2123867273330688, -0.8171239495277405, 0.3879602253437042, 0.8901939392089844, 0.4203760027885437, 0.8010402917861938, 0.030673611909151077, -0.940629780292511, -0.13814300298690796, -0.768682062625885, 0.2012747824192047,...
func (b *BrBuilder) GetBranch() *Branch { return &b.Branch }
[ 0.9980403184890747, 0.7541407346725464, 0.3916613459587097, 2.0800695419311523, 0.7458907961845398, 0.5936066508293152, 0.6406497955322266, 0.10395586490631104, 0.8014606237411499, -1.7719519138336182, 0.37597668170928955, 1.5568441152572632, -0.9265701174736023, 0.10719452798366547, 0.8...
func (b *BrBuilder) CanBrowse() bool { fpath := filepath.Join(b.StorePath, adminDir) if st, _ := os.Stat(fpath); st != nil && st.IsDir() { return true } log.Trace("[Branch] Access sympol path %s failed.", fpath) return false }
[ 0.5694997310638428, 0.026886848732829094, 0.5091182589530945, 0.8491950631141663, -0.16680501401424408, 0.41479021310806274, 1.4210108518600464, 0.0332418717443943, 0.004219455644488335, -0.03902551159262657, 0.49128517508506775, 0.7369472980499268, -0.6565881371498108, -0.0229359026998281...
func (b *BrBuilder) CanUpdate() bool { fpath := filepath.Join(b.BuildPath, config.LatestBuildFile) if st, _ := os.Stat(fpath); st != nil && !st.IsDir() { return true } log.Trace("[Branch] Access build path %s failed.", fpath) return false }
[ 0.24536415934562683, -0.8859376311302185, 0.5937789678573608, 0.996588408946991, -0.009469350799918175, 1.044558048248291, 0.9422038793563843, 0.4397628605365753, -0.3906762897968292, -0.0410783514380455, 0.40478238463401794, -0.05943701043725014, -0.6446951031684875, 0.12209692597389221, ...
func (b *BrBuilder) SetSubpath(buildserver, localstore string) error { lpath := filepath.Join(config.Destination, b.StoreName) fpath := filepath.Join(config.BuildSource, b.BuildName, "Release") if localstore != "" { // by given subpath lpath = filepath.Join(config.Destination, localstore) } if err := os.Mkdir...
[ -0.05531281232833862, -0.4242042005062103, 0.687729001045227, 0.4616940915584564, -0.7563605308532715, 1.2221628427505493, 0.7002086639404297, 0.2934572994709015, 0.16959048807621002, 0.45098069310188293, -0.9068998098373413, 0.7516034841537476, -1.0053648948669434, 0.4561176598072052, 0...
func (b *BrBuilder) Persist() error { fpath := filepath.Join(b.StorePath, adminDir, branchBin) fd, err := os.OpenFile(fpath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 666) if err != nil { log.Error(2, "[Branch] Persist branch %s failed: %v.", b.Name(), err) return err } defer fd.Close() log.Trace("[Branch] Save br...
[ 0.6748583912849426, -0.0950150340795517, 0.5468867421150208, -0.3511969745159149, 0.36804723739624023, 1.2708854675292969, -0.15137310326099396, -0.08029481023550034, -0.009762955829501152, -0.15020345151424408, -0.10245276987552643, 0.13903671503067017, -1.5228766202926636, 0.093961164355...
func (b *BrBuilder) Load() error { fpath := filepath.Join(b.StorePath, adminDir, branchBin) fd, err := os.OpenFile(fpath, os.O_RDONLY, 666) if err != nil { //log.Error(2, "[Branch] Load branch %s failed: %v.", b.Name(), err) return err } defer fd.Close() return gob.NewDecoder(fd).Decode(&b.Branch) }
[ 0.23184803128242493, 0.09719918668270111, 0.39830902218818665, -0.40980055928230286, -0.021716289222240448, 1.0486356019973755, -0.3171093165874481, -0.07536686211824417, -0.4217611253261566, -0.21973903477191925, -0.34475067257881165, 0.6354091763496399, -1.5595709085464478, -0.4817469120...
func (b *BrBuilder) getSymbols(buildver string) (string, error) { var ( fs *os.File fd *os.File err error bytes int64 ) fsrc := fmt.Sprintf("%s\\Build%s\\%s", b.BuildPath, buildver, config.PDBZipFile) fzip := filepath.Join(b.symPath, config.PDBZipFile) fd, err = os.OpenFile(fzip, os.O_WRONLY|os.O...
[ -0.1627589911222458, -0.49030959606170654, 0.9495372772216797, -0.1704021543264389, -0.16291452944278717, 0.05270175635814667, 0.9501187801361084, -0.686799943447113, -0.009861137717962265, 0.22647057473659515, -0.7026083469390869, 0.40966466069221497, -0.3118005096912384, -0.4090117514133...
func (b *BrBuilder) getLatestBuild(local bool) (string, error) { fpath := "" if local { fpath = filepath.Join(b.StorePath, adminDir, config.LatestBuildFile) } else { fpath = filepath.Join(b.BuildPath, config.LatestBuildFile) } fd, err := os.OpenFile(fpath, os.O_RDONLY, 666) if err != nil { return "", err ...
[ 0.6790289878845215, -1.060910940170288, 0.7934000492095947, 0.23074723780155182, 0.044241294264793396, 1.1487438678741455, 0.26603472232818604, 0.4201253056526184, 0.02599356882274151, -0.01882265694439411, 0.1811203956604004, 0.851719081401825, -0.7543638944625854, -0.004785459954291582, ...
func (b *BrBuilder) GetLatestID() string { fpath := filepath.Join(b.StorePath, adminDir, lastidTxt) fd, err := os.OpenFile(fpath, os.O_RDONLY, 666) if err != nil { log.Error(2, "[Branch] Read latest build (%s) failed with %v.", fpath, err) return "" } defer fd.Close() r := bufio.NewReader(fd) str, _ := r.R...
[ 1.1962006092071533, -1.1129151582717896, 0.7301561236381531, -0.42641493678092957, -0.09091906249523163, 1.2568364143371582, -0.139207124710083, 0.04937737062573433, 0.27782419323921204, 0.543701171875, 0.2561206519603729, 1.1409940719604492, -0.840602695941925, -0.6401951313018799, 0.49...
func (b *BrBuilder) updateLatestBuild(latest string) error { fpath := filepath.Join(b.StorePath, adminDir, config.LatestBuildFile) fd, err := os.OpenFile(fpath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 666) if err != nil { log.Error(2, "[Branch] Open local latest build (%s) failed with %v.", fpath, err) return err }...
[ 0.3596418797969818, -1.2861262559890747, 0.7422240376472473, -0.258639931678772, -0.08395621925592422, 1.1148375272750854, 0.5950705409049988, 0.10637106746435165, 0.29493391513824463, 0.3171999454498291, -0.4314960837364197, 0.7083967328071594, -0.6252568364143372, 0.13258838653564453, ...
func (b *BrBuilder) addSymStore(latestbuild, symbols string) (*Build, error) { start := time.Now() comment := start.Format("2006-01-02_15:04:05") log.Info("[Branch] Call symbol store command for build %s ...", latestbuild) /* "C:\Program Files (x86)\Windows Kits\8.1\Debuggers\x86\symstore.exe" add /r /l...
[ 0.1663355976343155, -0.923380970954895, 0.7731705904006958, 0.2963706851005554, 0.32776936888694763, 0.231613889336586, 0.4679114818572998, -0.3712437152862549, 0.45234575867652893, -0.47544318437576294, -0.4467686712741852, 0.48150402307510376, -1.3520259857177734, 0.12772555649280548, ...
func (b *BrBuilder) AddBuild(buildVerion string) error { latest := buildVerion local, err := b.getLatestBuild(true) if buildVerion == "" { if latest, err = b.getLatestBuild(false); err != nil { log.Error(2, "[Branch] Get server latest build failed: %v.", err) return fmt.Errorf("invalid build server latestbu...
[ 0.0895274356007576, -0.7754285931587219, 0.920603334903717, 0.3212706446647644, 0.569056510925293, 0.8364805579185486, 0.9032900929450989, 0.026917871087789536, 0.5039452314376831, -0.8850271105766296, -0.5870592594146729, 0.40003502368927, -0.7114040851593018, 0.6690846681594849, 0.9589...
func (b *BrBuilder) ParseBuilds(handler func(b *Build) error) (int, error) { if handler == nil { handler = func(bd *Build) error { //fmt.Println(bd) return nil } } total := 0 if len(b.builds) != 0 { for _, bd := range b.builds { if err := handler(bd); err != nil { log.Error(2, "[Branch] Parse bu...
[ -0.22244864702224731, -0.1747441440820694, 0.9137904047966003, -0.057942938059568405, -0.44296589493751526, 0.5292524695396423, 0.978127121925354, 0.22978101670742035, -0.8472528457641602, -0.16429291665554047, -0.25422203540802, 0.48899146914482117, -0.7299133539199829, 1.126106858253479,...
func (b *BrBuilder) ParseSymbols(buildID string, handler func(sym *Symbol) error) (int, error) { build := b.getBuild("", buildID) if build == nil { log.Error(2, "[Branch] Build %s not exist for %s.", buildID, b.Name()) return 0, ErrBuildNotExist } idPath := filepath.Join(b.StorePath, adminDir, buildID) fd, er...
[ 0.2400006353855133, 0.1556621938943863, 0.9455888867378235, -0.4463386833667755, -0.4830612540245056, -0.05883436277508736, 1.0610460042953491, -0.4159631133079529, -0.024051297456026077, 0.20187406241893768, -0.8131840229034424, 0.6969366669654846, -0.20755736529827118, 0.3914424777030945...
func (b *BrBuilder) GetSymbolPath(hash, name string) string { return filepath.Join(b.StorePath, name, hash, name) }
[ 1.0331827402114868, 0.03554881364107132, 0.3580402433872223, 0.436246782541275, 0.5041577816009521, -0.13870024681091309, 0.7428644299507141, -0.021328244358301163, 0.005776053760200739, -0.17828865349292755, -0.6772274971008301, 0.5063983798027039, -0.3156691789627075, 0.18051408231258392...
func TestQueueSpaceReleased(t *testing.T) { m1 := &process.CollectorRealTime{ HostName: testHostName, GroupId: 1, } m2 := &process.CollectorRealTime{ HostName: testHostName, GroupId: 2, } check := &testCheck{ name: checks.RTProcessCheckName, data: [][]process.MessageBody{{m1}, {m2}}, } mockConfi...
[ 0.10222724825143814, -0.1496247500181198, 0.8097224831581116, -0.7926938533782959, 0.5664018988609314, 0.4367099404335022, -0.4561257064342499, -0.6099850535392761, 0.3936031460762024, -0.5540704131126404, 0.25664210319519043, 0.6326060891151428, -0.3845066726207733, 1.2242977619171143, ...
func (m *mockEndpoint) start() (*url.URL, *url.URL, *url.URL) { addrC := make(chan net.Addr, 1) m.stopper.Add(1) go func() { defer m.stopper.Done() listener, err := net.Listen("tcp", ":") require.NoError(m.t, err) addrC <- listener.Addr() _ = m.collectorServer.Serve(listener) }() collectorAddr := <-...
[ -0.3794668912887573, -0.24724991619586945, 0.6345323920249939, -0.2450120896100998, 0.8905056715011597, 0.1420212984085083, 0.9011394381523132, -0.09399186074733734, -1.2315673828125, 0.18771278858184814, -0.05683509260416031, 0.05378919094800949, -0.05058649554848671, -0.11832738667726517...
func NewWriter(topicName string) *kafka.Writer { brokerUrls := Config.GetStringSlice("kafka.producer.brokerUrls") w := kafka.NewWriter(kafka.WriterConfig{ Brokers: brokerUrls, Topic: topicName, Balancer: &kafka.LeastBytes{}, Dialer: dialer, }) return w }
[ 0.19613537192344666, -0.13197261095046997, 0.07270385324954987, 0.7829089164733887, -0.5126658082008362, -0.4526223838329315, 0.026220601052045822, 0.5786803364753723, 0.26994824409484863, 0.26842352747917175, 0.34841132164001465, -0.8203687071800232, -0.8187557458877563, 0.121593318879604...
func NewReader(topicName string, groupID string) *kafka.Reader { brokerUrls := Config.GetStringSlice("kafka.consumer.brokerUrls") r := kafka.NewReader(kafka.ReaderConfig{ Brokers: brokerUrls, GroupID: groupID, Topic: topicName, Dialer: dialer, }) return r }
[ 0.37251392006874084, -0.7733278274536133, 0.1734442561864853, 0.414164274930954, -1.0276609659194946, 0.17828470468521118, -0.712736189365387, 0.39035654067993164, -0.2987476587295532, 0.5204680562019348, 1.3177850246429443, 0.04602577164769173, -1.1677706241607666, 0.33195674419403076, ...
func CreateTopic(topicName string, partitions int, replicas int) error { conn, err := kafka.Dial(Config.GetString("kafka.admin.network"), Config.GetString("kafka.admin.address")) if err != nil { return err } defer conn.Close() return conn.CreateTopics( kafka.TopicConfig{ Topic: topicN...
[ 0.5566437840461731, 0.8094414472579956, 0.12497829645872116, 0.10460071265697479, -0.16506709158420563, 0.14624661207199097, -0.5244781970977783, 0.10615051537752151, -0.6072764992713928, 0.3365381360054016, 0.2729308307170868, -0.2814406752586365, -0.21756064891815186, -0.7966100573539734...
func NewSecretStore(secrets InternalSecretStore) *SecretStore { return &SecretStore{ secrets: secrets, } }
[ 0.5298242568969727, -0.6513926982879639, -0.06611793488264084, 0.769391655921936, -1.4658973217010498, 0.04262532666325569, -1.5080294609069824, -0.42027953267097473, 0.4200053811073303, -0.748600959777832, -0.7755979895591736, -0.24089226126670837, -0.5744684934616089, 0.562264084815979, ...
func (s *SecretStore) EnsureSecretExists(organizationID uint, sec clustersecret.SecretCreateRequest) (string, error) { createSecret := &secret.CreateSecretRequest{ Name: sec.Name, Type: sec.Type, Values: sec.Values, Tags: sec.Tags, } id, err := s.secrets.GetOrCreate(organizationID, createSecret) ret...
[ 0.16956795752048492, -0.49877381324768066, 0.444541871547699, 0.40514737367630005, 1.523630976676941, 0.004592087585479021, -0.9100185036659241, -1.124761939048767, 0.09605644643306732, 0.7163110375404358, -0.6897273659706116, -0.04659363254904747, -0.015578927472233772, -0.169045537710189...
func (s *SecretStore) GetSecret(organizationID uint, name string) (clustersecret.SecretResponse, error) { sec, err := s.secrets.GetByName(organizationID, name) if err != nil { return clustersecret.SecretResponse{}, err } if sec == nil { return clustersecret.SecretResponse{}, clustersecret.ErrSecretNotFound } ...
[ 0.4036754071712494, 0.24083493649959564, 0.4875275194644928, 1.0573890209197998, 0.4209737479686737, -1.3702763319015503, -0.5726891756057739, -1.0647202730178833, 0.5989261865615845, 0.24652646481990814, -0.5860870480537415, 0.5631381273269653, 0.02017125114798546, -0.013144565746188164, ...
func __b64encode(out *[]byte, src *[]byte, mode int)
[ -0.8379794955253601, -0.29958057403564453, 0.24433378875255585, 0.704773485660553, -0.6068575978279114, -0.7203579545021057, 0.4483199119567871, 0.2925991415977478, 0.009755602106451988, 1.115641474723816, 0.012213272973895073, -0.010321631096303463, -0.10337027162313461, 0.322725594043731...
func __b64decode(out *[]byte, src unsafe.Pointer, len int, mode int) (ret int)
[ -0.6699454188346863, -0.6411890387535095, 0.4324913024902344, 0.15305736660957336, -0.4556111693382263, -1.2752199172973633, 0.5566045641899109, 0.3006449341773987, -0.2711372971534729, 0.6934268474578857, -0.24428099393844604, -0.7214647531509399, -0.6754500865936279, 0.31470561027526855,...
func (c *Config) Validate() error { var err error if c.Endpoint == "" { err = multierr.Append(err, errors.New("no manager endpoint was specified")) return err } res, err := url.Parse(c.Endpoint) if err != nil { err = multierr.Append(err, fmt.Errorf("unable to parse url %s: %w", c.Endpoint, err)) return er...
[ -0.7917750477790833, 0.10174451768398285, 0.6099531054496765, 0.17804023623466492, 0.405860960483551, -0.11440454423427582, -0.6946793794631958, 0.4350430369377136, -0.9972438216209412, -0.11428287625312805, 0.09212673455476761, 0.10455222427845001, -0.6981710195541382, 1.2000352144241333,...
func NewCustomerAccountManagementV1GetDefaultShippingAddressGetParams() *CustomerAccountManagementV1GetDefaultShippingAddressGetParams { var () return &CustomerAccountManagementV1GetDefaultShippingAddressGetParams{ timeout: cr.DefaultTimeout, } }
[ 0.0555872917175293, 0.580825924873352, 0.7686596512794495, 0.6782622337341309, 0.40461039543151855, -0.6807087063789368, -0.02958206832408905, 0.6072637438774109, 0.3816576898097992, -0.5429938435554504, -0.3629758656024933, 0.34149977564811707, -0.8164380192756653, 0.1626109629869461, -...
func NewCustomerAccountManagementV1GetDefaultShippingAddressGetParamsWithTimeout(timeout time.Duration) *CustomerAccountManagementV1GetDefaultShippingAddressGetParams { var () return &CustomerAccountManagementV1GetDefaultShippingAddressGetParams{ timeout: timeout, } }
[ 0.6169135570526123, 0.3406357169151306, 0.702326238155365, 0.7716416716575623, -0.014023613184690475, -0.08134911954402924, -0.5950233340263367, 0.35675960779190063, 0.41181278228759766, 0.31482428312301636, -0.12378381192684174, 0.3669061064720154, -0.6052730679512024, 0.6764642000198364,...
func NewCustomerAccountManagementV1GetDefaultShippingAddressGetParamsWithContext(ctx context.Context) *CustomerAccountManagementV1GetDefaultShippingAddressGetParams { var () return &CustomerAccountManagementV1GetDefaultShippingAddressGetParams{ Context: ctx, } }
[ 0.1124628558754921, 0.7493622303009033, 0.9301243424415588, 0.5452520251274109, 0.14203527569770813, -0.35476255416870117, -0.23257358372211456, 0.0256577767431736, 1.0173174142837524, -0.22595061361789703, -0.19670651853084564, 0.11918097734451294, -0.5678387880325317, 0.21556463837623596...
func NewCustomerAccountManagementV1GetDefaultShippingAddressGetParamsWithHTTPClient(client *http.Client) *CustomerAccountManagementV1GetDefaultShippingAddressGetParams { var () return &CustomerAccountManagementV1GetDefaultShippingAddressGetParams{ HTTPClient: client, } }
[ 0.17425711452960968, 0.6353651285171509, 0.8541162014007568, 0.5652472972869873, 0.4472271502017975, -0.2331908941268921, 0.2814178466796875, 0.46048861742019653, 0.23960532248020172, -0.5379589200019836, -0.3286811411380768, 0.11443884670734406, -0.49426937103271484, 0.08148134499788284, ...
func (o *CustomerAccountManagementV1GetDefaultShippingAddressGetParams) WithTimeout(timeout time.Duration) *CustomerAccountManagementV1GetDefaultShippingAddressGetParams { o.SetTimeout(timeout) return o }
[ 0.15860873460769653, 0.673080325126648, 0.4451543688774109, 0.31538626551628113, -0.13337449729442596, -0.4638703465461731, -0.07165872305631638, -0.0352097786962986, 0.9952229261398315, 0.25869089365005493, 0.08293227106332779, 0.12461408972740173, -0.13180966675281525, 0.2202346473932266...
func (o *CustomerAccountManagementV1GetDefaultShippingAddressGetParams) SetTimeout(timeout time.Duration) { o.timeout = timeout }
[ -0.26233774423599243, 0.9798860549926758, 0.41706863045692444, 0.22209960222244263, 0.504222571849823, 0.33850231766700745, 0.2507781982421875, 0.3682553768157959, 0.4380820095539093, 0.11252306401729584, 0.19221004843711853, 0.6472019553184509, -0.4779611825942993, 0.01146984938532114, ...
func (o *CustomerAccountManagementV1GetDefaultShippingAddressGetParams) WithContext(ctx context.Context) *CustomerAccountManagementV1GetDefaultShippingAddressGetParams { o.SetContext(ctx) return o }
[ -0.36414527893066406, 0.6769182682037354, 0.6449338793754578, 0.22772446274757385, -0.1684800535440445, -0.5228621959686279, -0.11070974916219711, -0.2943144738674164, 1.3285424709320068, -0.38103005290031433, 0.09048958867788315, 0.05362391471862793, -0.5821859240531921, -0.29346117377281...
func (o *CustomerAccountManagementV1GetDefaultShippingAddressGetParams) SetContext(ctx context.Context) { o.Context = ctx }
[ -0.5662376284599304, 1.0929266214370728, 0.5223638415336609, 0.41230806708335876, 0.5676634907722473, 0.09343630820512772, 0.2673448920249939, 0.01774182915687561, 1.0526854991912842, -0.4061715006828308, 0.0058651757426559925, 0.5115004777908325, -0.7528719902038574, -0.30378931760787964,...
func (o *CustomerAccountManagementV1GetDefaultShippingAddressGetParams) WithHTTPClient(client *http.Client) *CustomerAccountManagementV1GetDefaultShippingAddressGetParams { o.SetHTTPClient(client) return o }
[ 0.04341036453843117, 0.036051228642463684, 0.6296095848083496, 0.0880967453122139, 0.20012055337429047, -0.536286473274231, 0.5220722556114197, -0.20615863800048828, 0.34557563066482544, -0.6231079697608948, -0.0729752853512764, -0.08010922372341156, -0.10786113888025284, -0.39131057262420...
func (o *CustomerAccountManagementV1GetDefaultShippingAddressGetParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client }
[ 0.010186298750340939, 0.570733368396759, 0.5204164981842041, -0.41479969024658203, -0.05890784040093422, -0.24272049963474274, 0.7750680446624756, -0.07015366852283478, -0.23158803582191467, -0.5670982599258423, -0.14537803828716278, 0.5156070590019226, -0.3962364196777344, -0.672852456569...
func (o *CustomerAccountManagementV1GetDefaultShippingAddressGetParams) WithCustomerID(customerID int64) *CustomerAccountManagementV1GetDefaultShippingAddressGetParams { o.SetCustomerID(customerID) return o }
[ 0.5596802830696106, -0.3294292688369751, 0.5780166387557983, 0.3035704791545868, -0.2337772399187088, -0.15981610119342804, 0.13861854374408722, 0.05688825249671936, 0.9780703783035278, -0.18169470131397247, 0.7893092632293701, -0.1429959386587143, -0.3649502694606781, 0.7061795592308044, ...
func (o *CustomerAccountManagementV1GetDefaultShippingAddressGetParams) SetCustomerID(customerID int64) { o.CustomerID = customerID }
[ -0.12149569392204285, 0.14977377653121948, 0.48982247710227966, 0.5961712002754211, 0.46364113688468933, 0.36095869541168213, 0.5661824941635132, 0.4415610432624817, 0.2742460370063782, -0.35325366258621216, 0.5045947432518005, 0.29902273416519165, -0.9739552736282349, 1.0347425937652588, ...
func (o *CustomerAccountManagementV1GetDefaultShippingAddressGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error // path param customerId if err := r.SetPathParam("customerId", swag.FormatInt64(o.CustomerID...
[ -1.1393331289291382, 0.3421027958393097, 0.8217206001281738, -0.09730348736047745, 1.3353843688964844, -0.5334319472312927, 1.0166902542114258, 0.17748725414276123, -0.06848188489675522, -0.07148613035678864, 0.7228572368621826, 0.24402925372123718, -0.731071949005127, -0.09086832404136658...
func NewPersonService(a Accessor) PersonService { return PersonService{ a: a, } }
[ -0.3466137945652008, -1.213525414466858, 0.23028378188610077, -0.2771032154560089, -1.303647756576538, -0.09242580085992813, -0.25721222162246704, -0.10096821188926697, 0.3974505662918091, -0.9275761246681213, 0.2785598039627075, 0.5941530466079712, -0.3746837079524994, 0.9300239682197571,...
func (ps PersonService) Get(n int) (Person, error) { p := ps.a.Retrieve(n) if p.First == "" { return Person{}, fmt.Errorf("no person with n of %d", n) } return p, nil }
[ -0.5556772351264954, 0.12750615179538727, 0.39129480719566345, -0.7498070597648621, 0.28320080041885376, -0.6121575236320496, -0.6829743385314941, -0.5729606747627258, 0.2628660500049591, -0.989314079284668, 0.49841487407684326, 0.4059818983078003, -0.4725842773914337, 0.3394213616847992, ...
func Put(a Accessor, n int, p Person) { a.Save(n, p) }
[ -0.5450992584228516, -0.19453531503677368, 0.2971706986427307, -1.0945565700531006, -0.4226810336112976, 0.34238237142562866, 0.2650774121284485, 0.6192357540130615, 0.19989685714244843, -0.15961629152297974, -0.18927213549613953, 0.165916308760643, 0.031529851257801056, -0.401726096868515...
func ReplaceBase(str, old, new string) string { return strings.Replace(str, old, fmt.Sprintf(new, baseURL), 1) }
[ -0.9690039753913879, -1.1913436651229858, 0.27161312103271484, 0.0664837658405304, -0.19601793587207794, -0.4084031581878662, -0.894511878490448, 0.7347398996353149, -0.5510200262069702, 0.38599729537963867, -0.5026103258132935, -0.03711550310254097, -0.8307439088821411, 0.0558411777019500...
func AddBase(path string) string { return fmt.Sprintf("%s%s", baseURL, path) }
[ -0.679628312587738, -0.8129449486732483, 0.5373471975326538, 0.41892141103744507, -0.05926787853240967, 0.37391340732574463, -1.3950785398483276, -0.1873445361852646, 0.00261910492554307, -0.28894713521003723, 0.627427339553833, -0.13810254633426666, -0.615556538105011, 0.2705540060997009,...
func TrimBase(r *http.Request, prefix string) string { return strings.TrimPrefix(r.URL.Path, AddBase(prefix)) }
[ -0.6652205586433411, -0.5757478475570679, 0.39567384123802185, -0.28820905089378357, -0.02871830202639103, -0.0798029750585556, -1.1949464082717896, -0.09727134555578232, 0.41449302434921265, 0.0842561200261116, -0.08241980522871017, -0.32832345366477966, -0.1567259281873703, -0.0156125705...
func ValidateCollector(collector *monitor.Collector) field.ErrorList { allErrs := apimachineryvalidation.ValidateObjectMeta(&collector.ObjectMeta, false, ValidateName, field.NewPath("metadata")) if len(collector.Spec.ClusterName) == 0 { allErrs = append(allErrs, field.Required(field.NewPath("spec", "clusterName"),...
[ -0.5317261219024658, -1.2242965698242188, 0.6091004610061646, -0.12750785052776337, -0.002094802912324667, 0.5242387056350708, 0.21765488386154175, -0.24496085941791534, -0.05140792950987816, 0.42740729451179504, 0.12625451385974884, -0.19500747323036194, 0.44005855917930603, 1.30757677555...
func ValidateCollectorUpdate(collector *monitor.Collector, old *monitor.Collector) field.ErrorList { allErrs := apimachineryvalidation.ValidateObjectMetaUpdate(&collector.ObjectMeta, &old.ObjectMeta, field.NewPath("metadata")) allErrs = append(allErrs, ValidateCollector(collector)...) if collector.Spec.ClusterName ...
[ -0.34165501594543457, -1.557788372039795, 0.7709149718284607, -0.10390949994325638, -0.3720700144767761, 0.05779730901122093, 0.09905960410833359, -0.47322118282318115, -0.2561172842979431, 0.6684685945510864, 0.040240805596113205, -0.014037957414984703, 0.5904408097267151, 0.4105216562747...
func (pool ServerPool) JoinQueue(worker *SmtpWorker) { pool <- worker }
[ -0.6965097784996033, -0.5980919599533081, 0.37839293479919434, -0.5207322835922241, -0.21229860186576843, 0.5236234664916992, 0.018474962562322617, -0.23514191806316376, 0.004862918518483639, 0.48437485098838806, -1.4078576564788818, 0.9168736338615417, -0.6315600872039795, 0.7613911628723...
func NewServerPool(maxWorkers int) ServerPool { xssService := sanitization.NewXSSService() emailValidationService := sanitization.NewEmailValidationService() pool := make(ServerPool, maxWorkers) for index := 0; index < maxWorkers; index++ { pool.JoinQueue(NewSmtpWorker( index+1, pool, emailValidationSe...
[ -0.6204606890678406, 0.7355806231498718, 0.41214096546173096, 0.21419833600521088, -0.6398162245750427, -0.11206036806106567, 0.24954283237457275, -0.3233937621116638, -0.010229513980448246, 0.23458656668663025, -0.796525239944458, 0.6764108538627625, -0.4763868451118469, 0.975131630897522...
func (pool ServerPool) NextWorker(connection net.Conn, receiver chan mailitem.MailItem) (*SmtpWorker, error) { /* * TODO: This blocks until a worker is available. Perhaps implement a timeout? */ select { case worker := <-pool: worker.Prepare( connection, receiver, smtpio.SmtpReader{Connection: connect...
[ -0.3022744059562683, -0.2897491455078125, 0.5677675008773804, -0.267352819442749, -0.9455981850624084, 0.06342021375894547, -0.24683405458927155, -0.37949374318122864, -0.02577517181634903, 0.0338868722319603, -0.4377056062221527, 0.15993234515190125, -0.3407578468322754, 0.233679935336112...
func invalidDelimiterError(w http.ResponseWriter, r *http.Request) { writeError(w, r, http.StatusBadRequest, "InvalidDelimiter", "The delimiter you specified is invalid. It must be '' or '/'.") }
[ -0.8299421668052673, -0.16777533292770386, 0.35429316759109497, 0.3092536926269531, -0.8647827506065369, 0.013378461822867393, -0.6184405088424683, 0.7940776348114014, -0.21690671145915985, -0.040686268359422684, 0.2064797729253769, 0.23127196729183197, -0.6799963116645813, 0.1296584159135...
func invalidFilePathError(w http.ResponseWriter, r *http.Request) { writeError(w, r, http.StatusBadRequest, "InvalidFilePath", "Invalid file path") }
[ 0.0017301428597420454, -1.1029667854309082, -0.10688480734825134, 0.7579342722892761, 0.16127650439739227, 0.5153522491455078, 0.5324141979217529, 0.9078302383422852, -0.49171513319015503, 0.2687342166900635, 0.31878483295440674, -0.7818460464477539, -0.28479090332984924, 0.305837035179138...
func InitWidget(widget Widget, parent Window, className string, style, exStyle uint32) error { if parent == nil { return newError("parent cannot be nil") } if err := InitWindow(widget, parent, className, style|win.WS_CHILD, exStyle); err != nil { return err } if container, ok := parent.(Container); ok { if...
[ 0.2608993947505951, 0.6383827328681946, 0.6501065492630005, 0.15084730088710785, -0.40027716755867004, 0.4135299623012543, 0.048713404685258865, 0.33077090978622437, 0.04221661016345024, 0.13617490231990814, 0.22119653224945068, 0.6539434194564819, -0.3263258934020996, 1.2043145895004272, ...
func (wb *WidgetBase) AsWidgetBase() *WidgetBase { return wb }
[ -0.05675308778882027, -1.0171011686325073, 0.23805128037929535, 0.10098711401224136, 0.07052114605903625, -0.14437437057495117, 0.1648324429988861, -0.22557640075683594, 0.21408560872077942, -0.019498087465763092, -0.09041054546833038, -0.05203009769320488, -0.6626081466674805, 0.951319515...
func (wb *WidgetBase) Bounds() Rectangle { return wb.RectangleTo96DPI(wb.BoundsPixels()) }
[ 0.1517542451620102, -0.5744845867156982, 0.4166111648082733, -0.191914901137352, -0.0786973237991333, 0.17712779343128204, -0.4611014425754547, -0.20667323470115662, 0.8370316624641418, -0.5880644917488098, 0.1659492403268814, 0.1559702306985855, -0.43582621216773987, 0.6343778967857361, ...
func (wb *WidgetBase) BoundsPixels() Rectangle { b := wb.WindowBase.BoundsPixels() if wb.parent != nil { p := b.Location().toPOINT() if !win.ScreenToClient(wb.parent.Handle(), &p) { newError("ScreenToClient failed") return Rectangle{} } b.X = int(p.X) b.Y = int(p.Y) } return b }
[ 0.15250936150550842, -1.3369171619415283, 0.7106925845146179, -0.7174933552742004, -0.22914308309555054, 0.2897088825702667, -0.1916445791721344, -0.470822274684906, 0.8368486762046814, 0.05091870203614235, 0.9692767262458801, 0.8072009086608887, -1.0650534629821777, 0.7747355699539185, ...
func (wb *WidgetBase) BringToTop() error { if wb.parent != nil { if err := wb.parent.BringToTop(); err != nil { return err } } return wb.WindowBase.BringToTop() }
[ -0.2543286979198456, -0.01396133378148079, 0.8606953620910645, 0.5295131206512451, -0.16388708353042603, -0.5446845889091492, 0.38331571221351624, -0.17569616436958313, 0.21157404780387878, 0.5701824426651001, 0.332489937543869, 0.1584145426750183, -0.43905460834503174, 0.8511780500411987,...
func (wb *WidgetBase) Enabled() bool { if wb.parent != nil { return wb.enabled && wb.parent.Enabled() } return wb.enabled }
[ 0.4866698980331421, -0.4096945822238922, 0.7078544497489929, 0.7162129878997803, 0.20268502831459045, 0.7555103898048401, 0.19451013207435608, 1.3875491619110107, -0.07618599385023117, -0.6210804581642151, -1.109831690788269, 0.010816572234034538, -0.9126412868499756, 1.2714595794677734, ...
func (wb *WidgetBase) Font() *Font { if wb.font != nil { return wb.font } else if wb.parent != nil { return wb.parent.Font() } return defaultFont }
[ 0.6184144616127014, -0.16777411103248596, 0.47468551993370056, 0.8743770122528076, 0.8940396904945374, -0.32086381316185, 0.8002224564552307, 0.13179932534694672, 0.5239545702934265, -0.8632697463035583, 0.3166545033454895, 0.06872222572565079, -0.4135187268257141, 0.9184330105781555, -0...
func (wb *WidgetBase) Alignment() Alignment2D { return wb.alignment }
[ -0.501649022102356, -1.125678300857544, 0.29795604944229126, 0.5037164092063904, -0.928886890411377, 0.6948363780975342, 0.37956228852272034, 0.3730626404285431, -0.23645196855068207, -0.263875275850296, 0.7259497046470642, -0.29363542795181274, -0.3461925983428955, 0.8120970129966736, -...
func (wb *WidgetBase) SetAlignment(alignment Alignment2D) error { if alignment != wb.alignment { if alignment < AlignHVDefault || alignment > AlignHFarVFar { return newError("invalid Alignment value") } wb.alignment = alignment wb.RequestLayout() } return nil }
[ -0.5702945590019226, -0.11202584952116013, 0.26460200548171997, 0.7607432007789612, -0.515995979309082, 0.3855530023574829, 0.36162304878234863, 0.34719568490982056, 0.107252337038517, -0.2173769474029541, 0.2276434451341629, -0.5392680168151855, -0.36956167221069336, 1.1688568592071533, ...
func (wb *WidgetBase) AlwaysConsumeSpace() bool { return wb.alwaysConsumeSpace }
[ 0.8728945851325989, -0.6415740251541138, 0.5111932754516602, 1.0140480995178223, -0.13769248127937317, -0.0686948299407959, -0.1690593808889389, 0.05329268053174019, 0.324429452419281, 0.4547393023967743, 0.21288281679153442, -0.8414316773414612, -0.453014612197876, 1.259006381034851, -0...
func (wb *WidgetBase) SetAlwaysConsumeSpace(b bool) error { wb.alwaysConsumeSpace = b wb.RequestLayout() return nil }
[ 0.2799474000930786, -0.008031669072806835, 0.44550275802612305, 0.6566406488418579, -0.01716548204421997, -0.25710293650627136, 0.18629878759384155, 0.2286318689584732, 0.5811418294906616, -0.16066332161426544, -0.005862023681402206, -0.6138929128646851, -0.5850062966346741, 1.713976502418...
func (wb *WidgetBase) Parent() Container { return wb.parent }
[ 0.5481477975845337, -0.1218390241265297, 0.36353588104248047, 0.5948363542556763, -0.30457234382629395, 0.11763627082109451, 1.260279893875122, -0.7600317597389221, -0.4324680268764496, -0.6592390537261963, 0.21325400471687317, -0.5110741853713989, -0.6720497012138367, 0.9847004413604736, ...
func (wb *WidgetBase) SetParent(parent Container) (err error) { if parent == wb.parent { return nil } style := uint32(win.GetWindowLong(wb.hWnd, win.GWL_STYLE)) if style == 0 { return lastError("GetWindowLong") } if parent == nil { wb.SetVisible(false) style &^= win.WS_CHILD style |= win.WS_POPUP ...
[ -0.20148105919361115, -0.13994763791561127, 1.0044994354248047, 0.05549433082342148, -0.7936763167381287, -0.1866742968559265, 0.9884244799613953, -0.14325280487537384, 0.592009425163269, 0.4490978419780731, -0.2667379379272461, 0.0625816360116005, -0.8220841288566589, 1.204826831817627, ...
func (wb *WidgetBase) ToolTipText() string { if tt := wb.group.ToolTip(); tt != nil { return tt.Text(wb.window.(Widget)) } return "" }
[ -0.29553961753845215, -0.48671483993530273, 0.040128350257873535, 0.026842430233955383, -0.4264020025730133, -0.17240892350673676, -0.04242052137851715, -1.1076875925064087, 0.4096267819404602, 1.4137381315231323, -0.14188815653324127, -1.0304216146469116, -0.08230619877576828, -0.16127625...
func (wb *WidgetBase) SetToolTipText(s string) error { if tt := wb.group.ToolTip(); tt != nil { if err := tt.SetText(wb.window.(Widget), s); err != nil { return err } } wb.toolTipTextChangedPublisher.Publish() return nil }
[ -1.09756600856781, -0.5411523580551147, 0.07792547345161438, -0.16990572214126587, -0.8437538146972656, -0.3847838044166565, -0.11076221615076065, -0.5755951404571533, 0.10427519679069519, 1.076642394065857, -0.7483062744140625, -0.7793315649032593, 0.1972062885761261, -0.135874941945076, ...
func (wb *WidgetBase) GraphicsEffects() *WidgetGraphicsEffectList { return wb.graphicsEffects }
[ 0.44243958592414856, 0.6779524087905884, 0.15796224772930145, -0.3637487292289734, -0.14903855323791504, 0.0897732749581337, -0.9513704776763916, -0.18471801280975342, 0.403376042842865, -0.7927587628364563, -1.5179568529129028, -0.29070064425468445, -0.3878876864910126, 0.0456991158425807...
func NewDB(path string) (DB, error) { db, err := leveldb.OpenFile(path, nil) if err != nil { return nil, err } return &levelDBImpl{ DB: db, }, nil }
[ 0.43543392419815063, -0.3138406574726105, 0.5840075612068176, 0.24810507893562317, -0.5661482214927673, 1.234205961227417, 0.46481233835220337, -0.02740469016134739, -0.5802345275878906, 0.2605016231536865, 0.07344009727239609, 0.11849276721477509, -0.7140149474143982, 0.13937033712863922,...
func NewFileManager() FileManager { return FileManager{} }
[ -0.20854134857654572, -1.5470997095108032, 0.17610326409339905, -0.07564806193113327, -0.6231589317321777, -0.42645904421806335, -0.8911473155021667, 0.30011069774627686, 0.5741848945617676, -1.2749217748641968, -0.4970570504665375, -0.3171214163303375, -0.6149184107780457, 1.5666393041610...
func (f FileManager) Read(path string) ([]byte, error) { b, err := ioutil.ReadFile(path) if err != nil && !os.IsNotExist(err) { return nil, err } return b, err }
[ 0.04061601310968399, -0.1779414862394333, 0.7596119046211243, 0.04910280182957649, -0.15011948347091675, 0.40810808539390564, -0.30236372351646423, -0.7230003476142883, -0.31548023223876953, -0.6831786632537842, 0.2884935438632965, 0.2365017682313919, -0.34860920906066895, 0.30048999190330...
func (f FileManager) Exists(path string) bool { if _, err := os.Stat(path); os.IsNotExist(err) { return false } return true }
[ -0.8212538957595825, -0.654822051525116, 0.49730801582336426, -0.679186224937439, 0.4785573184490204, 0.9440434575080872, -0.6710120439529419, -0.11090374737977982, -0.45892471075057983, -1.1822495460510254, -0.26852598786354065, -0.40045392513275146, 0.23920480906963348, 0.983829438686370...
func (f FileManager) Write(path string, content []byte) error { return ioutil.WriteFile(path, content, os.ModePerm) }
[ -0.3097608983516693, -0.4154123365879059, 0.14170731604099274, 0.43686267733573914, 0.08899149298667908, 0.6905608177185059, 0.05559858679771423, 0.15163181722164154, -1.0675865411758423, -0.3933252990245819, 0.1739804595708847, -0.1745639145374298, -0.48620709776878357, 0.2188211679458618...
func (f FileManager) Remove(path string) error { if f.Exists(path) { return os.Remove(path) } return nil }
[ 0.27937233448028564, -0.5137559175491333, 0.420330286026001, -0.027382325381040573, -0.49266543984413147, 0.12142790108919144, -0.16605767607688904, 0.3007771074771881, -0.11678636074066162, -0.5782732367515564, -0.23084864020347595, -0.40133213996887207, -0.38173437118530273, 0.6804934740...