text
stringlengths
11
6.3k
embedding
listlengths
768
768
func (q queryPQ) Swap(i, j int) { q[i], q[j] = q[j], q[i] }
[ -1.6158415079116821, -0.33131057024002075, 0.20870079100131989, -0.6697060465812683, -0.09630981087684631, 1.2891452312469482, -0.5809280872344971, -0.014682031236588955, -0.7578097581863403, -0.346924751996994, -0.3465976119041443, 0.14824999868869781, -0.4553462266921997, -0.610212683677...
func (q *queryPQ) Push(x any) { item := x.(*queryQueueEntry) *q = append(*q, item) }
[ -0.13325302302837372, 0.049369074404239655, 0.08576025813817978, -0.28774020075798035, -0.19351951777935028, 1.2633684873580933, -1.5194352865219116, -0.9920350313186646, 0.3481498062610626, 0.13715465366840363, -0.9670737385749817, 0.6221408247947693, 0.005940907634794712, 0.5120719671249...
func (q *queryPQ) Pop() any { item := (*q)[len(*q)-1] *q = (*q)[:len(*q)-1] return item }
[ -0.6789720058441162, -0.06966838985681534, 0.5755482912063599, -0.1689750999212265, -0.26570653915405273, 0.7760851979255676, -0.8855459690093994, -0.44103363156318665, -0.40705788135528564, 0.526922881603241, 0.3532223403453827, -0.6405739188194275, -1.1277252435684204, -0.548463881015777...
func NewWithClientCredentials(target string, zoneID string, clientID string, clientSecret string, tokenFormat TokenFormat, skipSSLValidation bool) (*API, error) { a := New(target, zoneID).WithClientCredentials(clientID, clientSecret, tokenFormat).WithSkipSSLValidation(skipSSLValidation) err := a.Validate() if err !=...
[ 0.43187612295150757, -1.3317292928695679, 0.1265811026096344, 0.1531282663345337, -0.5896239280700684, -0.08675605058670044, -0.579289436340332, -0.8474506735801697, 0.1405479907989502, 0.07157398015260696, -0.08076301217079163, 0.24872876703739166, -0.5531773567199707, 0.3685864508152008,...
func NewWithPasswordCredentials(target string, zoneID string, clientID string, clientSecret string, username string, password string, tokenFormat TokenFormat, skipSSLValidation bool) (*API, error) { a := New(target, zoneID).WithPasswordCredentials(clientID, clientSecret, username, password, tokenFormat).WithSkipSSLVal...
[ 0.13806463778018951, -1.2072277069091797, 0.27427253127098083, 0.11124037206172943, -0.7119032144546509, -0.17679357528686523, -0.2459965944290161, -0.8565285205841064, 0.35846567153930664, 0.3547692596912384, 0.11736903339624405, 0.17883053421974182, -0.9254458546638489, 0.522756397724151...
func NewWithToken(target string, zoneID string, token oauth2.Token) (*API, error) { a := New(target, zoneID).WithToken(token) err := a.Validate() if err != nil { return nil, err } return a, err }
[ -0.6024178862571716, -1.185880422592163, 0.26150286197662354, 0.1463022232055664, -0.46315330266952515, -0.8245421648025513, -0.5038576722145081, -0.08066703379154205, 0.06872081011533737, -0.43128636479377747, -0.6980369687080383, 1.1329561471939087, 0.043085839599370956, -0.4103998839855...
func NewWithAuthorizationCode(target string, zoneID string, clientID string, clientSecret string, authorizationCode string, tokenFormat TokenFormat, skipSSLValidation bool) (*API, error) { a := New(target, zoneID).WithSkipSSLValidation(skipSSLValidation).WithAuthorizationCode(clientID, clientSecret, authorizationCode,...
[ 0.1472163200378418, -0.5234459638595581, 0.2473205029964447, 0.6066586971282959, -0.693407416343689, -0.28671184182167053, 0.13520149886608124, -0.6331148147583008, 0.4071352779865265, 0.7392834424972534, 0.38098010420799255, 0.9632683396339417, 0.4719938635826111, 0.278300940990448, 0.6...
func NewWithRefreshToken(target string, zoneID string, clientID string, clientSecret string, refreshToken string, tokenFormat TokenFormat, skipSSLValidation bool) (*API, error) { a := New(target, zoneID).WithSkipSSLValidation(skipSSLValidation).WithRefreshToken(clientID, clientSecret, refreshToken, tokenFormat) err :...
[ -0.2062481939792633, -0.9069082736968994, 0.31428709626197815, 0.9031231999397278, -0.48211145401000977, -0.34887319803237915, -0.22273936867713928, -1.0034137964248657, 0.13743190467357635, -0.43220409750938416, -0.6955345869064331, 0.7120594382286072, 0.6809256076812744, 0.39499333500862...
func (this *Context) MemoryUsage() string { // {{{ ms := &runtime.MemStats{} runtime.ReadMemStats(ms) return this.MemoryFormat(ms.Alloc) }
[ 0.41894781589508057, -0.8663029670715332, 0.35493573546409607, -0.875328779220581, -0.14675083756446838, -0.7691376805305481, -0.34217843413352966, -0.983223021030426, 0.9878855347633362, 0.3597293794155121, 1.2041391134262085, 0.4075537919998169, -0.18558846414089203, 0.6663914918899536, ...
func NewDataOptsHandler(w io.Writer) *DataOptsHandler { return &DataOptsHandler{Enc: json.NewEncoder(w)} }
[ -0.3828195333480835, -1.0834712982177734, 0.118903249502182, -0.8934767842292786, -0.6068747639656067, 0.03378977254033089, -0.5743024945259094, -0.7511464953422546, 0.25764405727386475, -0.21033309400081635, -0.4636796712875366, -0.2627298831939697, 0.2625974416732788, -0.1889152824878692...
func (d *DataOptsHandler) String() string { return "Data Operations Storage Handler" }
[ 0.19967202842235565, -0.19676145911216736, 0.20679089426994324, -0.4886748790740967, -0.40049153566360474, 1.4189318418502808, 0.6397943496704102, -0.683107852935791, -0.5990372896194458, 0.018004214391112328, 0.03320791944861412, -0.22826477885246277, 0.840147852897644, -0.517016291618347...
func (d *DataOptsHandler) Insert(data *DataOptsParams) error { return d.Enc.Encode(data) }
[ -0.37055909633636475, 0.54731684923172, 0.17862172424793243, -0.7126203179359436, 0.5167213082313538, 0.6449276804924011, -0.1689745932817459, -0.10893221199512482, -0.504546582698822, 0.28852394223213196, -0.7276387810707092, -0.153572216629982, -1.0770245790481567, -0.001614209613762796,...
func (obj *postgresImpl) Create_User(ctx context.Context, user_uuid User_Uuid_Field, user_id User_Id_Field, user_first_name User_FirstName_Field, user_last_name User_LastName_Field) ( user *User, err error) { __now := obj.db.Hooks.Now().UTC() __uuid_val := user_uuid.value() __created_val := __now.UTC() __id_v...
[ -0.4455755949020386, -0.04707299545407295, 0.7816924452781677, 0.09500807523727417, 0.10510849952697754, -0.052250608801841736, 0.025390705093741417, -0.3871275782585144, -1.008986473083496, -0.2994600534439087, -0.3742368817329407, -0.7465929388999939, -0.09596762806177139, -0.12473663687...
func NewBarWriter(w io.Writer, waitTime time.Duration, barLength int, isBytes bool) *BarWriter { return &BarWriter{ waitTime: waitTime, writer: w, stopChan: make(chan struct{}), barLength: barLength, isBytes: isBytes, } }
[ 0.19477684795856476, 0.02760443277657032, 0.23848168551921844, 0.4190969169139862, -0.591231107711792, 0.0453115850687027, -0.10219800472259521, 0.26035332679748535, -1.287979006767273, -0.10677820444107056, -0.34851741790771484, 0.018490668386220932, -0.7515326738357544, 0.407353013753891...
func (manager *BarWriter) Attach(name string, progressor Progressor) { pb := &Bar{ Name: name, Watching: progressor, BarLength: manager.barLength, IsBytes: manager.isBytes, } pb.validate() manager.Lock() defer manager.Unlock() // make sure we are not adding the same bar again for _, bar := rang...
[ 0.2643752098083496, -0.2635842263698578, 0.630375325679779, -0.6152123212814331, -0.3922621011734009, 1.3527389764785767, -0.3829326927661896, -0.5026153922080994, -0.5285193920135498, -0.15241819620132446, 0.12456654012203217, 0.028165962547063828, -1.4278557300567627, 0.9580538868904114,...
func (manager *BarWriter) Detach(name string) { manager.Lock() defer manager.Unlock() var pb *Bar for _, bar := range manager.bars { if bar.Name == name { pb = bar break } } if pb == nil { panic("could not find progressor") } grid := &text.GridWriter{ ColumnPadding: GridPadding, } if pb.hasRend...
[ 0.20564866065979004, 0.5803043246269226, 0.5373238921165466, -0.5960054993629456, -0.40701034665107727, 0.3306029438972473, 0.47985926270484924, -0.1978394240140915, -0.44588494300842285, 0.628247857093811, -0.18561376631259918, -0.6177380084991455, -1.1859519481658936, 0.7579870223999023,...
func (manager *BarWriter) renderAllBars() { manager.Lock() defer manager.Unlock() grid := &text.GridWriter{ ColumnPadding: GridPadding, } for _, bar := range manager.bars { bar.renderToGridRow(grid) } grid.FlushRows(manager.writer) // add padding of one row if we have more than one active bar if len(manage...
[ -0.005122396629303694, 0.4050710201263428, 0.3618360459804535, 0.01771158166229725, 0.21670015156269073, -0.2579098045825958, -0.2637011706829071, -0.10144040733575821, -0.3957092761993408, -0.1079251691699028, 0.6866384148597717, -0.20659761130809784, -1.1315770149230957, 1.39282476902008...
func (manager *BarWriter) Start() { if manager.writer == nil { panic("Cannot use a progress.BarWriter with an unset Writer") } go manager.start() }
[ 0.5903990268707275, -0.027409719303250313, -0.018658285960555077, 0.4412866234779358, 0.5161823034286499, 0.035308171063661575, 0.8674964904785156, 0.2763329744338989, -1.271782398223877, -0.3740086555480957, 0.5695208311080933, 0.10721810162067413, -0.8925375938415527, 0.8442692160606384,...
func (manager *BarWriter) Stop() { manager.stopChan <- struct{}{} }
[ -1.1658391952514648, -0.4122588336467743, 0.07742577791213989, -0.47095435857772827, 0.7746562957763672, 0.46085670590400696, 1.1646000146865845, 0.1241476759314537, -1.7966276407241821, -0.3274415135383606, -0.8379687070846558, -0.06077711656689644, -1.2993038892745972, 0.7629972696304321...
func NewTaskContainerWithSingleTask(taskName string, parameters map[string]string) *pb.TaskContainer { return &pb.TaskContainer{ ParallelTasks: []*pb.Task{ NewTask(taskName, parameters), }, } }
[ 0.5593913793563843, 0.31325364112854004, 0.5219036340713501, 1.4278582334518433, -0.16520357131958008, -0.6920709013938904, 0.4642970860004425, 0.2213038206100464, -0.08813577890396118, -0.22809576988220215, -0.3407304883003235, 0.260549396276474, 0.5861654281616211, 1.5958459377288818, ...
func NewTaskContainer() *pb.TaskContainer { return &pb.TaskContainer{ ParallelTasks: []*pb.Task{}, } }
[ 1.30488121509552, 0.09809931367635727, 0.5263806581497192, 0.8015832304954529, -0.6062157154083252, -0.24118702113628387, 1.0038464069366455, -0.3331567347049713, -0.4199833571910858, -0.574763298034668, -0.8803029656410217, 0.6247758865356445, 0.3293197453022003, 1.0036156177520752, -0....
func AddTask(t *pb.TaskContainer, taskName string, parameters map[string]string) { t.ParallelTasks = append(t.ParallelTasks, NewTask(taskName, parameters)) }
[ 0.16954544186592102, 0.5840444564819336, 0.37904107570648193, 0.9412368535995483, 0.8470751047134399, 0.4152821898460388, -0.34063348174095154, 0.8585540056228638, -0.7107117176055908, -0.09411117434501648, -0.3116949200630188, 0.435570627450943, -0.21633227169513702, 0.29906952381134033, ...
func main() { // Get a greeting message and print it. //Access the Hello function in the greetings package message := greetings.Hello("Gladys") fmt.Println(message) }
[ 0.6151077151298523, 0.37325096130371094, 0.544431209564209, 0.6125311851501465, 0.4650905728340149, 0.18492691218852997, 0.4847944676876068, 0.6418087482452393, -0.8835680484771729, -1.1825352907180786, -0.15477688610553741, 0.9632163047790527, -0.024341097101569176, 0.1963643729686737, ...
func await(ctx context.Context, stdout, stderr io.Writer, client api.Server, jobID job.ID, apply bool, verbosity int, timeout time.Duration) error { result, err := awaitJob(ctx, client, jobID, timeout) if err != nil { if err == ErrTimeout { fmt.Fprintln(stderr, ` We timed out waiting for the result of the operat...
[ 0.7608095407485962, 0.48895034193992615, 0.9687048196792603, 0.3759900629520416, -0.04352237284183502, -0.6517577171325684, -0.7087002396583557, 0.06118040531873703, -0.5092002749443054, 0.26074445247650146, 0.2368190437555313, 0.856075644493103, 0.03145366534590721, 0.10761053115129471, ...
func awaitJob(ctx context.Context, client api.Server, jobID job.ID, timeout time.Duration) (job.Result, error) { var result job.Result err := backoff(100*time.Millisecond, 2, 50, timeout, func() (bool, error) { j, err := client.JobStatus(ctx, jobID) if err != nil { return false, err } switch j.StatusString...
[ 0.0792548656463623, 0.6152914762496948, 0.57158362865448, 0.11377614736557007, -0.5312025547027588, 0.1507379114627838, -1.0227938890457153, 0.02834116667509079, -0.6484858989715576, 0.4878656268119812, -0.3714141249656677, 0.11941145360469818, -0.49949416518211365, 0.1859048306941986, -...
func awaitSync(ctx context.Context, client api.Server, revision string, timeout time.Duration) error { return backoff(1*time.Second, 2, 10, timeout, func() (bool, error) { refs, err := client.SyncStatus(ctx, revision) return err == nil && len(refs) == 0, err }) }
[ 0.4429827034473419, 0.9581088423728943, 0.41915082931518555, -0.1831464171409607, -0.46523353457450867, -0.3603143095970154, -0.4764626622200012, -0.203695610165596, -0.8023069500923157, 0.7387929558753967, -0.26382914185523987, 0.7954754829406738, -0.17675942182540894, 0.08861909061670303...
func backoff(initialDelay, factor, maxFactor, timeout time.Duration, f func() (bool, error)) error { maxDelay := initialDelay * maxFactor finish := time.Now().Add(timeout) for delay := initialDelay; time.Now().Before(finish); delay = min(delay*factor, maxDelay) { ok, err := f() if ok || err != nil { return er...
[ 0.4774680435657501, 0.5404189229011536, 0.641473650932312, -0.10191124677658081, -0.5856733918190002, 0.3428083062171936, -0.3013336658477783, 0.5753821730613708, -1.318611741065979, 0.39791420102119446, 0.5143029093742371, -0.1891634464263916, 0.3346904516220093, -0.6934312582015991, 0....
func New(path string) (Plugin, error) { plugin, err := plugin.Open(path) if err != nil { return nil, err } p, err := plugin.Lookup("Plugin") if err != nil { return nil, err } return p.(Plugin), nil }
[ -0.11389702558517456, -1.75482976436615, 0.4352928400039673, -0.01839352771639824, -0.41619154810905457, -0.44018253684043884, 0.1561306118965149, -0.24289409816265106, 0.21200352907180786, -0.2349197417497635, -0.3887750804424286, 0.5149322152137756, 0.36201897263526917, -0.30365943908691...
func NewTranslate(translate Translate) (Quran, error) { switch translate { case TranslateFaFooladvand: return NewQuranByXml(dataset.TranslateFaFooladvand()) } return Quran{}, errors.New("translate is not valid") }
[ -0.20818902552127838, -0.35258108377456665, 0.2887539565563202, 0.4535101354122162, -0.9943398833274841, -0.6622791290283203, -1.1333186626434326, -1.1414496898651123, -0.3197147250175476, -0.6365680694580078, 0.17805874347686768, -0.26553207635879517, -0.43626996874809265, -0.325562089681...
func (m Match) IsValid() *ValidationError { ecase := func(f, msg string) ErrorCase { return ErrorCase{f, msg} } errs := &ValidationError{} validKind := m.Kind == CookieMatchKind || m.Kind == HeaderMatchKind || m.Kind == QueryMatchKind if !validKind { errs.AddNew(ecase( "kind", fmt.Sprintf("%q is n...
[ -0.3516054153442383, -0.4575161337852478, 0.7465925812721252, 0.7532902359962463, -0.06401649117469788, 0.11003067344427109, 0.5528097748756409, -0.32120904326438904, -0.032821934670209885, -0.2304701805114746, 0.5566278100013733, 0.6850109100341797, -0.4382426142692566, 0.2194678336381912...
func (m *Match) UnmarshalJSON(bytes []byte) error { if m == nil { return fmt.Errorf("cannot unmarshal into nil Match") } if err := json.Unmarshal(bytes, (*privateMatch)(m)); err != nil { return err } if m.Behavior == "" { m.Behavior = ExactMatchBehavior } return nil }
[ -0.5493972897529602, 0.45180049538612366, 0.6550055742263794, -0.8596935868263245, -0.45185038447380066, -0.06598112732172012, 0.7104480862617493, 0.0070717656053602695, 0.6791635751724243, 0.5046992301940918, -0.4646877348423004, 0.1779903769493103, -0.8720142245292664, -0.053012602031230...
func (m Matches) IsValid() *ValidationError { errs := &ValidationError{} seenMatch := map[string]bool{} for _, e := range m { if seenMatch[e.Key()] { errs.AddNew(ErrorCase{"", "duplicate match found " + e.Key()}) } errs.MergePrefixed(e.IsValid(), fmt.Sprintf("matches[%v]", e.Key())) seenMatch[e.Key()] = ...
[ -0.196681946516037, -0.22700119018554688, 0.7785468101501465, -0.064916230738163, 0.4593998193740845, 0.22253945469856262, 0.29842761158943176, 0.36231303215026855, 0.5195413827896118, 0.536823034286499, 0.05350614711642265, -0.15855656564235687, 0.09206297248601913, 0.5753032565116882, ...
func (m Match) Equals(o Match) bool { return m.Kind == o.Kind && m.Behavior == o.Behavior && m.From.Equals(o.From) && m.To.Equals(o.To) }
[ -0.7108117341995239, -0.7993550896644592, 0.7633445858955383, 0.2358594536781311, -0.24684010446071625, 0.11096327751874924, -0.5092613101005554, -0.32078051567077637, -0.1535699963569641, -0.010386733338236809, -0.9925270676612854, 0.71776282787323, -0.22563302516937256, -1.01881623268127...
func (m Matches) Equals(o Matches) bool { if len(m) != len(o) { return false } hasMatch := make(map[Match]bool) for _, e := range m { hasMatch[e] = true } for _, e := range o { if !hasMatch[e] { return false } } return true }
[ -0.7976237535476685, -0.6721512079238892, 0.7181178331375122, -0.11438771337270737, 0.10296332836151123, 0.19828692078590393, -0.1803959608078003, 0.05301284044981003, -0.5774309635162354, 0.28157559037208557, -1.2155855894088745, -0.2202025055885315, -0.1366361379623413, 0.091671392321586...
func ParseRangeBoundaries(s string) (int, int, error) { ms := RangeMatchPattern.FindStringSubmatch(s) if len(ms) != 3 { return 0, 0, fmt.Errorf( `Invalid range pattern: %q. Must be of the form "[<start>,<end>)"`, s, ) } start, err := strconv.Atoi(ms[1]) if err != nil { return 0, 0, err } end,...
[ -0.8274768590927124, -0.8619292974472046, 0.6947667002677917, -0.09393927454948425, -0.4664244055747986, -0.1258324235677719, 0.26836177706718445, 0.02360466681420803, -0.6446863412857056, 0.20219042897224426, -1.2171357870101929, -0.017713656648993492, -0.8859400749206543, 0.1350561231374...
func (*Request) Descriptor() ([]byte, []int) { return file_auth_svr_proto_rawDescGZIP(), []int{0} }
[ -1.5580997467041016, 0.9689319133758545, 0.5921895503997803, 0.6075329184532166, 0.18683704733848572, -0.2635159492492676, -0.13436535000801086, 0.23732434213161469, 0.22438602149486542, -0.8862757086753845, 0.16741099953651428, 0.42799878120422363, 0.11731978505849838, 0.29106584191322327...
func (*LoginResponse) Descriptor() ([]byte, []int) { return file_auth_svr_proto_rawDescGZIP(), []int{1} }
[ -0.46192434430122375, -0.06912536919116974, 0.006562226451933384, -0.1913507580757141, -0.2024928629398346, -0.8603225350379944, 0.17880778014659882, 0.1514812856912613, 0.42035308480262756, 0.1717517375946045, -0.6468921303749084, -0.16736049950122833, -1.3453553915023804, -0.601267755031...
func (*UserInfo) Descriptor() ([]byte, []int) { return file_auth_svr_proto_rawDescGZIP(), []int{2} }
[ -0.21603257954120636, 0.4397561550140381, 0.3834173083305359, 0.6291263699531555, -0.462777316570282, -0.11822179704904556, 0.5356040000915527, 0.4333410859107971, -0.9232587814331055, -0.08354555070400238, -0.8453971743583679, 0.2741064429283142, -0.08584485203027725, 0.2739540934562683, ...
func (*InfoResponse) Descriptor() ([]byte, []int) { return file_auth_svr_proto_rawDescGZIP(), []int{3} }
[ -0.11182145774364471, 0.024447297677397728, 0.19900552928447723, 0.19984066486358643, 0.14283782243728638, -0.6172115802764893, 0.303392618894577, 0.22721074521541595, 0.2677173912525177, 0.022366885095834732, -0.7859088778495789, -0.20354047417640686, -0.769932746887207, -0.25960695743560...
func (*InfoRequest) Descriptor() ([]byte, []int) { return file_auth_svr_proto_rawDescGZIP(), []int{4} }
[ -0.7816417813301086, 0.32268446683883667, 0.5538433194160461, 0.4356699287891388, -0.029220253229141235, 0.08757691830396652, -0.21547511219978333, 0.35957831144332886, 0.023815300315618515, -0.004450373351573944, 0.09811902791261673, 0.5715000033378601, -0.058122336864471436, 0.4205970168...
func (*RegisterResponse) Descriptor() ([]byte, []int) { return file_auth_svr_proto_rawDescGZIP(), []int{5} }
[ -0.3550238013267517, 0.9406837224960327, 0.3074852228164673, 0.5238704681396484, 0.8464674949645996, -1.0394327640533447, 0.7159132361412048, 0.25967490673065186, -0.006698533892631531, -0.14749333262443542, -0.4656752347946167, -0.16978493332862854, -0.8871647119522095, 0.0760705694556236...
func NewMessages() *Messages { return &Messages{} }
[ -0.0004387112276162952, -0.5332497954368591, -0.03053467720746994, -0.08995801210403442, -0.2694144546985626, -0.7126635313034058, -0.18030090630054474, -1.8228095769882202, 0.46759411692619324, -0.6393623352050781, 0.17312082648277283, -0.1309802085161209, -1.1333327293395996, 1.104301929...
func (m *Messages) Get(key string) string { result, ok := (*m)[key] if ok == false { result = key } return result }
[ -0.4895254969596863, -0.028754133731126785, 0.10070060193538666, -0.354798287153244, 0.032690104097127914, -0.362234503030777, -0.16244882345199585, -1.3456032276153564, -0.8826166987419128, 0.813999593257904, 0.8583278059959412, 0.3386160135269165, -1.2664397954940796, 0.3194161355495453,...
func (m *Messages) Set(key string, message string) *Messages { (*m)[key] = message return m }
[ -0.5490468144416809, 0.05549149960279465, -0.052683014422655106, -0.6090233325958252, 0.22042441368103027, 0.2642766833305359, -0.3478729724884033, -0.604630708694458, -1.03434419631958, 0.701271653175354, 0.38058701157569885, 0.6284924149513245, -0.9974759817123413, 0.7347766757011414, ...
func (m *Messages) Collection(messagesmap map[string]string) *Collection { return NewCollection(m, messagesmap) }
[ -0.049130573868751526, -1.151755690574646, 0.35274091362953186, 0.032064806669950485, 0.12210167199373245, 0.18396399915218353, -0.010036716237664223, -0.9301410913467407, -0.24987690150737762, -0.24608352780342102, 0.472965806722641, 0.20680125057697296, -0.3501988649368286, 0.65724295377...
func (m *Messages) Load(key string) (string, bool) { value, ok := (*m)[key] if ok == false { value = key } return value, ok }
[ -0.598989725112915, 0.1819593608379364, 0.5236920118331909, -0.9136335253715515, -0.9564647674560547, -0.03368784114718437, -0.11815427243709564, -1.1555449962615967, -0.6903152465820312, 1.2158427238464355, -0.11066243052482605, -0.6109796762466431, -1.5226765871047974, -0.151498571038246...
func CreateBuiltinEval() *functions.BuiltinFunction { return functions.NewBuiltinFunction(Eval, 1, true) }
[ 0.18372488021850586, -0.20868776738643646, 0.27054667472839355, 0.7658727169036865, -0.4502352476119995, -0.048609208315610886, 0.027572475373744965, 0.5047341585159302, -0.8317431807518005, -0.911334753036499, -1.2457740306854248, 0.8939307332038879, -0.4137559235095978, -0.19949020445346...
func (cli *CLI) Command() string { if len(cli.Exec) > 0 { return cli.Exec[0] } return "" }
[ 0.1129998192191124, 0.21855556964874268, 0.7059497237205505, 0.6912941336631775, 0.7447254061698914, 0.7206292748451233, -0.8921882510185242, -0.3825024664402008, 0.6306349635124207, 0.01578865759074688, 1.0437250137329102, 0.42954596877098083, -0.4304475784301758, 0.49149876832962036, 0...
func (cli *CLI) Args() []string { if len(cli.Exec) > 1 { return cli.Exec[1:] } return []string{} }
[ -0.36906948685646057, 0.8724893927574158, 0.4870452582836151, 0.6931785345077515, 1.0934728384017944, 0.2813105583190918, -0.9478147625923157, -0.24925100803375244, -0.2687920331954956, 0.5104669332504272, 0.8638622164726257, 1.1743667125701904, -0.8222951292991638, 0.7367993593215942, 0...
func NewCLI(version string, args []string) (cli *CLI, err error) { cli = &CLI{ Version: version, ConfigFile: os.Getenv("FLOOP_CONFIG"), Meta: make(map[string]interface{}), } if cli.ConfigFile == "" { cli.ConfigFile = "config.yml" } for i := 0; i < len(args); i++ { switch args[i] { case "-exe...
[ -0.10145234316587448, -0.4343981146812439, 0.7822773456573486, 0.6697046160697937, -0.0741710290312767, 0.2896711826324463, -0.2640429735183716, -0.11394479870796204, -1.354293942451477, 0.4300345480442047, -0.45144492387771606, 0.0801118016242981, 0.2980421483516693, 0.014544893056154251,...
func (cli *CLI) Usage() { fmt.Printf(` Usage: floop [-c <config_file>] [key=value ...] -exec <command> [args] floop is a tool to add lifecycle event handlers to any arbitrary process `) }
[ 0.08133390545845032, -0.024148453027009964, 0.7301273941993713, 0.026195023208856583, -0.09022174030542374, 0.35163387656211853, 0.6106852889060974, -0.11057476699352264, -0.6801367998123169, 0.03255034610629082, -0.03643495962023735, 0.41598013043403625, 0.5842361450195312, 0.638523638248...
func (cli *CLI) Run() (int, error) { if cli.isHelp { cli.Usage() return 0, nil } else if cli.isVersion { fmt.Println(cli.Version) return 0, nil } else if cli.debug { log.SetFlags(log.LstdFlags | log.Lshortfile | log.Lmicroseconds) } return cli.run() }
[ -0.5956434011459351, 0.07214087247848511, 0.6650981903076172, 0.4351288378238678, 0.25357502698898315, 0.05269106477499008, 0.2904784083366394, -0.17410771548748016, -0.5014861822128296, -0.3996344208717346, -0.08144032955169678, 0.3500577509403229, -0.5803314447402954, 0.8345210552215576,...
func DrawLineSeries(r Renderer, canvasBox Box, xrange, yrange Range, s Style, vs ValueProvider) { if vs.Len() == 0 { return } ct := canvasBox.Top cb := canvasBox.Bottom cr := canvasBox.Right v0x, v0y := vs.GetValue(0) x0 := cr - xrange.Translate(v0x) y0 := yrange.Translate(v0y) + ct var vx, vy float64 va...
[ -0.25933733582496643, 0.17200908064842224, 0.5796137452125549, -0.8777623176574707, 0.028395352885127068, 0.037901464849710464, -0.4795457422733307, -0.7349928617477417, 0.6679710149765015, -0.5316175818443298, 0.04539302736520767, 0.5761010050773621, 0.7457853555679321, -0.180472791194915...
func DrawAnnotation(r Renderer, canvasBox Box, xrange, yrange Range, s Style, lx, ly int, label string) { r.SetFontSize(s.GetFontSize(DefaultAnnotationFontSize)) textWidth, _ := r.MeasureText(label) textHeight := int(math.Floor(DefaultAnnotationFontSize)) halfTextHeight := textHeight >> 1 pt := s.Padding.GetTop(D...
[ 0.06916173547506332, -0.236040860414505, 0.8591827154159546, -0.7730767130851746, -0.21388652920722961, 0.3528440296649933, -0.18601928651332855, 0.016086488962173462, 0.30810314416885376, -0.20164331793785095, -0.3311022222042084, 0.3868425786495209, 0.325874924659729, -0.0662401691079139...
func (s *Snapshot) As(i interface{}) bool { if s.asFunc == nil { return false } return s.asFunc(i) }
[ -1.3462557792663574, 0.27913177013397217, 0.48287683725357056, -0.5635299682617188, -1.1790498495101929, -0.5027722716331482, 0.04103381186723709, 0.14040732383728027, 0.8237913250923157, -0.24523204565048218, -0.24287985265254974, -0.38387149572372437, 0.9765612483024597, 0.50264424085617...
func newVar(w driver.Watcher) *Variable { ctx, cancel := context.WithCancel(context.Background()) changed := make(chan struct{}) v := &Variable{ dw: w, provider: oc.ProviderName(w), backgroundCancel: cancel, backgroundDone: make(chan struct{}), haveGoodCh: make(chan struct{}),...
[ 0.5897043943405151, 0.016506126150488853, 0.4145321547985077, 0.08892136067152023, -0.5079271197319031, 0.10304669290781021, 0.7777894139289856, -0.9119947552680969, -0.23251429200172424, -0.10080422461032867, 0.7840885519981384, 0.7987219095230103, 0.0397028848528862, 0.473690003156662, ...
func (c *Variable) Watch(ctx context.Context) (Snapshot, error) { // Block until there's a change since the last Watch call, signaled // by lastWatch being closed by the background goroutine. var ctxErr error select { case <-c.lastWatch: case <-ctx.Done(): ctxErr = ctx.Err() } c.mu.Lock() defer c.mu.Unlock()...
[ 0.23815423250198364, -0.254520058631897, 0.5047401785850525, -0.6359552145004272, 0.14282359182834625, -0.656606912612915, 0.012707402929663658, -0.44456520676612854, 0.3758789300918579, -0.6164950132369995, 0.1459580510854721, 0.5771365165710449, -0.11211572587490082, -0.08281102031469345...
func (c *Variable) Latest(ctx context.Context) (Snapshot, error) { haveGood := c.haveGood() if !haveGood { select { case <-c.haveGoodCh: haveGood = true case <-ctx.Done(): // We don't return ctx.Err(). } } c.mu.RLock() defer c.mu.RUnlock() if haveGood && c.lastErr != ErrClosed { return c.lastGood,...
[ -0.15220145881175995, -0.5693607330322266, 0.5264845490455627, -0.6709825992584229, -0.22560468316078186, -0.3549882471561432, -0.6108670830726624, -0.743830144405365, -0.2654052674770355, -0.8090929985046387, 0.38331809639930725, 0.20858405530452728, -0.15028615295886993, 0.02663669921457...
func (c *Variable) CheckHealth() error { haveGood := c.haveGood() c.mu.RLock() defer c.mu.RUnlock() if haveGood && c.lastErr != ErrClosed { return nil } return c.lastErr }
[ 0.48951634764671326, -0.43621042370796204, 0.5392034649848938, 0.0737241730093956, -0.005719784181565046, 0.2019454389810562, -0.08372607082128525, -0.9061575531959534, -0.02950773574411869, -0.4646134078502655, 0.6760280132293701, 0.18166136741638184, -1.9496010541915894, 0.26130703091621...
func (c *Variable) Close() error { // Record that we're closing. Subsequent calls to Watch/Latest will return ErrClosed. c.mu.Lock() if c.lastErr == ErrClosed { c.mu.Unlock() return ErrClosed } c.last = Snapshot{} c.lastErr = ErrClosed // Close any remaining channels to wake up any callers that are waiting ...
[ -0.2846396565437317, -0.10162940621376038, 0.5499659776687622, -0.5061694979667664, 0.3627111613750458, -0.4956006109714508, 0.18172037601470947, -0.7460967302322388, -0.7333911061286926, -0.3716100752353668, 0.49576592445373535, 0.27102726697921753, -0.7360162138938904, 1.0459742546081543...
func (mux *URLMux) VariableSchemes() []string { return mux.schemes.Schemes() }
[ 0.02007105201482773, -0.5517094135284424, 0.2620214819908142, 0.5362027883529663, -0.9999022483825684, 1.0104315280914307, -0.8695043325424194, -0.28344252705574036, 0.6476494073867798, 0.1592704802751541, -0.614427387714386, 0.6294354200363159, -1.0453691482543945, -0.02361649088561535, ...
func (mux *URLMux) ValidVariableScheme(scheme string) bool { return mux.schemes.ValidScheme(scheme) }
[ -0.28012409806251526, -0.3767891228199005, 0.4490470886230469, 0.124727264046669, -1.2268155813217163, 0.35249418020248413, -0.8506729602813721, 0.23978598415851593, 0.677100419998169, 0.1497877985239029, -0.21600906550884247, -0.2275918871164322, -0.7484866976737976, 0.0064680506475269794...
func (mux *URLMux) RegisterVariable(scheme string, opener VariableURLOpener) { mux.schemes.Register("runtimevar", "Variable", scheme, opener) }
[ -0.9075229167938232, 0.07398540526628494, 0.4235054850578308, -0.32165494561195374, -0.15329131484031677, -0.05713760480284691, -0.30782216787338257, 0.42210960388183594, 0.19425493478775024, -0.4637235105037689, -1.1638835668563843, 0.4142087399959564, -0.18055115640163422, 0.612944900989...
func (mux *URLMux) OpenVariable(ctx context.Context, urlstr string) (*Variable, error) { opener, u, err := mux.schemes.FromString("Variable", urlstr) if err != nil { return nil, err } return opener.(VariableURLOpener).OpenVariableURL(ctx, u) }
[ -1.1536198854446411, -0.06804054975509644, 0.3381078243255615, -0.17437517642974854, -1.2195441722869873, -0.23762553930282593, 0.18013566732406616, -0.19382983446121216, 0.43418192863464355, -0.35545745491981506, -0.38333502411842346, 0.14130909740924835, -0.4553154706954956, -0.493379712...
func (mux *URLMux) OpenVariableURL(ctx context.Context, u *url.URL) (*Variable, error) { opener, err := mux.schemes.FromURL("Variable", u) if err != nil { return nil, err } return opener.(VariableURLOpener).OpenVariableURL(ctx, u) }
[ -0.8300628066062927, 0.006445333361625671, 0.2496316283941269, 0.37766551971435547, -1.0551836490631104, 0.14668607711791992, 0.062446482479572296, -0.12233322858810425, 0.64838707447052, 0.020447134971618652, -1.018404245376587, 0.3490268588066101, -0.17819355428218842, -0.316858947277069...
func DefaultURLMux() *URLMux { return defaultURLMux }
[ 0.2776523530483246, -0.4928705394268036, 0.23552480340003967, 0.7538489103317261, -0.46161359548568726, 0.525888204574585, -0.49183815717697144, 0.6240153908729553, 0.42335209250450134, -1.69306218624115, -0.6798986196517944, 0.06440339982509613, -1.054729700088501, 0.2943907380104065, -...
func OpenVariable(ctx context.Context, urlstr string) (*Variable, error) { return defaultURLMux.OpenVariable(ctx, urlstr) }
[ -1.0589476823806763, 0.21530120074748993, 0.28039097785949707, 0.31242406368255615, -0.9789615869522095, -0.5450929403305054, -0.010005196556448936, 0.20409145951271057, 0.1762641966342926, -0.758715033531189, -0.812639594078064, 0.3204863965511322, -0.5523102879524231, -0.2493102103471756...
func NewDecoder(obj interface{}, fn Decode) *Decoder { return &Decoder{ typ: reflect.TypeOf(obj), fn: fn, } }
[ 0.030925976112484932, -0.8115872144699097, 0.27227625250816345, 0.4864809513092041, -1.3277840614318848, -0.4613359868526459, -0.9817642569541931, -0.017835622653365135, 0.21550019085407257, -1.0891119241714478, 0.0012982601765543222, 0.5943288207054138, 0.33062589168548584, 0.645003139972...
func (d *Decoder) Decode(ctx context.Context, b []byte) (interface{}, error) { nv := reflect.New(d.typ).Interface() if err := d.fn(ctx, b, nv); err != nil { return nil, err } ptr := reflect.ValueOf(nv) return ptr.Elem().Interface(), nil }
[ -1.1574443578720093, 0.3744393587112427, 0.5841459035873413, 0.8926144242286682, 0.07916410267353058, -0.5548937320709229, 0.12652595341205597, -0.7014058232307434, 0.7739570736885071, -0.7570406794548035, -0.28866416215896606, 0.5755022764205933, -1.1104214191436768, 0.21689870953559875, ...
func JSONDecode(ctx context.Context, data []byte, obj interface{}) error { return json.Unmarshal(data, obj) }
[ 0.37540286779403687, -0.995799720287323, 0.6309475302696228, -0.4120456278324127, -0.6923366189002991, -0.40941372513771057, -0.7609948515892029, -0.1565348356962204, 0.70585036277771, -0.4930705428123474, -0.5759580731391907, 0.701633632183075, -0.15617620944976807, -0.23841266334056854, ...
func GobDecode(ctx context.Context, data []byte, obj interface{}) error { return gob.NewDecoder(bytes.NewBuffer(data)).Decode(obj) }
[ 0.992128849029541, -0.2513047754764557, 0.6994199156761169, 0.38893285393714905, 0.7563481330871582, 0.5106351375579834, -1.3840711116790771, -0.11456026136875153, 0.07432429492473602, 0.4605683982372284, -0.6872699856758118, 0.47217947244644165, -1.1040469408035278, -0.44782331585884094, ...
func StringDecode(ctx context.Context, b []byte, obj interface{}) error { v := obj.(*string) *v = string(b) return nil }
[ 0.7734981179237366, -1.1719310283660889, 0.23314480483531952, 0.7138463258743286, 0.13614122569561005, -0.027505159378051758, -0.25424307584762573, -0.22696615755558014, 0.7733259797096252, -0.0036659804172813892, -0.8839284181594849, 0.7269905805587769, -0.6847992539405823, -0.39623293280...
func BytesDecode(ctx context.Context, b []byte, obj interface{}) error { v := obj.(*[]byte) *v = b[:] return nil }
[ 0.6586905717849731, -0.408261775970459, 0.3975851535797119, 0.33773273229599, 0.5896092653274536, -0.19600288569927216, -1.1109414100646973, 0.11122524738311768, 1.1010457277297974, -0.29161977767944336, -0.9800512194633484, 1.0102266073226929, -0.46177035570144653, -0.2904340624809265, ...
func DecryptDecode(k *secrets.Keeper, post Decode) Decode { return func(ctx context.Context, b []byte, obj interface{}) error { decrypted, err := k.Decrypt(ctx, b) if err != nil { return err } if post == nil { return BytesDecode(ctx, decrypted, obj) } return post(ctx, decrypted, obj) } }
[ 0.22921596467494965, 0.08800631761550903, 0.6536116600036621, 0.8026868104934692, -0.3252306878566742, -0.4358488917350769, -0.8916904330253601, 0.15394273400306702, 0.3767201602458954, -0.1537240445613861, -0.1513218730688095, -0.23942509293556213, -0.08419982343912125, 0.4280263483524322...
func decryptByName(ctx context.Context, decoderName string) (*secrets.Keeper, string, error) { if !strings.HasPrefix(decoderName, "decrypt") { return nil, decoderName, nil } keeperURL := os.Getenv("RUNTIMEVAR_KEEPER_URL") if keeperURL == "" { return nil, "", errors.New("environment variable RUNTIMEVAR_KEEPER_UR...
[ -0.2837753891944885, -0.020961780101060867, 0.5349776148796082, -0.46873939037323, -1.0869357585906982, -1.2417447566986084, -0.13479338586330414, -0.03506895527243614, -0.23585596680641174, 0.7737860083580017, -1.1897977590560913, -0.08227977901697159, 0.032288115471601486, 0.614602029323...
func (r *NtpReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) { ctx := context.Background() log := r.Log.WithValues("ntp", req.NamespacedName) // your logic here log.Info("reconciling SRLinux NTP") var ntp srlinuxv1alpha1.Ntp if err := r.Get(ctx, req.NamespacedName, &ntp); err != nil { return ctrl....
[ -0.4755341708660126, -0.44462910294532776, 0.7753263115882874, -0.5812525153160095, -0.07904072105884552, 0.02700071595609188, -0.27699750661849976, -0.9226997494697571, -0.5847936272621155, 1.0112836360931396, -0.16031275689601898, -0.24308423697948456, -0.9616413712501526, 0.529912412166...
func Sudoku(line string) (time.Duration, string) { startTime := time.Now() grid := generateGrid() convertToGrid(grid, line) for !solved(grid) { findMissingValuesAtEachCell(grid) cleanUpEachRow(grid) findMissingValuesAtEachCell(grid) cleanUpEachColumn(grid) findMissingValuesAtEachCell(grid) cleanUpGrid(g...
[ 0.08383655548095703, 0.17549030482769012, 0.757039487361908, 0.2903043329715729, -0.1802287995815277, -0.5770923495292664, 0.33337584137916565, 0.39522498846054077, -0.6408565640449524, 0.36726224422454834, -0.028555797412991524, -0.957891047000885, 0.6364985704421997, 1.2158572673797607, ...
func SudokuBackTrack() bool { // displayGridBT() for row := 0; row < 9; row++ { for col := 0; col < 9; col++ { if gridBT[row][col] == "0" { for _, val := range numberStrings { if isValid(val, row, col) { gridBT[row][col] = val // fmt.Println(val, row, col, isValid(val, row, col)) if *d...
[ 0.06855478882789612, 0.4462471902370453, 1.0465121269226074, 0.0008596706902608275, -0.13832107186317444, 0.39982834458351135, 0.23932109773159027, 0.10201814770698547, -0.7780674695968628, 0.12490187585353851, 0.5207275748252869, -0.6771805882453918, -0.9867187142372131, 0.055993143469095...
func newAwsDmsCertificates(c *TrussleV1Client, namespace string) *awsDmsCertificates { return &awsDmsCertificates{ client: c.RESTClient(), ns: namespace, } }
[ 0.6179383993148804, 0.7345923781394958, 0.07639750838279724, -0.5179693102836609, -1.084083914756775, -0.030386535450816154, -0.6383023262023926, -0.4508962631225586, 0.014570469968020916, -0.2510828673839569, -0.730942964553833, 1.0543084144592285, -0.20416942238807678, -0.061649262905120...
func (c *awsDmsCertificates) Get(name string, options meta_v1.GetOptions) (result *v1.AwsDmsCertificate, err error) { result = &v1.AwsDmsCertificate{} err = c.client.Get(). Namespace(c.ns). Resource("awsdmscertificates"). Name(name). VersionedParams(&options, scheme.ParameterCodec). Do(). Into(result) re...
[ -0.0925588309764862, 0.4775526523590088, 0.4433237314224243, -0.9392409324645996, -0.13458888232707977, -0.8468886613845825, -0.8037536144256592, -0.3181067705154419, 0.23956581950187683, 0.13639116287231445, 0.048565641045570374, 1.0270648002624512, -0.06300266832113266, -0.55355590581893...
func (c *awsDmsCertificates) List(opts meta_v1.ListOptions) (result *v1.AwsDmsCertificateList, err error) { result = &v1.AwsDmsCertificateList{} err = c.client.Get(). Namespace(c.ns). Resource("awsdmscertificates"). VersionedParams(&opts, scheme.ParameterCodec). Do(). Into(result) return }
[ -0.027217978611588478, 0.2972247302532196, 0.3600308895111084, -0.3481469750404358, 0.2795483469963074, -0.37979811429977417, -0.6635333299636841, 0.36718425154685974, 0.6229220628738403, 0.1966836005449295, -0.41302821040153503, 0.84785395860672, 0.2402951419353485, -0.19833602011203766, ...
func (c *awsDmsCertificates) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { opts.Watch = true return c.client.Get(). Namespace(c.ns). Resource("awsdmscertificates"). VersionedParams(&opts, scheme.ParameterCodec). Watch() }
[ 0.17485548555850983, 0.1295754760503769, 0.3360910415649414, -0.20474368333816528, 0.07612543553113937, 0.2088542878627777, 0.1294144243001938, 0.09128711372613907, 0.6011642813682556, -0.34071433544158936, -0.3901301622390747, 1.5753353834152222, 0.6640319228172302, -0.28800201416015625, ...
func (c *awsDmsCertificates) Create(awsDmsCertificate *v1.AwsDmsCertificate) (result *v1.AwsDmsCertificate, err error) { result = &v1.AwsDmsCertificate{} err = c.client.Post(). Namespace(c.ns). Resource("awsdmscertificates"). Body(awsDmsCertificate). Do(). Into(result) return }
[ -0.26704585552215576, 0.9109939336776733, 0.28880345821380615, -0.2973940372467041, -0.07320349663496017, 0.12452135235071182, -0.8403925895690918, -0.5936614274978638, 0.23664402961730957, -0.4767148792743683, -0.5264793038368225, 0.217585489153862, -0.4460994601249695, 0.2006467282772064...
func (c *awsDmsCertificates) Update(awsDmsCertificate *v1.AwsDmsCertificate) (result *v1.AwsDmsCertificate, err error) { result = &v1.AwsDmsCertificate{} err = c.client.Put(). Namespace(c.ns). Resource("awsdmscertificates"). Name(awsDmsCertificate.Name). Body(awsDmsCertificate). Do(). Into(result) return...
[ -0.287118136882782, 0.2194555550813675, 0.34831181168556213, -0.9015780687332153, -0.825139582157135, -0.05215531587600708, -0.6277400851249695, -0.17265984416007996, 0.5610615015029907, 0.06627018004655838, -0.4479849934577942, 0.6598605513572693, -0.33995652198791504, -0.5413672924041748...
func (c *awsDmsCertificates) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("awsdmscertificates"). Name(name). Body(options). Do(). Error() }
[ 0.501587450504303, 0.6870476007461548, 0.468005508184433, -0.3649393916130066, -0.061273835599422455, 0.09634225815534592, -0.20581677556037903, -0.37376779317855835, 0.5916170477867126, 0.4310450851917267, -0.20080436766147614, 0.3598558008670807, -0.33079180121421814, -0.3788471519947052...
func (c *awsDmsCertificates) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("awsdmscertificates"). VersionedParams(&listOptions, scheme.ParameterCodec). Body(options). Do(). Error() }
[ -0.3644506633281708, -0.009914903901517391, 0.7231119871139526, 0.12215258181095123, 0.21852371096611023, -0.18701285123825073, 0.19188015162944794, -0.1480959802865982, 0.24393683671951294, -0.28631311655044556, 0.05060233548283577, 0.8905380964279175, 0.39676451683044434, 0.5577582120895...
func (c *awsDmsCertificates) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.AwsDmsCertificate, err error) { result = &v1.AwsDmsCertificate{} err = c.client.Patch(pt). Namespace(c.ns). Resource("awsdmscertificates"). SubResource(subresources...). Name(name). Body(data...
[ 0.03963037207722664, 0.16580207645893097, 0.2901100516319275, -0.6682592034339905, -1.4015928506851196, 0.9294164776802063, -0.8725154995918274, 0.0795239731669426, 0.6874387264251709, -0.35837554931640625, -0.06246691197156906, 1.0044773817062378, -0.25971493124961853, -0.2998142838478088...
func (r *AWSAmazonMQBroker_LogList) AWSCloudFormationType() string { return "AWS::AmazonMQ::Broker.LogList" }
[ 0.7245054841041565, 0.6048206090927124, 0.3293023407459259, 0.3352481722831726, 0.2143476903438568, -0.3728255331516266, -0.5074382424354553, -0.15029074251651764, 0.5446077585220337, 0.33310744166374207, -0.5967835783958435, 0.47029632329940796, -0.19708871841430664, 1.4227783679962158, ...
func MustInProjectRoot() { if err := CheckProjectRoot(); err != nil { log.Fatal(err) } }
[ 0.5034512877464294, -0.29920193552970886, 0.5926755666732788, 0.6861751675605774, 0.41931986808776855, 1.7880080938339233, -0.1822178065776825, -0.544666051864624, -0.5772172212600708, 0.7177724242210388, -0.07246800512075424, 1.1182085275650024, -0.6024799346923828, 1.1469658613204956, ...
func CheckProjectRoot() error { if kbutil.HasProjectFile() { return nil } // todo(camilamacedo86): remove the following check when we no longer support the legacy scaffold layout // If the current directory has a "build/Dockerfile", then it is safe to say // we are at the project root. if _, err := os.Stat(bui...
[ 0.4192260801792145, 0.24370411038398743, 0.8787989020347595, 0.863328754901886, -0.023613056167960167, 0.8537486791610718, 0.658193826675415, 0.02586221508681774, -0.07479295879602432, 0.17038829624652863, 0.6338846683502197, 0.6721108555793762, -0.5922116041183472, 0.9932039976119995, -...
func GetGoPkg() string { // Default to reading from go.mod, as it should usually have the (correct) // package path, and no further processing need be done on it if so. if _, err := os.Stat(goModFile); err != nil && !os.IsNotExist(err) { log.Fatalf("Failed to read go.mod: %v", err) } else if err == nil { b, err...
[ -0.05410602316260338, 0.7273472547531128, 0.6628608703613281, 0.13152192533016205, 0.17005397379398346, 0.14235351979732513, 0.656750500202179, -0.20089422166347504, -0.40724995732307434, 0.44793325662612915, 0.8180592656135559, -0.2576788067817688, -0.3631867468357086, 0.5213602781295776,...
func GetOperatorType() OperatorType { switch { case IsOperatorGo(): return OperatorTypeGo case IsOperatorAnsible(): return OperatorTypeAnsible case IsOperatorHelm(): return OperatorTypeHelm } return OperatorTypeUnknown }
[ -0.4753713309764862, -0.016104184091091156, 0.5481069087982178, 0.9614527225494385, 0.3063090145587921, 0.19565360248088837, 0.3779371380805969, 0.06339675188064575, 0.48758962750434875, -0.14241312444210052, -0.10823466628789902, 0.19677604734897614, -1.0138115882873535, 1.150832056999206...
func MustGetGopath() string { gopath, ok := os.LookupEnv(GoPathEnv) if !ok || len(gopath) == 0 { log.Fatal("GOPATH env not set") } return gopath }
[ -0.16586923599243164, 0.3005388379096985, 0.594014585018158, 0.6303594708442688, 1.0922415256500244, 1.6340619325637817, -0.34583523869514465, -0.28572121262550354, -0.874116063117981, 0.7271171808242798, -0.12616148591041565, 0.2159605473279953, -1.0619429349899292, 0.4641568064689636, ...
func MustSetWdGopath(currentGopath string) string { var ( newGopath string cwdInGopath bool wd = MustGetwd() ) for _, newGopath = range filepath.SplitList(currentGopath) { if strings.HasPrefix(filepath.Dir(wd), newGopath) { cwdInGopath = true break } } if !cwdInGopath { log.Fatalf("Pro...
[ -1.1175609827041626, 0.4231841266155243, 0.7860742211341858, -0.11390789598226547, -0.07489783316850662, 1.6699360609054565, 0.4672193229198456, -0.09393149614334106, -0.3866720497608185, 1.3466219902038574, 0.332179993391037, 0.32538241147994995, -1.111682653427124, 1.3378050327301025, ...
func CheckRepo(repo string) error { inGopathSrc, err := WdInGoPathSrc() if err != nil { return err } if !inGopathSrc && repo == "" { return fmt.Errorf(`flag --repo must be set if the working directory is not in $GOPATH/src. See "operator-sdk new -h"`) } return nil }
[ 0.2673177719116211, 1.162804126739502, 0.553206205368042, 0.5297408103942871, 0.30941441655158997, 0.431860089302063, 0.3122662305831909, 0.4045984148979187, -0.37460193037986755, 0.6082824468612671, -0.1303672045469284, -0.15309324860572815, -0.2658552825450897, 0.9557866454124451, 0.15...
func CheckGoModules() error { goModOn, err := GoModOn() if err != nil { return err } if !goModOn { return fmt.Errorf(`using go modules requires GO111MODULE="on", "auto", or unset.` + ` More info: https://sdk.operatorframework.io/docs/golang/quickstart/#a-note-on-dependency-management`) } return nil }
[ -0.9216088652610779, 0.6051439642906189, 0.39277881383895874, -0.2704547941684723, 1.103547215461731, 0.48064208030700684, -0.4784981906414032, 0.055455755442380905, -0.7174322605133057, 1.5515639781951904, -0.08075252175331116, 0.459428995847702, -1.0948718786239624, 0.9103847146034241, ...
func PrintDeprecationWarning(msg string) { fmt.Printf(noticeColor, "[Deprecation Notice] "+msg+". Refer to the version upgrade guide "+ "for more information: https://sdk.operatorframework.io/docs/migration/version-upgrade-guide/\n\n") }
[ 0.21290653944015503, 0.46086978912353516, 0.6308979988098145, 0.34074002504348755, 0.1913989782333374, -0.07692104578018188, -0.8404603004455566, 0.08392538875341415, -0.3444489538669586, 0.8439327478408813, -0.07465473562479019, 1.0744946002960205, 0.4442254602909088, 0.7005646824836731, ...
func RewriteFileContents(filename, instruction, content string) error { text, err := ioutil.ReadFile(filename) if err != nil { return fmt.Errorf("error in getting contents from the file, %v", err) } existingContent := string(text) modifiedContent, err := appendContent(existingContent, instruction, content) i...
[ -0.24193693697452545, -0.35650721192359924, 0.46466386318206787, 0.4451659619808197, 0.13420666754245758, -0.41536185145378113, 0.32320722937583923, 0.830424427986145, -0.9012696146965027, 0.4022001624107361, 0.842457115650177, -0.2443937212228775, -0.6638479232788086, -0.29248830676078796...
func (o RecordAliasOutput) EvaluateTargetHealth() pulumi.BoolOutput { return o.ApplyT(func(v RecordAlias) bool { return v.EvaluateTargetHealth }).(pulumi.BoolOutput) }
[ 0.35898706316947937, -0.40111812949180603, 0.6660763025283813, -0.5392213463783264, 0.7984271049499512, 1.1744884252548218, -0.49561163783073425, 1.0640742778778076, -0.2195167988538742, 0.16630399227142334, 0.4847513437271118, 0.760906994342804, 0.44963598251342773, -0.9570513367652893, ...
func (o RecordAliasOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v RecordAlias) string { return v.Name }).(pulumi.StringOutput) }
[ 0.4788661301136017, -0.7217989563941956, 0.5819739103317261, -0.7218446135520935, -0.4857383966445923, 0.5539684891700745, 0.12558268010616302, 0.4472925066947937, -0.4299100935459137, 1.0596338510513306, -0.37910017371177673, 1.091936707496643, 1.1161152124404907, -0.5530834794044495, -...