text
stringlengths
11
6.3k
embedding
listlengths
768
768
func NewDPAPIMonitorEntry(stream fibcapi.FIBCDpApi_MonitorServer, dpID uint64, db *DBCtl) *DPAPIMonitorEntry { remote, _ := GrpcRemoteHostPort(stream) return &DPAPIMonitorEntry{ stream: stream, dpID: dpID, remote: remote, monCh: make(chan *fibcapi.DpMonitorReply), modCh: make(chan *fibcapi.DpMonitorRepl...
[ -0.18872682750225067, -0.36923864483833313, 0.4496513903141022, -0.944650411605835, -0.06739489734172821, -0.11577602475881577, -0.6934347152709961, -0.566514253616333, 0.5132039189338684, 0.041609831154346466, -0.49312570691108704, 0.62419193983078, -1.303001880645752, -0.2593511343002319...
func (m *DPAPIMonitorEntry) Remote() string { return m.remote }
[ 0.17806889116764069, -0.7043902277946472, 0.24984145164489746, -0.592767059803009, -0.27507907152175903, 1.9233368635177612, -0.835242748260498, -0.12169758230447769, 0.3168940544128418, -0.29317280650138855, -0.7228955030441284, 0.8561971187591553, -0.6455357074737549, -1.0924396514892578...
func (m *DPAPIMonitorEntry) Send(msg *fibcapi.DpMonitorReply) { if m.active { m.monCh <- msg } }
[ 0.4369117021560669, 0.5696018934249878, 0.17445166409015656, -0.33605116605758667, 0.9907605051994324, 0.09788097441196442, -0.348704993724823, -1.2418051958084106, 0.510087251663208, 0.5058320760726929, -0.01823093555867672, -0.06280887871980667, -1.76004159450531, 0.3893057107925415, -...
func (m *DPAPIMonitorEntry) SendMod(msg *fibcapi.DpMonitorReply) { if m.active { m.modCh <- msg } }
[ -0.21450269222259521, 0.2158389687538147, 0.239632710814476, -0.34881696105003357, 0.5174238681793213, 0.954474151134491, 0.008914455771446228, -0.6349018812179565, 0.8953636884689331, 0.24948734045028687, 0.5571303367614746, 0.48570680618286133, -1.3405334949493408, 0.43666738271713257, ...
func (m *DPAPIMonitorEntry) Start(done <-chan struct{}) { m.active = true go m.Serve(done) m.log.Infof("started.") }
[ -0.28066545724868774, 0.055014755576848984, 0.2495705932378769, -0.5633198022842407, 0.8796983361244202, 0.3719652593135834, 0.30510425567626953, 0.04652266576886177, -0.47843268513679504, 0.5269688963890076, -0.9317094087600708, 1.129319429397583, -0.5416852831840515, 0.23140259087085724,...
func (m *DPAPIMonitorEntry) Stop() { if m.active { m.active = false close(m.monCh) } m.log.Infof("stopped.") }
[ -0.39424657821655273, -0.2362656444311142, 0.144785538315773, -0.5152348875999451, 0.8164209127426147, 0.6631361246109009, 0.15081605315208435, -0.48163947463035583, -0.4309651851654053, 0.4901716709136963, -0.24115091562271118, 0.21486616134643555, -1.2495626211166382, -0.0993992313742637...
func (f *fileEntry) GetAppName() string { name := project.AppEventFileContentRegex.FindStringSubmatch(f.Filename)[1] name = util.UcFirst(name) return name }
[ 1.0195268392562866, -1.0979210138320923, 0.6702677607536316, 0.6455632448196411, -0.29806530475616455, 0.39900606870651245, 0.30144813656806946, 0.7327180504798889, -0.7380037307739258, 0.6564986109733582, 1.160578727722168, -0.6868591904640198, 0.5172517895698547, 0.35841771960258484, 0...
func LoadConfigFile(filename string) (*v2.Config, string, error) { content, err := ioutil.ReadFile(filename) if err != nil { return nil, "", fmt.Errorf("Failed to load %v: %v", filename, err.Error()) } cfg, warn, err := LoadConfigString(content) if err != nil { return nil, warn, fmt.Errorf("Failed to load %v: ...
[ 0.1305275410413742, -0.37459927797317505, 0.42682597041130066, -0.24945427477359772, -1.0184379816055298, -0.4051060080528259, -0.6081414222717285, 0.25302526354789734, -1.2951672077178955, 1.1561565399169922, -0.3612667918205261, -0.10207629203796387, -0.4823262691497803, 0.48465487360954...
func Report(c context.Context) { var stats runtime.MemStats runtime.ReadMemStats(&stats) MemAlloc.Set(c, int64(stats.Alloc)) MemTotalAlloc.Set(c, int64(stats.TotalAlloc)) MemMallocs.Set(c, int64(stats.Mallocs)) MemFrees.Set(c, int64(stats.Frees)) MemNextGC.Set(c, int64(stats.NextGC)) MemNumGC.Set(c, int64(stat...
[ 0.4257197678089142, 0.4891265630722046, 0.7116925716400146, -0.6819497346878052, 0.42720067501068115, -0.17689932882785797, 1.0598033666610718, -0.9344099760055542, 0.25769275426864624, -0.2962896525859833, -0.23662550747394562, -0.25259143114089966, -0.5354470014572144, 1.0715588331222534...
func (c CalculationBasis) ColumnSuffix() string { suffix := fmt.Sprintf("%vd", c.IntervalDays) if c.Residual { suffix += "_residual" } return suffix }
[ 0.6673938035964966, -0.020711462944746017, 0.4766947329044342, -0.22729934751987457, 0.17212608456611633, 0.9516011476516724, -0.8653037548065186, -0.5017518401145935, -0.5187599658966064, -0.7377943992614746, -0.2127857655286789, -0.05999584123492241, 0.6838832497596741, -0.15615747869014...
func (tc *TimewiseCounts) PutValue(value int64, basis CalculationBasis) { var counts *Counts switch basis.IntervalDays { case 1: counts = &tc.OneDay case 3: counts = &tc.ThreeDay case 7: counts = &tc.SevenDay default: panic(fmt.Sprintf("invalid calculation basis, interval days = %v", basis.IntervalDays)) ...
[ 0.40134918689727783, 1.0208147764205933, 0.5715866088867188, -0.26656633615493774, -0.25129231810569763, 0.747202455997467, -0.12141022086143494, -0.5668616890907288, -0.13546234369277954, 0.4123983085155487, 0.9414302110671997, -0.6244639754295349, -0.04739697277545929, 0.4780601263046264...
func Update(ctx context.Context) error { var errs []error if _, err := cachedCfg.Update(ctx, nil); err != nil { errs = append(errs, err) } if err := updateProjects(ctx); err != nil { errs = append(errs, err) } if len(errs) > 0 { return errors.NewMultiError(errs...) } return nil }
[ -0.5785315632820129, 1.2220653295516968, 0.12562566995620728, 0.08852953463792801, -0.3661012351512909, 0.4160773754119873, 0.2641575336456299, -0.4910285174846649, 0.12528125941753387, -0.1414104700088501, -0.5640343427658081, -0.21193793416023254, -0.673811674118042, 0.7676001191139221, ...
func Get(ctx context.Context) (*configpb.Config, error) { cfg, err := cachedCfg.Get(ctx, nil) return cfg.(*configpb.Config), err }
[ -0.6409607529640198, 0.5899686217308044, 0.320332795381546, 0.46293655037879944, 0.042645372450351715, 0.07714828848838806, -0.6654897332191467, -0.18614985048770905, -0.4509299397468567, 0.13246795535087585, -0.4819515645503998, 0.9905503392219543, -0.07803738862276077, 0.0082509638741612...
func SetTestConfig(ctx context.Context, cfg *configpb.Config) error { return cachedCfg.Set(ctx, cfg, &config.Meta{}) }
[ 0.10047066956758499, 0.21288606524467468, 0.3054378032684326, 0.3432896137237549, 0.1655837595462799, 0.3525877892971039, 0.4735230505466461, -0.009551086463034153, 0.4963577091693878, 0.5050461888313293, -1.0319626331329346, 0.39934512972831726, -0.1939687281847, 0.9010253548622131, -0....
func WithBothProjectConfigs(f func(cfg *configpb.ProjectConfig, name string)) func() { return func() { monorailCfg := CreateMonorailPlaceholderProjectConfig() buganizerCfg := CreateBuganizerPlaceholderProjectConfig() f(monorailCfg, "monorail") f(buganizerCfg, "buganizer") } }
[ 0.22455044090747833, -0.22854958474636078, 0.3403434157371521, 0.7644757628440857, -0.22430704534053802, 0.5625854730606079, 0.32026684284210205, 0.022969530895352364, -0.8191399574279785, 0.2279578596353531, -1.0157662630081177, -0.509140133857727, 0.01567920483648777, 0.43772998452186584...
func HomeDir() string { if h := os.Getenv("HOME"); h != "" { return h } return os.Getenv("USERPROFILE") // windows }
[ 0.9054276347160339, -0.1454997956752777, 0.7231610417366028, 1.5260494947433472, -0.8251872658729553, 0.8689693808555603, 0.38673776388168335, -0.1265011727809906, 0.2534145414829254, -0.25357431173324585, 0.5451153516769409, 0.2862440347671509, -1.0564818382263184, 1.5834360122680664, 0...
func RemoveIfAlreadyExists(allUsers []IamUser, userToRemove string) []IamUser { userLocation := FindExistingUser(allUsers, userToRemove) if userLocation >= 0 { allUsers[userLocation] = allUsers[len(allUsers)-1] // move the last user in the slice to this location allUsers = allUsers[:len(allUsers)-1] ...
[ -0.5827614665031433, -0.20491939783096313, 0.47809475660324097, 0.3055031895637512, 0.10400211811065674, -0.8063433170318604, 0.46056365966796875, 0.9423810839653015, 0.9325694441795349, 1.337248682975769, -0.5097353458404541, -0.10572700202465057, -0.8905683755874634, -0.03709510341286659...
func RemoveGroup(allUsers []IamUser, groupToRemove string) []IamUser { for _, user := range allUsers { if user.IAMGroup == groupToRemove { RemoveIfAlreadyExists(allUsers, user.UserName) // allUsers[i] = allUsers[len(allUsers)-1] // move the last user in the slice to this location // allUsers = allUsers[:l...
[ -0.6338832974433899, -0.11350423097610474, 0.4723874032497406, 0.6896189451217651, -0.06617327779531479, -0.4965473711490631, 0.2822374403476715, 0.7064981460571289, 0.47472676634788513, 0.7930187582969666, 0.37608012557029724, 0.3442506790161133, -0.8566619753837585, -0.000732173793949186...
func FindExistingUser(allUsers []IamUser, userToFind string) int { for i, user := range allUsers { if user.UserName == userToFind { return i } } return -1 }
[ -0.5730444192886353, -0.7398586869239807, 0.3787747025489807, 0.5269300937652588, -0.39489635825157166, 0.7371883988380432, 0.6831104755401611, 0.7203102707862854, -0.1535225808620453, 0.976860761642456, 0.2721925377845764, 0.21384485065937042, -0.5435884594917297, 0.5345748662948608, 0....
func ConvertUsersStringListToStruct(userList string) MapUsers { // add utils.MapUsers to the top so that mapping is easier. userList = "mapUsers: \n" + userList ebUsers := []byte(userList) var mappedUsers MapUsers // convert string representation of mappedUsers to struct so that we can manipulate it errU := ya...
[ -0.7830080389976501, -1.0741212368011475, 0.255441814661026, -0.7055795192718506, -0.9842177033424377, -0.001517432159744203, -0.16887278854846954, 0.41013166308403015, 1.0666605234146118, 0.06771408766508102, -0.28176674246788025, 0.41868963837623596, 0.1416989117860794, 0.150461152195930...
func Execute() { if error := RootCmd.Execute(); error != nil { log.Fatal(error) } }
[ 1.1083399057388306, -0.8013325333595276, 0.7555817365646362, 1.3654062747955322, 0.7670993804931641, 0.5327146053314209, -0.5369095802307129, -0.14655132591724396, -0.5202305912971497, -0.4107343554496765, 0.3956215977668762, 0.18026265501976013, -0.026052018627524376, 0.50984787940979, ...
func (c *RedisClient) Handler() *redis.Client { return c.handler }
[ -0.09964900463819504, -0.1315077692270279, -0.03253544867038727, -0.05754491686820984, -0.17767393589019775, 0.7357536554336548, 0.6127997040748596, 0.27475011348724365, 0.4173128008842468, -1.1831015348434448, -0.17171967029571533, 0.6814025640487671, 0.036687128245830536, -0.327544093132...
func (c *RedisClient) Context() context.Context { return c.ctx }
[ 0.21572785079479218, -0.11153874546289444, 0.29438555240631104, -0.6170615553855896, -0.24835191667079926, 0.46913251280784607, -0.056565046310424805, -0.5396988987922668, 0.9793906807899475, -0.5215314030647278, -0.3148552179336548, 1.174633502960205, -0.39312613010406494, -0.265205085277...
func (erd *EpidemiologicResultsDelete) Where(ps ...predicate.EpidemiologicResults) *EpidemiologicResultsDelete { erd.predicates = append(erd.predicates, ps...) return erd }
[ 0.5159040093421936, -0.6163479089736938, 0.35068824887275696, -0.5741676688194275, 0.36850422620773315, 0.5865458846092224, 0.06469858437776566, 0.04413843899965286, -0.24356581270694733, -0.35528185963630676, 0.9532548785209656, 0.6052115559577942, 0.33121609687805176, -0.675209641456604,...
func (erd *EpidemiologicResultsDelete) Exec(ctx context.Context) (int, error) { return erd.sqlExec(ctx) }
[ 0.72722989320755, 0.7266035079956055, 0.4484531879425049, 0.026794102042913437, 0.4325607717037201, 0.08040624856948853, 0.037893570959568024, -0.00987987406551838, 0.21656492352485657, 0.287360280752182, 0.7588127255439758, 0.1552371382713318, 0.2527618408203125, -0.88754802942276, 0.29...
func (erd *EpidemiologicResultsDelete) ExecX(ctx context.Context) int { n, err := erd.Exec(ctx) if err != nil { panic(err) } return n }
[ 0.4513084888458252, 0.7493783235549927, 0.7743450999259949, 0.10970497131347656, -0.0638619139790535, 0.4937698543071747, -0.17696039378643036, 0.16986869275569916, 0.6148825287818909, -0.08494257181882858, 0.21625249087810516, 0.6961057782173157, 0.4286637008190155, -0.42293640971183777, ...
func (erdo *EpidemiologicResultsDeleteOne) Exec(ctx context.Context) error { n, err := erdo.erd.Exec(ctx) switch { case err != nil: return err case n == 0: return &NotFoundError{epidemiologicresults.Label} default: return nil } }
[ 0.7011932134628296, 0.06930428743362427, 0.6107039451599121, 0.2454199641942978, 0.8493664860725403, 0.5201249718666077, -0.0013457982568070292, -0.13880637288093567, 0.29618948698043823, 0.48730194568634033, 0.848146915435791, 0.29078662395477295, 0.004629991948604584, -0.5775159001350403...
func (erdo *EpidemiologicResultsDeleteOne) ExecX(ctx context.Context) { erdo.erd.ExecX(ctx) }
[ 0.6163937449455261, 0.24158179759979248, 0.5103646516799927, 0.1741483211517334, 0.584840714931488, 1.0764422416687012, -0.011406469158828259, 0.22587598860263824, 0.9137362837791443, -0.43904975056648254, 0.4072212278842926, 1.005028486251831, 0.6192445755004883, -0.24104587733745575, 0...
func ParseRules(s string) ([]Rule, error) { var rules []Rule var err error for _, line := range strings.Split(s, "\n") { line = strings.TrimSpace(line) if len(line) == 0 || strings.HasPrefix(line, "#") || strings.HasPrefix(line, "//") { continue } fields := strings.Fields(line) if len(fields) < 2 { e...
[ 0.8093993663787842, -0.38686037063598633, 0.34976786375045776, -0.035740047693252563, -0.10693790018558502, -0.044750262051820755, -0.12549078464508057, 0.7370039820671082, 0.07253894209861755, 0.07313511520624161, 0.341196745634079, 0.023539328947663307, 0.018477143719792366, 0.1624300777...
func PartitionRules(rules []Rule, count int) [][]Rule { count = int(math.Min(float64(len(rules)), float64(count))) partitions := make([][]Rule, count) for i, rule := range rules { p := i % count partitions[p] = append(partitions[p], rule) } return partitions }
[ 0.31273770332336426, 0.6329215168952942, 0.44319167733192444, 0.03711177036166191, 0.3182425796985626, -0.1562664806842804, 0.11081179231405258, 0.5591822862625122, -0.45721444487571716, 1.0621733665466309, 0.7635806202888489, -0.6913526058197021, -0.8212341666221619, -0.42445996403694153,...
func Sedify(rules []Rule, p int, in string) string { return SedifyNull(rules, p, in, "<NULL>") }
[ 0.3561041057109833, -0.23308150470256805, 0.2551555037498474, 0.006208713166415691, 1.0195297002792358, -0.8171067237854004, -1.6607158184051514, 0.617411196231842, 0.24820582568645477, 0.5929735898971558, -0.1884487420320511, 0.14998283982276917, -0.6223890781402588, 0.11096738278865814, ...
func SedifyNull(rules []Rule, p int, in, null string) string { partitions := PartitionRules(rules, p) // 's@http://d-nb.info/gnd/@gnd:@g; s@http://d-nb.info/standards/elementset/gnd#@dnb:@g' var replacements []string for i, p := range partitions { commands := make([]string, len(p)) for j, rule := range p { i...
[ 0.39727234840393066, -0.7082589864730835, 0.7727895975112915, -0.767003059387207, 0.26606494188308716, -0.6363591551780701, -0.7181697487831116, 0.54271000623703, 0.44276630878448486, 0.021076427772641182, 0.2605454921722412, 0.10691062361001968, -0.08937980979681015, 0.39155346155166626, ...
func AllPodsReady(ns string) func() bool { return func() bool { podsCmd := shell.ExecuteInDir(".", "oc", "get", "pod", "-n", ns, "-o", "jsonpath={.items[*].metadata.name}") <-podsCmd.Done() pods := strings.Split(strings.Trim(fmt.Sprintf("%s", podsCmd.Status().Stdout), "[]"), " ") for _, pod := range p...
[ -0.751646101474762, -0.6406300067901611, 1.1054590940475464, -0.19259266555309296, -0.5358600616455078, -0.30216509103775024, -0.9679616689682007, -0.9901601672172546, -0.062201932072639465, 0.4721410572528839, -0.38417184352874756, 0.171420156955719, 0.6727488040924072, 0.4143857955932617...
func NewCheckGatherer(check checker) *Gatherer { return &Gatherer{check: check} }
[ 0.020022021606564522, -0.5338830351829529, 0.20423084497451782, 0.895388662815094, -0.8180731534957886, 0.409274697303772, -0.3476874530315399, -0.09535077959299088, -0.47374922037124634, -0.1556445211172104, -0.03655092045664787, -0.8942327499389648, 0.06236616522073746, 1.988680005073547...
func (cg *Gatherer) Gather() ([]*dto.MetricFamily, error) { logger.V(2).Println("Gather() called directly on a check gatherer, this is a bug!") ctx, cancel := context.WithTimeout(context.Background(), defaultGatherTimeout) defer cancel() return cg.GatherWithState(ctx, registry.GatherState{}) }
[ 0.40233394503593445, 0.4662235975265503, 0.44571641087532043, 0.7739171981811523, 0.5541041493415833, 0.24259112775325775, -0.17659235000610352, -0.16252993047237396, -0.52181476354599, 0.12736091017723083, 0.2666569650173187, 0.675919234752655, 0.41937315464019775, 0.688141405582428, -0...
func (cg *Gatherer) CheckNow(ctx context.Context) types.StatusDescription { point := cg.check.Check(ctx, cg.scheduleUpdate) return point.Annotations.Status }
[ 0.05448351055383682, -0.16822892427444458, 0.414922297000885, 0.5862759351730347, -0.38033485412597656, 0.1889382153749466, -0.8582931756973267, 0.6764906644821167, -0.8298174738883972, 0.9013092517852783, 0.1645190566778183, 0.31999245285987854, 0.07316430658102036, 0.8191843628883362, ...
func NewECDSAKeyGenerator(algorithm crypto.Hash, savePath, filename string) KeyGenerator { kg := &ecdsaKeyGenerator{ algorithm: algorithm, privateKeyPath: filepath.Join(savePath, filename), publicKeyPath: filepath.Join(savePath, filename+pubkeyExtension), } return kg }
[ -0.46005892753601074, -0.2706277370452881, 0.23415066301822662, -0.5829557776451111, -1.1212654113769531, -0.12941302359104156, -0.08621728420257568, 0.5456271767616272, -1.0447980165481567, -0.04908020421862602, -0.32230275869369507, -0.02811608836054802, 0.1641075611114502, 0.60322731733...
func (kg *ecdsaKeyGenerator) DoesKeyExist() bool { if _, err := os.Stat(kg.privateKeyPath); os.IsNotExist(err) { return false } if _, err := os.Stat(kg.privateKeyPath); os.IsNotExist(err) { return false } return true }
[ -1.2522608041763306, -0.451449453830719, 0.4467858672142029, 0.23712314665317535, 1.4297932386398315, 0.25221195816993713, -0.16185365617275238, 0.5001896023750305, -0.486826092004776, 0.3924548923969269, -0.133336141705513, -0.8134068846702576, -0.44943761825561523, 1.0907669067382812, ...
func (kg *ecdsaKeyGenerator) GenerateKey() error { if kg.DoesKeyExist() { return kg.loadKey() } privateKey, err := ecdsa.GenerateKey(elliptic.P256(), reader) if err != nil { return fmt.Errorf("error encountered when generating ECDSA public/private keypair: %+v\n", err) } kg.privateKey = privateKey kg.publi...
[ -1.4099777936935425, 0.7124044895172119, 0.37388697266578674, -0.7539970278739929, 0.9601195454597473, 0.24741637706756592, -0.04365701600909233, 0.12007080018520355, 0.17043912410736084, 0.26180389523506165, -0.19276921451091766, -0.27610519528388977, -0.11266140639781952, 0.6892622113227...
func (kg *ecdsaKeyGenerator) Encode() ([]byte, []byte, error) { encodedPrivKey, err := x509.MarshalECPrivateKey(kg.privateKey) if err != nil { return nil, nil, fmt.Errorf("error marshaling EC private key: %+v", err) } encodedPubKey, err := x509.MarshalPKIXPublicKey(kg.publicKey) if err != nil { return nil, ni...
[ -0.6143531799316406, 0.13185001909732819, 0.6490678191184998, -0.0454125739634037, -0.44512882828712463, 0.32053524255752563, -0.24980592727661133, 0.429017037153244, -0.33485379815101624, 0.4236232042312622, 0.45351850986480713, 0.4885020852088928, -0.08948151022195816, 1.0461417436599731...
func (kg *ecdsaKeyGenerator) Save(privateKeyData []byte, publicKeyData []byte) error { if err := ioutil.WriteFile(kg.privateKeyPath, privateKeyData, 0600); err != nil { return fmt.Errorf("error writing private key to path %s: %+v", kg.privateKeyPath, err) } if err := ioutil.WriteFile(kg.publicKeyPath, publicKeyDa...
[ -0.7349569201469421, -0.3156791925430298, 0.42282113432884216, -0.7394781112670898, 0.5486434102058411, 0.5945084691047668, 0.11176536232233047, 0.19703727960586548, -1.3644582033157349, 0.7186608910560608, -0.9530337452888489, 0.08068512380123138, -0.5126349329948425, 0.5592965483665466, ...
func (kg *ecdsaKeyGenerator) Signature(data []byte) ([]byte, error) { h := kg.algorithm.New() h.Write(data) return kg.privateKey.Sign(reader, h.Sum(nil), kg.algorithm) }
[ -1.0021898746490479, -0.043054480105638504, 0.17838211357593536, -0.5632774829864502, -0.5956181883811951, -0.308479905128479, 0.12305139750242233, 0.6062604784965515, 0.07963922619819641, 0.19753552973270416, -1.157027244567871, -1.0751415491104126, -0.7579461932182312, 0.3007044792175293...
func (c *Command) HTTPClient() (*api.Client, error) { if !c.hasClientHTTP() && !c.hasServerHTTP() { panic("no http flags defined") } if !c.flagSet.Parsed() { panic("flags have not been parsed") } config := api.DefaultConfig() c.httpAddr.Merge(&config.Address) c.token.Merge(&config.Token) c.caFile.Merge(&co...
[ 0.3108022212982178, -0.4798133075237274, 0.6294753551483154, -0.5389929413795471, 0.05956578999757767, 0.5085098743438721, 0.11327895522117615, -0.08693184703588486, -0.5848377346992493, -0.33034318685531616, -0.26541203260421753, 0.6841621994972229, -1.1790478229522705, -0.187076181173324...
func (c *Command) httpFlagsClient(f *flag.FlagSet) *flag.FlagSet { if f == nil { f = flag.NewFlagSet("", flag.ContinueOnError) } f.Var(&c.caFile, "ca-file", "Path to a CA file to use for TLS when communicating with Consul. This "+ "can also be specified via the CONSUL_CACERT environment variable.") f.Var(&c...
[ 0.75407874584198, -0.17883694171905518, 0.7811211347579956, -0.2818053066730499, 0.10426503419876099, 0.06344537436962128, 0.009006299078464508, -1.025864601135254, -0.9255095720291138, -0.16787633299827576, -0.6705573797225952, 0.9600082635879517, -0.4948772192001343, -0.02054090425372123...
func (c *Command) httpFlagsServer(f *flag.FlagSet) *flag.FlagSet { if f == nil { f = flag.NewFlagSet("", flag.ContinueOnError) } f.Var(&c.datacenter, "datacenter", "Name of the datacenter to query. If unspecified, this will default to "+ "the datacenter of the queried agent.") f.Var(&c.stale, "stale", "Pe...
[ -0.48164403438568115, -0.2859521806240082, 0.43852388858795166, -0.3911859095096588, 0.6871823668479919, 0.3667318522930145, 0.2763603925704956, -0.5442382097244263, -0.03345736488699913, -0.6450034976005554, -0.5049263834953308, 0.7603275179862976, -1.2411895990371704, 0.5601018667221069,...
func (c *Command) NewFlagSet(command cli.Command) *flag.FlagSet { f := flag.NewFlagSet("", flag.ContinueOnError) f.Usage = func() { c.UI.Error(command.Help()) } if c.hasClientHTTP() { c.httpFlagsClient(f) } if c.hasServerHTTP() { c.httpFlagsServer(f) } errR, errW := io.Pipe() errScanner := bufio.NewScann...
[ 0.2567606270313263, -0.09367841482162476, 0.5398464202880859, -0.050400156527757645, -0.7066718339920044, -0.364929735660553, 0.18355914950370789, -1.0611679553985596, -0.26022034883499146, -0.8260682821273804, 0.4407830536365509, 1.1793620586395264, -0.3844658136367798, 0.95094895362854, ...
func (c *Command) HideFlags(flags ...string) { for _, f := range flags { c.hidden.String(f, "", "") } }
[ 1.123397946357727, 1.314315915107727, 0.3784862458705902, 0.16892938315868378, 1.4149607419967651, 1.1301991939544678, 0.15264205634593964, 0.12279687821865082, -1.1140632629394531, -0.7615563273429871, -0.7931687831878662, 0.3854983150959015, -1.7002017498016357, 1.078477144241333, -0.0...
func (c *Command) Parse(args []string) error { return c.flagSet.Parse(args) }
[ 0.1355239301919937, 0.6502382755279541, 0.1334453672170639, 0.24117328226566315, 1.0919772386550903, 0.29249605536460876, -0.41476961970329285, -0.6527820229530334, -1.0517545938491821, -0.6666691303253174, 0.3598257303237915, 0.32269397377967834, -1.421950340270996, 1.1457855701446533, ...
func (c *Command) Help() string { // Some commands with subcommands (kv/snapshot) call this without initializing // any flags first, so exit early to avoid a panic if c.flagSet == nil { return "" } return c.helpFlagsFor(c.flagSet) }
[ 1.2134391069412231, 0.17192617058753967, 0.5413925051689148, 0.38355594873428345, -0.04465506225824356, 1.0705702304840088, 0.008689253591001034, -0.7465873956680298, -0.3896735608577728, -0.44857585430145264, 0.004415595438331366, 0.4917321503162384, -0.1662205159664154, 0.443715751171112...
func (c *Command) hasClientHTTP() bool { return c.Flags&FlagSetClientHTTP != 0 }
[ 1.211198329925537, -0.2401442527770996, 0.2238355576992035, -0.05584004893898964, 0.0889681950211525, 0.9669860005378723, 0.12836557626724243, -0.2821071147918701, -0.4241856336593628, -0.3729458153247833, -0.32086002826690674, -0.14483007788658142, -0.19607827067375183, 1.5935149192810059...
func (c *Command) hasServerHTTP() bool { return c.Flags&FlagSetServerHTTP != 0 }
[ 0.5975914001464844, -0.11377033591270447, 0.2923152446746826, 0.663249135017395, 0.047307614237070084, 0.7112158536911011, -0.08444970846176147, 0.16298851370811462, -0.23201239109039307, 0.07048282027244568, -0.8166581988334656, -0.011976942420005798, -0.6360473036766052, 1.99562668800354...
func (c *Command) helpFlagsFor(f *flag.FlagSet) string { httpFlagsClient := c.httpFlagsClient(nil) httpFlagsServer := c.httpFlagsServer(nil) var out bytes.Buffer firstHTTP := true if c.hasClientHTTP() { if firstHTTP { printTitle(&out, "HTTP API Options") firstHTTP = false } httpFlagsClient.VisitAll(f...
[ 0.5171335935592651, 0.18341057002544403, 0.7036770582199097, -0.8923869132995605, 0.32631126046180725, 0.23096314072608948, 0.11051741987466812, -0.9678513407707214, -1.202523112297058, -0.3972597122192383, 1.059632658958435, 0.6979231238365173, -0.2681161165237427, 1.2697327136993408, -...
func printTitle(w io.Writer, s string) { fmt.Fprintf(w, "%s\n\n", s) }
[ 0.8684001564979553, -0.4510829746723175, 0.653878390789032, -0.19225136935710907, -0.6494498252868652, -0.19933944940567017, -1.574859619140625, -0.22561828792095184, -0.2500855028629303, 0.2650890350341797, -0.09605631977319717, 0.32982221245765686, -0.1687784492969513, -0.481689393520355...
func printFlag(w io.Writer, f *flag.Flag) { example, _ := flag.UnquoteUsage(f) if example != "" { fmt.Fprintf(w, " -%s=<%s>\n", f.Name, example) } else { fmt.Fprintf(w, " -%s\n", f.Name) } indented := wrapAtLength(f.Usage, 5) fmt.Fprintf(w, "%s\n\n", indented) }
[ 0.6440765261650085, 0.11513586342334747, 0.6828479170799255, -0.046710748225450516, 0.052318841218948364, 0.4029819071292877, -0.7052240967750549, 0.3809051513671875, -1.274819254875183, -0.16373442113399506, -0.14664512872695923, 1.046067476272583, 0.6500741243362427, 0.4949020445346832, ...
func flagContains(fs *flag.FlagSet, f *flag.Flag) bool { var skip bool fs.VisitAll(func(hf *flag.Flag) { if skip { return } if f.Name == hf.Name { skip = true return } }) return skip }
[ 0.21139757335186005, 0.19255344569683075, 0.4489661455154419, 0.42829862236976624, -0.19665497541427612, 0.4849167764186859, -0.6108294129371643, -0.6500371098518372, -1.629636526107788, 0.07697763293981552, 0.05814800783991814, 0.38159433007240295, -0.00828638207167387, 0.2187040597200393...
func wrapAtLength(s string, pad int) string { wrapped := text.Wrap(s, maxLineLength-pad) lines := strings.Split(wrapped, "\n") for i, line := range lines { lines[i] = strings.Repeat(" ", pad) + line } return strings.Join(lines, "\n") }
[ 0.3097248077392578, -0.5336701273918152, 0.3579764664173126, -0.8612915873527527, -0.9969915151596069, 0.5946082472801208, -1.7406823635101318, -1.0892518758773804, 0.41559725999832153, 0.2651367485523224, 0.4119565188884735, 0.8282032608985901, 0.9669191241264343, -0.6162481904029846, -...
func NewCmdLine() CmdLiner { return &CmdLine{reader: bufio.NewReader(os.Stdin)} }
[ 0.45533496141433716, -1.5050348043441772, 0.1765979528427124, -0.06454681605100632, -0.7246189713478088, 0.8037210702896118, -1.1923679113388062, -0.5130614042282104, -0.548235297203064, -0.4912512004375458, -0.3252948820590973, 0.060147687792778015, -0.13799609243869781, 0.235841587185859...
func (i *CmdLine) AskProblem(loop int, operator rune, left, right int) int { fmt.Printf("\n\n%d.) %d %c %d = ", loop, left, operator, right) result := i.ReadInt() return result }
[ -0.2779732644557953, -0.3919984996318817, 0.6017599105834961, 0.3312690258026123, -0.4565041661262512, 0.1964370161294937, 0.4415925145149231, -1.0480633974075317, -1.0768556594848633, 0.19460244476795197, 0.1710265725851059, 0.4826878607273102, -1.0854183435440063, -0.030945656821131706, ...
func (i *CmdLine) PrintFailure() { fmt.Printf("Oh, das war nicht richtig!") }
[ 0.5358594059944153, -0.20380312204360962, 0.2108062505722046, 0.20287592709064484, 1.1482328176498413, 0.6294381618499756, -0.0949678048491478, -0.04363035410642624, -0.8120729327201843, -0.7225205302238464, -0.31250619888305664, 0.8850086331367493, -0.8950843811035156, 0.7550928592681885,...
func (i *CmdLine) PrintDone(count, mistakes int) { fmt.Printf("\n\nFertig, die Zeit ist abgelaufen. ") fmt.Printf("\nBei %d Aufgabe(n) hast du dich insgesamt %d mal verrechnet!\n\n", count, mistakes) }
[ 0.4169512093067169, 0.09697536379098892, 0.678650438785553, 0.6151942610740662, 1.2032577991485596, 1.1778544187545776, -0.2879181504249573, -0.6396331191062927, -1.1055048704147339, -0.29745587706565857, -0.369007408618927, 0.29799383878707886, -0.11112786829471588, 0.9994759559631348, ...
func (i *CmdLine) PrintSuccess() { fmt.Printf("Richtig!") }
[ 0.9422213435173035, -0.2365097552537918, 0.26237672567367554, 0.17603664100170135, 0.5922440886497498, 0.7415433526039124, 0.06479734182357788, 0.5409340262413025, -0.7672136425971985, 0.1559467613697052, -0.5951963663101196, 0.7504013180732727, 0.37324997782707214, 0.1388632357120514, 0...
func (i *CmdLine) PrintStart() { fmt.Printf("Ok, es geht los!") }
[ 1.0039526224136353, -0.5517297983169556, 0.5876684188842773, 0.17083629965782166, 1.0551224946975708, 1.0669975280761719, -0.5636115670204163, 0.03958876430988312, -0.29983678460121155, -0.11793892085552216, -0.06263062357902527, 1.6440281867980957, -0.5010151267051697, 0.03006089851260185...
func (i *CmdLine) ReadInt() int { var result int var err error for { s, _ := i.reader.ReadString('\n') s = strings.TrimSpace(s) result, err = strconv.Atoi(s) if err == nil { break } fmt.Printf("Das kann ich nicht lesen!\nBitte gib eine Zahl ein: ") } return result }
[ 0.13199545443058014, -0.6676850914955139, 0.5505120158195496, -0.779751718044281, -0.037444066256284714, 0.30462491512298584, -0.5657699704170227, -0.7970333099365234, -1.555511713027954, -0.3640369176864624, 0.7251862287521362, 0.10141942650079727, -0.5965875387191772, 0.00483657652512192...
func (i *CmdLine) ReadDuration() time.Duration { fmt.Printf("Wie viele Minuten möchtest du Rechnen? Gib die Anzahl ein: ") min := i.ReadInt() duration := fmt.Sprintf("%dm", min) res, err := time.ParseDuration(duration) if err != nil { panic(err) } return res }
[ 0.23801980912685394, -0.7285487651824951, 0.5884638428688049, 0.09393472969532013, -0.09782934933900833, 0.5615962743759155, -0.0841720849275589, -0.5207312703132629, -0.18173548579216003, 0.026827126741409302, 0.3987008035182953, 0.35399144887924194, -0.5120218992233276, -0.26705190539360...
func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) client, endpoint, err := htransport.NewClient(ctx, opts...) if err != nil { return nil, ...
[ 0.4371468424797058, -0.22790022194385529, 0.4865339696407318, 0.6048596501350403, -0.3383592963218689, 0.21400006115436554, 0.2256626933813095, -0.4650823771953583, -0.2961600422859192, 0.21675682067871094, 0.009934725239872932, 0.08719026297330856, -0.4919142723083496, 0.23538731038570404...
func New(client *http.Client) (*Service, error) { if client == nil { return nil, errors.New("client is nil") } s := &Service{client: client, BasePath: basePath} s.Locations = NewLocationsService(s) return s, nil }
[ 0.15420623123645782, -0.6203776001930237, 0.11483116447925568, -0.08824353665113449, -0.41980135440826416, 0.34132441878318787, 0.5740674138069153, -0.09334520250558853, -0.3230700194835663, -0.6593429446220398, 0.21672946214675903, 0.26550912857055664, 0.1619947999715805, 0.72239273786544...
func (c *LocationsGetLodgingCall) ReadMask(readMask string) *LocationsGetLodgingCall { c.urlParams_.Set("readMask", readMask) return c }
[ -0.3097664415836334, 0.34948575496673584, 0.25085920095443726, 0.32803675532341003, 1.5473576784133911, 0.2068687230348587, 0.6777549386024475, 0.6311614513397217, 0.4167284369468689, -0.7787026166915894, 0.7140825390815735, 0.8910537958145142, 0.6947932243347168, -0.16582630574703217, -...
func (c *LocationsGetLodgingCall) Fields(s ...googleapi.Field) *LocationsGetLodgingCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c }
[ -0.4951379895210266, 0.9322988390922546, 0.30857884883880615, -1.049886703491211, 1.5597275495529175, 0.9906944632530212, -0.093622587621212, 0.09525758028030396, 0.28421318531036377, -0.6646695733070374, 0.20817364752292633, 0.1242479532957077, -0.13622605800628662, 0.33450940251350403, ...
func (c *LocationsGetLodgingCall) IfNoneMatch(entityTag string) *LocationsGetLodgingCall { c.ifNoneMatch_ = entityTag return c }
[ 0.5264703631401062, 0.5696843266487122, 0.14184390008449554, -0.8446465730667114, 0.64496910572052, -0.27897801995277405, 0.33815282583236694, 0.5278895497322083, 0.19693826138973236, -0.24872173368930817, -0.04339414834976196, -0.21500267088413239, -0.11363725364208221, 1.3754901885986328...
func (c *LocationsGetLodgingCall) Context(ctx context.Context) *LocationsGetLodgingCall { c.ctx_ = ctx return c }
[ 0.409221351146698, 0.42690572142601013, 0.29571136832237244, -1.027195930480957, 0.6782628893852234, 1.2483090162277222, 0.21184706687927246, 0.22955995798110962, 1.3452913761138916, -0.8042614459991455, -0.2669292688369751, 0.9506591558456421, 0.8090223670005798, 0.42384642362594604, -0...
func (c *LocationsGetLodgingCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ }
[ 0.06410004198551178, 0.44994139671325684, 0.4649308919906616, -0.21121232211589813, -0.021154960617423058, 0.7224270105361938, 0.3628292977809906, 0.2761995494365692, 0.8606392741203308, -1.069032073020935, 0.4457201659679413, 0.39091047644615173, -0.17250655591487885, -0.20307466387748718...
func (c *LocationsUpdateLodgingCall) UpdateMask(updateMask string) *LocationsUpdateLodgingCall { c.urlParams_.Set("updateMask", updateMask) return c }
[ -0.9540837407112122, 0.16519418358802795, 0.26576724648475647, 0.35142263770103455, 0.6584848165512085, 0.5415772795677185, 0.7645512223243713, 0.6282455921173096, 0.7099761366844177, -0.240219846367836, -0.21174398064613342, 0.7636994123458862, 0.22309353947639465, 0.25731828808784485, ...
func (c *LocationsUpdateLodgingCall) Fields(s ...googleapi.Field) *LocationsUpdateLodgingCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c }
[ -0.8274499177932739, 0.49820461869239807, 0.2945377230644226, -1.0769116878509521, 0.9490593075752258, 1.060062289237976, -0.12282444536685944, 0.30698370933532715, 0.4403207302093506, -0.12130061537027359, -0.20618906617164612, -0.05643415078520775, -0.31658220291137695, 0.335243135690689...
func (c *LocationsUpdateLodgingCall) Context(ctx context.Context) *LocationsUpdateLodgingCall { c.ctx_ = ctx return c }
[ -0.07031906396150589, -0.0018840321572497487, 0.257825642824173, -1.018110752105713, -0.030108794569969177, 1.4477726221084595, 0.1386450082063675, 0.33495229482650757, 1.5696531534194946, -0.26265236735343933, -0.6320658922195435, 0.6276420950889587, 0.605172336101532, 0.214894101023674, ...
func (c *LocationsUpdateLodgingCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ }
[ -0.1604517549276352, 0.08528958261013031, 0.4409051239490509, -0.06952698528766632, -0.4554063379764557, 0.7566208839416504, 0.32611170411109924, 0.3579990565776825, 0.9710490107536316, -0.6507149934768677, 0.28202199935913086, 0.1026696190237999, -0.28287768363952637, -0.2979600429534912,...
func (c *LocationsLodgingGetGoogleUpdatedCall) ReadMask(readMask string) *LocationsLodgingGetGoogleUpdatedCall { c.urlParams_.Set("readMask", readMask) return c }
[ -0.5119718313217163, -0.10668474435806274, 0.32760486006736755, 0.40114814043045044, 1.0766079425811768, 0.4252391457557678, 0.8044689297676086, 0.30810773372650146, 0.25543925166130066, -0.386039674282074, 0.544242799282074, 1.038210153579712, 0.6499757766723633, -0.34651705622673035, -...
func (c *LocationsLodgingGetGoogleUpdatedCall) Fields(s ...googleapi.Field) *LocationsLodgingGetGoogleUpdatedCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c }
[ -0.6132699251174927, 0.42858046293258667, 0.3429061770439148, -0.9304033517837524, 0.9047953486442566, 1.070961594581604, -0.16480429470539093, 0.09435518831014633, 0.3051246702671051, -0.32152485847473145, -0.09456121921539307, 0.27838799357414246, -0.24000456929206848, 0.1344252824783325...
func (c *LocationsLodgingGetGoogleUpdatedCall) IfNoneMatch(entityTag string) *LocationsLodgingGetGoogleUpdatedCall { c.ifNoneMatch_ = entityTag return c }
[ 0.2552569508552551, 0.2736705541610718, 0.17767898738384247, -0.8500940799713135, 0.18187576532363892, 0.018152501434087753, 0.3900648355484009, 0.11679402738809586, 0.132288858294487, 0.34682387113571167, -0.1940067559480667, 0.17176738381385803, -0.2272184193134308, 0.9247969388961792, ...
func (c *LocationsLodgingGetGoogleUpdatedCall) Context(ctx context.Context) *LocationsLodgingGetGoogleUpdatedCall { c.ctx_ = ctx return c }
[ 0.032691195607185364, 0.08439146727323532, 0.30443084239959717, -0.8694747090339661, 0.3121405839920044, 1.381870985031128, 0.21770283579826355, -0.006606107112020254, 1.275136947631836, -0.18683139979839325, -0.5137395858764648, 1.092803716659546, 0.6815232038497925, -0.19782182574272156,...
func (c *LocationsLodgingGetGoogleUpdatedCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ }
[ -0.09369022399187088, -0.05023147538304329, 0.38824257254600525, -0.07802412658929825, -0.3322559595108032, 0.8148670196533203, 0.17856934666633606, 0.12998448312282562, 0.9349424839019775, -0.5692480802536011, 0.3265075087547302, 0.40946441888809204, -0.33060815930366516, -0.4811687171459...
func MockForTest(mocking func(modifyThis *Implementation)) { mocking(&impl) }
[ -1.1200979948043823, 0.18361163139343262, 0.32263773679733276, -1.3276829719543457, -0.0432371161878109, -0.20398364961147308, 0.4357936680316925, -0.5709169507026672, 0.36946216225624084, 0.3323267996311188, -0.24081088602542877, -0.8945519924163818, -0.0005040884134359658, 0.190332427620...
func (l Logging) LogIfErr(err error, str string, itf interface{}) { if err != nil { l.Log(str, itf) } }
[ 0.20769347250461578, -0.002757389796897769, 0.45910051465034485, 0.13254821300506592, -0.896917462348938, -0.22809962928295135, -0.953618586063385, 0.00928403902798891, -0.7832525372505188, -0.32654687762260437, -0.2778085172176361, 0.15759176015853882, -0.000783886993303895, 0.50570875406...
func (l Logging) LogIfErrWarn(err error, str string, itf interface{}) { if err != nil { l.LogFatal(str, itf) } }
[ 0.32766085863113403, 0.22337299585342407, 0.582011342048645, 0.31046250462532043, -0.03888523578643799, -0.7156863808631897, -1.7135019302368164, -0.10255427658557892, -0.25012990832328796, -0.08901537954807281, -0.12501128017902374, 0.46859002113342285, 0.6866742372512817, 0.0651842132210...
func (l Logging) LogIfErrFatal(err error, str string, itf interface{}) { if err != nil { l.LogFatal(str, itf) } }
[ -0.027639243751764297, -0.05623016133904457, 0.5341883301734924, 0.03223775699734688, -0.21276138722896576, -0.11833972483873367, -1.6035265922546387, -0.5363048315048218, -0.39971181750297546, -0.49754267930984497, 0.03984229639172554, 0.538759171962738, 0.33119088411331177, 0.56074160337...
func (c *Client) UpdateWorkflow(ctx context.Context, params *UpdateWorkflowInput, optFns ...func(*Options)) (*UpdateWorkflowOutput, error) { if params == nil { params = &UpdateWorkflowInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateWorkflow", params, optFns, addOperationUpdateWorkflowMiddlewares)...
[ -1.6363507509231567, 0.2800820767879486, 0.5869802236557007, 0.6162260174751282, 0.289237380027771, -1.0353409051895142, 0.7239246964454651, -0.7343401908874512, 0.7509185671806335, 0.02223508246243, -0.6149551272392273, 1.0957043170928955, -1.1887264251708984, -0.6678435802459717, -1.01...
func NewActionInspect(target ID, cost time.Duration) *ActionInspect { return &ActionInspect{ // FIXME: Figure out the actual base costs of inspection. Action: Action{ channel: cost / 4, recovery: cost - cost/4, }, Target: target, } }
[ 0.030388498678803444, -1.2847181558609009, 0.33157044649124146, -0.13469800353050232, -0.22025206685066223, -0.5754779577255249, -0.9507518410682678, 0.04282687231898308, 0.21693699061870575, 0.23163029551506042, -0.1975981891155243, 0.8846288323402405, 0.264225572347641, -1.11492025852203...
func IDGenerator(uid UniqueID) HookOption { return func(args *HookOptions) { args.IDGenerator = uid } }
[ -1.3334072828292847, 0.12863478064537048, 0.3600104749202728, -0.24142706394195557, -0.4966176450252533, 0.384474515914917, 0.7411743402481079, 0.8174200057983398, 0.7211953401565552, -0.6254419088363647, -0.4945012629032135, -0.029092038050293922, -0.4576047956943512, 0.9491085410118103, ...
func Dbpath(dbpath string) HookOption { return func(args *HookOptions) { args.Dbpath = dbpath } }
[ 0.1687082052230835, 0.6843572854995728, 0.31721964478492737, -0.21082600951194763, 1.1807076930999756, 0.4898764491081238, 1.1931973695755005, -0.3308156132698059, 0.7696263790130615, 0.6671184301376343, -0.06627485901117325, 0.053746722638607025, -0.8278931379318237, 0.18576371669769287, ...
func Filemode(filemode os.FileMode) HookOption { return func(args *HookOptions) { args.FileMode = filemode } }
[ 0.40630820393562317, -0.41419628262519836, 0.478726863861084, -0.5071330070495605, 0.7723190188407898, 0.6439788937568665, 0.2382994294166565, 0.8762366771697998, -0.3791426718235016, 0.09743472933769226, 0.16029919683933258, 0.4305947721004486, -0.09752200543880463, 0.40389230847358704, ...
func BoltOptions(opts *bolt.Options) HookOption { return func(args *HookOptions) { args.BoltOptions = opts } }
[ 0.018629951402544975, 0.28585177659988403, 0.3611069619655609, -0.3529883027076721, 0.6531926989555359, -0.23598778247833252, -0.03717099502682686, 0.10320955514907837, 0.3092185854911804, 0.638382077217102, -0.3222494125366211, 0.9356132745742798, -0.12298872321844101, -0.4542687535285949...
func NewBoltHook(options ...HookOption) log.Hook { defaultOptions := &HookOptions{ IDGenerator: NewSatoru(), Dbpath: "log.db", FileMode: 0600, BoltOptions: nil, } for _, option := range options { option(defaultOptions) } boltDb, err := bolt.Open(defaultOptions.Dbpath, defaultOptions.FileMode, ...
[ 0.08172594755887985, 0.03755870461463928, 0.6122085452079773, 0.664043128490448, 0.43186870217323303, 0.5142969489097595, -0.3056735694408417, 0.09871349483728409, -0.6557935476303101, 0.03417125716805458, -0.2856854200363159, 0.27915897965431213, -0.852364718914032, -0.3557545840740204, ...
func GetUserGroupInfo(containerMount, containerUser string, override *Overrides) (*user.ExecUser, error) { var ( passwdDest, groupDest string defaultExecUser *user.ExecUser err error ) if override != nil { // Check for an override /etc/passwd path if override.ContainerEtcPasswdPath...
[ -0.1913742870092392, 0.6771530508995056, 0.6687646508216858, 0.7395520210266113, -0.17669084668159485, -0.5156035423278809, 0.6339627504348755, -0.43029460310935974, -0.9951443076133728, -0.6732218265533447, 0.725028932094574, 0.01786288619041443, -0.4400898814201355, 0.4171343445777893, ...
func GetContainerGroups(groups []string, containerMount string, override *Overrides) ([]uint32, error) { var ( groupDest string err error ) groupPath := etcgroup if override != nil && override.ContainerEtcGroupPath != "" { groupPath = override.ContainerEtcGroupPath } if groupDest, err = securejoin.S...
[ -0.959107518196106, 0.36579546332359314, 0.7023535370826721, 0.24554219841957092, -0.23683662712574005, -0.19392478466033936, -0.05174748972058296, -0.586169958114624, -0.19465140998363495, -0.3220946192741394, 0.14923866093158722, 0.21903517842292786, -1.2310194969177246, 0.77810275554656...
func GetUser(containerMount, userIDorName string) (*user.User, error) { var inputIsName bool uid, err := strconv.Atoi(userIDorName) if err != nil { inputIsName = true } passwdDest, err := securejoin.SecureJoin(containerMount, etcpasswd) if err != nil { return nil, err } users, err := user.ParsePasswdFileFil...
[ 0.20586267113685608, -0.34763213992118835, 0.7377595901489258, 0.9304944276809692, -0.08022864907979965, -0.07094570994377136, 0.282960444688797, -0.7538759708404541, 0.33943456411361694, -0.23830823600292206, 0.3960610330104828, 0.22704851627349854, -0.37255096435546875, 0.557253539562225...
func GetGroup(containerMount, groupIDorName string) (*user.Group, error) { var inputIsName bool gid, err := strconv.Atoi(groupIDorName) if err != nil { inputIsName = true } groupDest, err := securejoin.SecureJoin(containerMount, etcgroup) if err != nil { return nil, err } groups, err := user.ParseGroupFil...
[ 0.20638591051101685, 0.5798747539520264, 0.5970234274864197, 0.9543617963790894, -0.15834343433380127, -0.4872852563858032, 0.4340879023075104, -1.1001821756362915, -0.13128042221069336, -0.03295321390032768, 0.8115178942680359, 0.4371035099029541, -0.5476788878440857, 0.6453379988670349, ...
func NewTest(t testutil.T, input string) (*Test, error) { test := &Test{ T: t, cmds: []testCommand{}, m3comparator: newM3ComparatorClient("localhost", 9001), } err := test.parse(input) if err != nil { return test, err } err = test.clear() return test, err }
[ 0.9408431649208069, 0.35401076078414917, 0.36831381916999817, -0.10681116580963135, -0.5585877299308777, 0.11016478389501572, -0.5469586253166199, -0.678587019443512, 0.034902237355709076, -0.21883808076381683, 0.1173434630036354, 0.6590775847434998, -0.8503987193107605, -0.981290400028228...
func getLines(input string) []string { lines := strings.Split(input, "\n") for i, l := range lines { l = strings.TrimSpace(l) if strings.HasPrefix(l, "#") { l = "" } lines[i] = l } return lines }
[ 0.7451624870300293, 0.09268654137849808, 0.6687573790550232, 0.24084004759788513, 0.41679874062538147, 0.39067795872688293, -0.9037109017372131, -0.279094398021698, 0.6101623773574829, -0.11761979758739471, -0.07028768211603165, 0.6920653581619263, -0.3987763524055481, 0.4919658899307251, ...
func (t *Test) parse(input string) error { lines := getLines(input) var err error // Scan for steps line by line. for i := 0; i < len(lines); i++ { l := lines[i] if len(l) == 0 { continue } var cmd testCommand switch c := strings.ToLower(patSpace.Split(l, 2)[0]); { case c == "clear": cmd = &clear...
[ 0.4788230359554291, 0.16820108890533447, 0.6000354886054993, 0.017940491437911987, -0.37056201696395874, 0.1402718722820282, 0.35203126072883606, -0.6364420056343079, 0.04414082318544388, -1.0592800378799438, 0.7331769466400146, -0.20981119573116302, -0.3830614984035492, 0.9087317585945129...
func (cmd *loadCmd) set(m labels.Labels, vals ...parser.SequenceValue) { h := m.Hash() samples := make([]promql.Point, 0, len(vals)) ts := testStartTime for _, v := range vals { if !v.Omitted { samples = append(samples, promql.Point{ T: ts.UnixNano() / int64(time.Millisecond/time.Nanosecond), V: v.Val...
[ 0.2032472938299179, -0.029744291678071022, 0.40939953923225403, -0.4213723838329315, 0.49914756417274475, 0.6923665404319763, -0.21121054887771606, -0.08343363553285599, -0.9892051815986633, -0.4058873951435089, 0.33914169669151306, 0.3292721211910248, -0.025859149172902107, 0.877408385276...
func (cmd *loadCmd) append() error { series := make([]cparser.Series, 0, len(cmd.defs)) for h, smpls := range cmd.defs { m := cmd.metrics[h] start := time.Unix(0, startingTime) ser := cparser.Series{ Tags: make(cparser.Tags, 0, len(m)), Start: start, Datapoints: make(cparser.Datapoints, 0,...
[ 0.1520773023366928, 0.15825913846492767, 0.708350419998169, -0.9570302963256836, -0.4515416622161865, 0.527721107006073, -0.5504359602928162, -0.23853832483291626, -0.6915419697761536, -0.06972528994083405, 0.05022585764527321, 1.0081111192703247, 0.10728725790977478, 0.77061527967453, -...