text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (f *tmplFuncs) dict(pairs ...interface{}) (map[string]interface{}, error) {
if len(pairs)%2 != 0 {
return nil, errors.New("expected pairs")
}
m := make(map[string]interface{}, len(pairs)/2)
for i := 0; i < len(pairs); i += 2 {
m[pairs[i].(string)] = pairs[i+1]
}
return m, nil
} | [
-1.189151644706726,
0.5097947716712952,
0.6283082962036133,
-0.5456981658935547,
-1.1818386316299438,
0.1026957631111145,
0.8922774195671082,
-0.12438727170228958,
-0.7089077234268188,
-0.18338465690612793,
-0.020949237048625946,
-0.4823547303676605,
0.24590368568897247,
0.6446181535720825... |
func (f *tmplFuncs) sub(x, y int) int { return x - y } | [
-0.5872118473052979,
0.0626521185040474,
0.5041204690933228,
-0.9017959237098694,
-1.3717232942581177,
0.2190655618906021,
-0.15186837315559387,
-0.13060656189918518,
-0.8259185552597046,
-0.4089738428592682,
-1.1030194759368896,
0.4546057879924774,
0.028472384437918663,
-0.327856123447418... |
func (f *tmplFuncs) filepath() string {
return path.Join(f.rootDir, f.outputFile)
} | [
0.8142402768135071,
-0.905475378036499,
0.07459006458520889,
-0.2749621868133545,
0.3429466485977173,
0.3899727165699005,
1.1289950609207153,
-0.15325984358787537,
-1.0296114683151245,
-0.34878870844841003,
0.6392832398414612,
-0.19752807915210724,
-0.18484050035476685,
0.5831996202468872,... |
func (f *tmplFuncs) gatewayMethod(target *descriptor.MethodDescriptorProto) (*gateway.Method, error) {
file, err := f.registry.LookupFile(f.f.GetName())
if err != nil {
return nil, err
}
for _, s := range file.Services {
for _, m := range s.Methods {
if m.MethodDescriptorProto == target {
return m, nil
... | [
0.1410776972770691,
0.25471359491348267,
0.5889974236488342,
-0.8463864326477051,
-0.3809274137020111,
-0.11106058210134506,
1.1264780759811401,
-0.3673746883869171,
-0.7727015614509583,
0.44744381308555603,
0.7930910587310791,
0.6140086650848389,
-0.17844867706298828,
1.103485107421875,
... |
func (f *tmplFuncs) urlToType(symbolPath string) string {
if !util.IsFullyQualified(symbolPath) {
panic("urlToType: not a fully-qualified symbol path")
}
// Resolve the package path for the type.
file := util.NewResolver(f.protoFile).ResolveFile(symbolPath, nil)
if file == nil {
return ""
}
pkgPath := file.... | [
-0.4683184027671814,
0.0906514823436737,
0.4708121120929718,
-0.796132504940033,
0.8434228301048279,
-0.36668720841407776,
0.8873735070228577,
-0.2792065143585205,
0.07006185501813889,
0.000884844979736954,
0.05899469926953316,
0.30198514461517334,
0.1754322350025177,
0.10876641422510147,
... |
func (f *tmplFuncs) resolvePkgPath(pkg string) string {
// Test this proto file itself:
if stripExt(filepath.Base(*f.f.Name)) == pkg {
return *f.f.Name
}
// Test each dependency:
for _, p := range f.f.Dependency {
if stripExt(filepath.Base(p)) == pkg {
return p
}
}
return ""
} | [
-0.36322614550590515,
0.017723238095641136,
0.5437775254249573,
0.019004860892891884,
-0.27795061469078064,
-0.30107226967811584,
0.27731460332870483,
0.07058047503232956,
-0.18678832054138184,
-0.314725786447525,
0.0355045348405838,
-1.5421886444091797,
-0.6104405522346497,
0.551210880279... |
func (f *tmplFuncs) location(x interface{}) *descriptor.SourceCodeInfo_Location {
// Validate that we got a sane type from the template.
pkgPath := reflect.Indirect(reflect.ValueOf(x)).Type().PkgPath()
if pkgPath != "" && pkgPath != "github.com/golang/protobuf/protoc-gen-go/descriptor" {
panic("expected descriptor... | [
-0.5548591613769531,
0.15280787646770477,
0.498509019613266,
-0.5470152497291565,
-0.31023743748664856,
0.02404938079416752,
0.9446604251861572,
-0.120131716132164,
-0.1534544974565506,
-0.1202661469578743,
0.1857338696718216,
-0.05898238345980644,
0.5328367948532104,
0.34114259481430054,
... |
func (f *tmplFuncs) findCachedItem(x interface{}) *descriptor.SourceCodeInfo_Location {
for _, i := range f.locCache {
if i.V == x {
return i.L
}
}
return nil
} | [
-0.08591783791780472,
-0.05757703632116318,
0.2081286460161209,
-0.105038121342659,
-0.6439346075057983,
0.3923267424106598,
-0.2131795734167099,
-0.29814112186431885,
-0.3236721158027649,
-0.45365166664123535,
-0.4452359676361084,
0.04993877187371254,
-0.10223232954740524,
1.0051473379135... |
func (f *tmplFuncs) walkPath(path []int32) interface{} {
if len(path) == 0 {
return f.f
}
var (
walker func(id int, v interface{}) bool
found interface{}
target = int(path[0])
)
path = path[1:]
walker = func(id int, v interface{}) bool {
if id != target {
return true
}
if len(path) == 0 {
fou... | [
-1.0991088151931763,
-0.1554678976535797,
0.5126219391822815,
-0.14598314464092255,
0.2191515862941742,
0.04662512242794037,
1.3854169845581055,
-0.9744003415107727,
0.22102592885494232,
-0.3576901853084564,
-0.31863105297088623,
-0.5848057270050049,
-0.97203129529953,
0.43624743819236755,... |
func (f *tmplFuncs) protoFields(node reflect.Value, fn func(id int, v interface{}) bool) {
indirect := reflect.Indirect(node)
switch indirect.Kind() {
case reflect.Slice:
for i := 0; i < indirect.Len(); i++ {
if !fn(i, indirect.Index(i).Interface()) {
return
}
}
case reflect.Struct:
// Iterate eac... | [
-0.18189604580402374,
0.9509029984474182,
0.636143684387207,
-0.6190974712371826,
0.20492354035377502,
-0.26404961943626404,
0.4381556808948517,
0.24656279385089874,
-0.8427301049232483,
0.07673127204179764,
-1.0898056030273438,
-0.2766660451889038,
-0.8180584907531738,
-0.2774204909801483... |
func Tally(reader io.Reader, writer io.Writer) error {
scanner := bufio.NewScanner(reader)
scanner.Split(bufio.ScanLines)
records := map[string]record{}
for scanner.Scan() {
s := scanner.Text()
if s == "" || strings.Contains(s, "#") {
continue
}
r := strings.Split(s, ";")
if len(r) != 3 {
return ... | [
0.20431579649448395,
-0.45315441489219666,
1.0224906206130981,
-1.2091569900512695,
-0.9447536468505859,
-0.015166377648711205,
0.960243821144104,
-0.9532090425491333,
-0.6628412008285522,
0.368118554353714,
-0.39738571643829346,
0.5347861051559448,
1.2166290283203125,
-0.4552653729915619,... |
func NewParser(transactionFunc TransactionFunc) *Parser {
return &Parser{
transaction: nil,
callback: transactionFunc,
stateMachine: fsm.NewFSM(
state.Idle,
fsm.Events{
{
Name: event.BeginIn,
Dst: state.Start,
Src: []string{state.Idle},
},
{
Name: event.BeginOut,
... | [
0.08177689462900162,
-0.159012109041214,
0.4575428068637848,
-0.6363964080810547,
-1.1014946699142456,
-1.1635648012161255,
0.09993389993906021,
0.17934507131576538,
-0.3307705819606781,
-0.43917226791381836,
-0.1253320425748825,
-0.31096410751342773,
0.12748676538467407,
0.543876469135284... |
func (p *Parser) Parse(msg string) (err error) {
if list := re.Operation.FindStringSubmatch(msg); list != nil {
err = p.handleOperation(list[1:])
} else if list := re.Begin.FindStringSubmatch(msg); list != nil {
err = p.handleBegin(list[1:])
} else if list := re.Commit.FindStringSubmatch(msg); list != nil {
e... | [
0.3363584280014038,
1.0627514123916626,
0.82759690284729,
0.5412368178367615,
-0.09244322776794434,
-0.2728075087070465,
0.6551709175109863,
0.027571603655815125,
-0.6312331557273865,
-0.41632115840911865,
0.513254702091217,
-0.3984890282154083,
-1.5015809535980225,
0.30221858620643616,
... |
func NewActivity(metadata *activity.Metadata) activity.Activity {
return &MyActivity{metadata: metadata}
} | [
0.5254675149917603,
-1.2250394821166992,
0.07614469528198242,
0.38101768493652344,
-0.5346868634223938,
-0.05096015706658363,
-0.028699614107608795,
-0.4048473834991455,
-0.09228713810443878,
-0.7047272324562073,
0.9237696528434753,
0.4914596676826477,
-0.19386348128318787,
-0.948610663414... |
func MergeLabels(allLabels ...map[string]string) map[string]string {
res := map[string]string{}
for _, labels := range allLabels {
if labels != nil {
for k, v := range labels {
res[k] = v
}
}
}
return res
} | [
-0.7090840339660645,
0.004372584633529186,
0.5383259057998657,
0.04129578545689583,
-0.19693918526172638,
0.3807888329029083,
-1.5815335512161255,
0.5231658816337585,
-0.4190317988395691,
0.21723756194114685,
0.225134938955307,
-0.6807124614715576,
-0.4857091009616852,
0.2323230504989624,
... |
func GetLabels(component constants.ComponentName, cr_name string) map[string]string {
return generateComponentLabels(component, cr_name)
} | [
-0.21663875877857208,
-0.5397258996963501,
0.39942753314971924,
-0.9869498610496521,
-0.029068855568766594,
-0.17079617083072662,
-0.6045997142791748,
-0.015863120555877686,
-0.37451058626174927,
0.3403502106666565,
-0.519352376461029,
-0.4797808527946472,
-0.2772192060947418,
0.1919920891... |
func (fn ShowClusterHandlerFunc) Handle(params ShowClusterParams, principal *models.Principal) middleware.Responder {
return fn(params, principal)
} | [
0.4590705931186676,
0.19765400886535645,
0.15904882550239563,
0.23961199820041656,
-0.6003384590148926,
0.4006659984588623,
1.0581145286560059,
0.5348592400550842,
0.16370703279972076,
-0.5796946287155151,
0.9106362462043762,
0.7258424162864685,
-0.4368913471698761,
-0.6041152477264404,
... |
func NewShowCluster(ctx *middleware.Context, handler ShowClusterHandler) *ShowCluster {
return &ShowCluster{Context: ctx, Handler: handler}
} | [
0.8041608929634094,
0.1601208597421646,
0.055977851152420044,
-0.04738204926252365,
-1.4978893995285034,
-0.31171920895576477,
0.2475517839193344,
0.7379335761070251,
0.9114820957183838,
-0.8206949234008789,
0.2584132254123688,
1.9199950695037842,
0.4863433539867401,
0.6486579775810242,
... |
func AddAggregate(agg es.Aggregate) Option {
return func(ms *memoryStore) {
id := agg.GetID()
ms.allAggregates[id] = agg
}
} | [
0.14904645085334778,
0.4600573182106018,
0.45044344663619995,
0.07720031589269638,
0.07015813887119293,
-0.8829296827316284,
-0.8731157183647156,
0.1260850578546524,
1.0767649412155151,
-0.6989282369613647,
0.7329151034355164,
-0.2686319649219513,
-0.7267587184906006,
1.118962287902832,
... |
func NewMemoryStore(opts ...Option) es.DataStore {
ms := &memoryStore{
allEvents: make(map[string][]*es.Event),
allSnapshots: make(map[string]es.Aggregate),
allAggregates: make(map[string]es.Aggregate),
}
for _, opt := range opts {
opt(ms)
}
return ms
} | [
0.6336056590080261,
-0.1413639783859253,
0.4252426028251648,
-0.0398218147456646,
-1.3554168939590454,
-1.0059843063354492,
-0.3945445418357849,
-0.12994052469730377,
0.9179273247718811,
-0.3021986186504364,
-0.4628191292285919,
0.21581387519836426,
-0.17260639369487762,
0.1041737943887710... |
func RegisterAPIRoutes(g *echo.Group, bind context.Binder) {
// Store endpoints first since they are the most active
//e.GET("/api/store/", storeGetView)
//e.POST("/api/store/", storePostView)
// TODO Can not register same handler for two different routes
//g = g.Group("/store")
//g.GET("/", storeGetView)
//g.P... | [
-0.375436395406723,
0.28347641229629517,
0.7373868227005005,
0.2976403832435608,
0.5602489709854126,
0.5297613143920898,
0.1090368926525116,
-0.04304441809654236,
-0.40084898471832275,
-0.4777027666568756,
-0.18811656534671783,
-0.07718686014413834,
-0.30844444036483765,
0.567332923412323,... |
func NewStagesLatency(cfg *config.Config, db *sql.DB) *StagesLatency {
log.Println("NewStagesLatency()")
sl := &StagesLatency{
db: db,
}
sl.SetConfig(cfg)
return sl
} | [
0.3390841782093048,
-1.2127459049224854,
0.17776121199131012,
0.3777534067630768,
-1.2403188943862915,
-0.31540754437446594,
-0.6892798542976379,
0.14709822833538055,
0.008695835247635841,
0.5468984246253967,
-0.8791717290878296,
-0.7073081731796265,
-0.5148616433143616,
0.709531843662262,... |
func (sl *StagesLatency) Collect() {
start := time.Now()
sl.last = collect(sl.db)
sl.LastCollected = time.Now()
log.Println("t.current collected", len(sl.last), "row(s) from SELECT")
// check if we need to update first or we need to reload initial characteristics
if (len(sl.first) == 0 && len(sl.last) > 0) || sl... | [
-0.315766304731369,
-0.7594928741455078,
0.6556941270828247,
-0.41392257809638977,
-0.3061402142047882,
-0.042826585471630096,
0.36180728673934937,
-0.4374812841415405,
-0.8596213459968567,
0.8895309567451477,
0.3250853717327118,
-0.09579256922006607,
1.0140495300292969,
1.2251044511795044... |
func (sl *StagesLatency) ResetStatistics() {
sl.first = duplicateSlice(sl.last)
sl.FirstCollected = sl.LastCollected
sl.calculate()
} | [
0.4899977743625641,
0.7933513522148132,
0.0429183766245842,
-0.1711026430130005,
0.5437958836555481,
-0.2897860109806061,
0.9283683896064758,
-0.8149133920669556,
-0.11314970254898071,
0.2933172285556793,
0.15373151004314423,
0.6952739357948303,
0.4866609573364258,
0.07107480615377426,
-... |
func (sl *StagesLatency) calculate() {
// log.Println( "- t.results set from t.current" )
sl.Results = make(Rows, len(sl.last))
copy(sl.Results, sl.last)
if sl.WantRelativeStats() {
sl.Results.subtract(sl.first)
}
sl.Totals = totals(sl.Results)
} | [
-0.06815967708826065,
-0.01944088377058506,
0.3131757378578186,
-0.6846779584884644,
-0.57337486743927,
-0.5393531322479248,
0.7695040702819824,
-0.2627125680446625,
-0.2864314913749695,
0.16922274231910706,
-0.24384693801403046,
-0.631671667098999,
0.1421365588903427,
0.8909837007522583,
... |
func (sl StagesLatency) HaveRelativeStats() bool {
return true
} | [
1.6872302293777466,
0.31997981667518616,
0.49519649147987366,
-0.179362952709198,
-0.6138809323310852,
1.2678091526031494,
0.23382233083248138,
-0.20406387746334076,
-0.13649982213974,
-0.7010278105735779,
-0.3893083930015564,
-0.9758850336074829,
-0.7165233492851257,
0.9896735548973083,
... |
func (m* Manager) GetHandler(w http.ResponseWriter, r *http.Request) {
r.ParseForm()
funcName := r.FormValue("funcName")
res, err := m.platformManager.GetFunction(funcName)
if err != nil {
http.Error(w, err.Error(), http.StatusBadRequest)
return
}
jsonRet, err := json.Marshal(res)
if err != nil {
http.Err... | [
-0.8233045935630798,
-0.07109451293945312,
0.9853097796440125,
0.46861937642097473,
-0.05948086455464363,
-0.23908016085624695,
0.20113518834114075,
-0.09922195971012115,
-1.0712368488311768,
-0.33131924271583557,
0.23241367936134338,
0.5445966124534607,
-0.2081771343946457,
0.541571915149... |
func (nt NodeType) String() string {
switch nt {
case DirType:
return "dir type"
case RegularType:
return "file type"
case BlockDeviceType:
return "block device type"
case CharDeviceType:
return "char device type"
case SocketType:
return "socket type"
case FIFOType:
return "fifo type"
case LinkType:... | [
-0.7358545660972595,
-0.35242414474487305,
-0.009593786671757698,
-1.1352547407150269,
0.269448459148407,
0.22984760999679565,
0.1680457592010498,
-1.8220590353012085,
-0.6963898539543152,
0.526286780834198,
-0.393328994512558,
0.556469738483429,
-0.6365723013877869,
0.5708804726600647,
... |
func serverIDFromProviderID(providerID string) (string, error) {
if providerID == "" {
return "", errors.New("providerID cannot be empty string")
}
split := strings.Split(providerID, "/")
if len(split) != 3 {
return "", fmt.Errorf("unexpected providerID format: %s, format should be: digitalocean://12345", prov... | [
-0.6365165710449219,
-0.9350170493125916,
0.4883013963699341,
-0.34087935090065,
-0.3894815146923065,
0.4114452004432678,
1.0212208032608032,
0.21323010325431824,
1.8344650268554688,
1.5592795610427856,
0.17330069839954376,
0.9838592410087585,
-0.5161282420158386,
-0.26766031980514526,
1... |
func (conn *cloudConnector) reboot(id string) error {
Logger(conn.ctx).Infof("Rebooting instance %v", id)
_, err := conn.client.Devices.Reboot(id)
if err != nil {
return errors.FromErr(err).WithContext(conn.ctx).Err()
}
return nil
} | [
-1.4167349338531494,
0.39408981800079346,
0.55694979429245,
0.04497752711176872,
0.1194763332605362,
0.3999790549278259,
-0.4592503309249878,
-0.02572415955364704,
0.4637030065059662,
0.27825701236724854,
-0.26538336277008057,
-0.11403711140155792,
-0.6209744215011597,
-0.26551398634910583... |
func (a *Agent) UploadCreateTicket(
dirId, name string, r io.ReadSeeker, ticket *UploadTicket,
) (err error) {
// Initialize uploading
op := &_UploadOssParams{}
if ticket.Exist, err = a.uploadInit(
dirId, name, r, api.UploadMaxSize, op,
); err != nil || ticket.Exist {
return
}
// Get OSS token
spec := (&api... | [
-0.04954826459288597,
0.034516703337430954,
0.9834906458854675,
-0.39046478271484375,
-0.30380910634994507,
-0.08503913879394531,
0.08067645877599716,
-0.7280307412147522,
-0.20413102209568024,
-0.09744963049888611,
-0.2932090759277344,
-0.017269589006900787,
-0.17571118474006653,
0.060432... |
func (a *Agent) UploadParseResult(r io.Reader, file *File) (err error) {
jd, resp := json.NewDecoder(r), &base.StandardResp{}
if err = jd.Decode(resp); err == nil {
err = resp.Err()
}
if err != nil || file == nil {
return
}
result := &api.UploadSampleResult{}
if err = resp.Extract(result); err != nil {
ret... | [
0.1215372160077095,
-0.700922429561615,
0.5919827818870544,
-0.820600152015686,
-0.6391363143920898,
-0.5004348158836365,
0.07535400241613388,
-0.195412740111351,
-0.3320624530315399,
0.23447869718074799,
-1.1225017309188843,
-0.4319135546684265,
-0.7711149454116821,
0.17383629083633423,
... |
func (a *Agent) UploadSample(dirId, name string, size int64, r io.Reader) (fileId string, err error) {
if size == 0 {
size = util.GuessSize(r)
}
// Check upload size
if size <= 0 {
// What the fuck?
return "", errors.ErrUploadNothing
} else if size > api.UploadMaxSizeSample {
return "", errors.ErrUploadToo... | [
-0.6184316277503967,
-0.22085872292518616,
0.9261962175369263,
-0.21547240018844604,
-0.7139551043510437,
-0.21266166865825653,
-0.005129931028932333,
0.02795904502272606,
-0.08780116587877274,
0.5607212781906128,
-0.12933149933815002,
0.3428454101085663,
-0.8372292518615723,
0.65678763389... |
func parseTopic(topic string) (string, string) {
elements := strings.Split(topic, ".")
topicPrefix := strings.Join(elements[:len(elements)-1], ".")
prodId := elements[len(elements)-1]
return topicPrefix, prodId
} | [
-0.09168405830860138,
-0.5587707757949829,
0.4539395868778229,
-0.5504088401794434,
0.41098958253860474,
0.16405966877937317,
-0.1997050940990448,
-0.606005847454071,
-0.06379371881484985,
1.0575827360153198,
-0.2505628764629364,
0.5501922965049744,
0.38040047883987427,
-0.7896842360496521... |
func (consumer *Consumer) Setup(sarama.ConsumerGroupSession) error {
// Mark the consumer as ready
close(consumer.ready)
return nil
} | [
0.17217595875263214,
-0.206075057387352,
0.38058292865753174,
-0.03761105611920357,
0.3265754282474518,
-0.8269578814506531,
0.9072054028511047,
0.030272888019680977,
0.21259805560112,
0.8653451800346375,
-0.11611497402191162,
0.27895587682724,
-0.27341440320014954,
0.568920910358429,
-0... |
func (consumer *Consumer) Cleanup(sarama.ConsumerGroupSession) error {
return nil
} | [
0.6793261170387268,
-0.7583812475204468,
0.24679632484912872,
0.4153382480144501,
-0.528643012046814,
-0.960806667804718,
1.2946150302886963,
-0.4444994330406189,
0.9198042750358582,
-0.3695460557937622,
0.10759435594081879,
0.11739533394575119,
-0.3457571864128113,
0.5041554570198059,
0... |
func (consumer *Consumer) ConsumeClaim(session sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error {
// NOTE:
// Do not move the code below to a goroutine.
// The `ConsumeClaim` itself is called within a goroutine, see:
// https://github.com/Shopify/sarama/blob/master/consumer_group.go#L27-L29
for... | [
0.515701174736023,
-0.42733708024024963,
0.45763057470321655,
0.051861584186553955,
0.5886867642402649,
-0.9778386354446411,
-0.04285181313753128,
-0.3418232202529907,
-0.44125255942344666,
0.7500692009925842,
0.24205294251441956,
-0.03492502495646477,
-0.10857325047254562,
0.7236773371696... |
func (endpointSliceStrategy) NamespaceScoped() bool {
return true
} | [
-0.14346876740455627,
-0.7600399851799011,
0.48757028579711914,
-0.03506304696202278,
0.36725175380706787,
0.4482057988643646,
-0.5063624978065491,
-0.615543007850647,
1.0283910036087036,
1.04195237159729,
0.012287433259189129,
0.5690308213233948,
-0.6044045090675354,
0.6069581508636475,
... |
func (endpointSliceStrategy) PrepareForCreate(ctx context.Context, obj runtime.Object) {
endpointSlice := obj.(*discovery.EndpointSlice)
endpointSlice.Generation = 1
dropDisabledConditionsOnCreate(endpointSlice)
} | [
-0.5991767644882202,
-0.12390396744012833,
0.18514326214790344,
0.42444998025894165,
0.7386600375175476,
0.16071198880672455,
-0.11576341092586517,
-0.3763400912284851,
-0.11862579733133316,
1.205457091331482,
0.03404455631971359,
-0.22967930138111115,
0.425310879945755,
0.5749428272247314... |
func (endpointSliceStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) {
newEPS := obj.(*discovery.EndpointSlice)
oldEPS := old.(*discovery.EndpointSlice)
// Increment generation if anything other than meta changed
// This needs to be changed if a status attribute is added to EndpointSlice
og... | [
-0.5473134517669678,
-1.2310619354248047,
0.6576552391052246,
0.15610183775424957,
-0.16136853396892548,
0.2717655599117279,
-0.062101032584905624,
0.07334750890731812,
0.2658924460411072,
1.225565791130066,
0.4080016016960144,
0.03870527073740959,
0.6213265657424927,
0.18844424188137054,
... |
func (endpointSliceStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList {
endpointSlice := obj.(*discovery.EndpointSlice)
err := validation.ValidateEndpointSliceCreate(endpointSlice)
return err
} | [
-0.687943160533905,
-0.23225906491279602,
0.2950678765773773,
0.46749043464660645,
1.2490019798278809,
0.44459277391433716,
0.33968937397003174,
-0.6839935183525085,
0.13157112896442413,
0.9376959204673767,
0.33067619800567627,
0.4321625232696533,
0.3873843252658844,
0.41695523262023926,
... |
func (endpointSliceStrategy) Canonicalize(obj runtime.Object) {
} | [
-0.2802281975746155,
-1.0284874439239502,
0.360114187002182,
0.7062015533447266,
0.7651219964027405,
-0.1274545043706894,
0.3147735595703125,
-0.15549421310424805,
0.7299659252166748,
1.3745170831680298,
0.14853182435035706,
0.9151822924613953,
0.33171042799949646,
-0.021955257281661034,
... |
func (endpointSliceStrategy) AllowCreateOnUpdate() bool {
return false
} | [
-0.5895225405693054,
-1.1072914600372314,
0.4216510057449341,
0.38607949018478394,
-0.4730047583580017,
1.6168336868286133,
-0.3750799894332886,
-0.20777583122253418,
-0.01910180225968361,
1.258951187133789,
0.5301865339279175,
0.17274610698223114,
-0.7288119196891785,
0.18354767560958862,... |
func (endpointSliceStrategy) ValidateUpdate(ctx context.Context, new, old runtime.Object) field.ErrorList {
newEPS := new.(*discovery.EndpointSlice)
oldEPS := old.(*discovery.EndpointSlice)
return validation.ValidateEndpointSliceUpdate(newEPS, oldEPS)
} | [
-0.9276973605155945,
-1.327171802520752,
0.5045183897018433,
0.23974817991256714,
0.186248779296875,
0.19055257737636566,
-0.05632432550191879,
-0.5517900586128235,
0.40858325362205505,
1.1463264226913452,
0.3125651776790619,
0.2609010338783264,
0.3609451949596405,
0.061285555362701416,
... |
func (endpointSliceStrategy) AllowUnconditionalUpdate() bool {
return true
} | [
-0.6544826626777649,
-0.9219274520874023,
0.40461716055870056,
0.20463621616363525,
-0.7893133163452148,
1.0693553686141968,
-0.4920286536216736,
0.006168447434902191,
0.26780781149864197,
0.8182245492935181,
0.7113513946533203,
0.2270716428756714,
-0.27683591842651367,
-0.2506627440452575... |
func dropDisabledConditionsOnCreate(endpointSlice *discovery.EndpointSlice) {
if utilfeature.DefaultFeatureGate.Enabled(features.EndpointSliceTerminatingCondition) {
return
}
// Always drop the serving/terminating conditions on create when feature gate is disabled.
for i := range endpointSlice.Endpoints {
endp... | [
0.11637202650308609,
-0.17723742127418518,
0.18805651366710663,
1.1133348941802979,
0.7878018617630005,
0.5303579568862915,
0.04354086145758629,
0.6628773808479309,
-0.5761277079582214,
1.0032627582550049,
0.16893422603607178,
-0.3272787034511566,
-0.39079442620277405,
0.9237024188041687,
... |
func dropDisabledConditionsOnUpdate(oldEPS, newEPS *discovery.EndpointSlice) {
if utilfeature.DefaultFeatureGate.Enabled(features.EndpointSliceTerminatingCondition) {
return
}
// Only drop the serving/terminating condition if the existing EndpointSlice doesn't have it set.
dropConditions := true
for _, ep := ra... | [
-0.26175472140312195,
-0.8786791563034058,
0.5817486047744751,
0.6008434295654297,
0.24140679836273193,
0.41717278957366943,
-0.47865331172943115,
1.1294097900390625,
-0.033431511372327805,
1.5475950241088867,
0.6128061413764954,
-0.18783217668533325,
-0.6526464819908142,
0.554373681545257... |
func (r Record) validate(now time.Time) error {
var err error
// Validate that certain fields are set.
if r.Organization == "" {
err = errorset.Append(err, errors.New("missing Organization"))
}
if r.Environment == "" {
err = errorset.Append(err, errors.New("missing Environment"))
}
if r.GatewayFlowID == "" ... | [
0.08407258242368698,
0.21639671921730042,
0.7850084900856018,
-0.5932320952415466,
-0.2714044749736786,
-0.01345191989094019,
0.20537270605564117,
-0.2728336453437805,
-1.1587194204330444,
0.039472877979278564,
0.2735021114349365,
0.06970062851905823,
-0.12381263077259064,
0.77460610866546... |
func (r Record) MarshalJSON() ([]byte, error) {
type alias Record
m, err := structToMap(alias(r))
if err != nil {
return nil, err
}
attrs := r.Attributes
if len(r.Attributes) > maxNumAttributes {
log.Debugf("truncated attributes list to max length of %d", maxNumAttributes)
attrs = r.Attributes[:maxNumAttrib... | [
0.2300003319978714,
-0.41519495844841003,
0.6718924641609192,
-0.888452410697937,
-0.8259987235069275,
-0.3246881365776062,
0.4779064953327179,
0.9388149976730347,
-0.013944623060524464,
0.729934811592102,
-0.22753138840198517,
1.2091573476791382,
0.8316882848739624,
0.3905678689479828,
... |
func timeToApigeeInt(t time.Time) int64 {
return t.UnixNano() / (int64(time.Millisecond) / int64(time.Nanosecond))
} | [
-0.7390905022621155,
0.09433642029762268,
0.5332908630371094,
-1.3252408504486084,
-0.38844481110572815,
-0.04838807135820389,
-0.9916936159133911,
-0.6335129141807556,
-0.48649054765701294,
0.17298690974712372,
-0.8527275919914246,
-0.7370041012763977,
-0.19966739416122437,
0.959311962127... |
func validateAttribute(attr Attribute) error {
switch k := reflect.TypeOf(attr.Value).Kind(); k {
case
reflect.Bool,
reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64,
reflect.Float32, reflect.Float64,
reflect.... | [
-0.1051906943321228,
0.13301192224025726,
0.3775092661380768,
-0.4265463948249817,
0.004856905899941921,
0.05832947790622711,
0.5121169686317444,
-0.9284524917602539,
0.3079844117164612,
0.7753052115440369,
0.7825408577919006,
0.019284388050436974,
0.0512794554233551,
1.2378445863723755,
... |
func truncStringToBytes(in interface{}, limit int) (interface{}, bool) {
if val, ok := in.(string); ok {
if len(val) > limit {
for start, rune := range val {
if start+utf8.RuneLen(rune) > limit {
return val[:start], true
}
}
}
}
return in, false
} | [
-0.08266530185937881,
0.42144450545310974,
0.6045423150062561,
-0.9504449963569641,
-0.21985270082950592,
0.00970921479165554,
-0.19387908279895782,
-0.24039995670318604,
0.3209228515625,
0.6194206476211548,
-0.4168257713317871,
0.30719202756881714,
-0.3656481206417084,
-1.2006522417068481... |
func newLexer(input string) *lexer {
l := &lexer{input: input}
l.readChar()
return l
} | [
0.3067028820514679,
-1.5442672967910767,
0.057942021638154984,
-0.13348616659641266,
-1.7051663398742676,
0.30219411849975586,
-1.2024377584457397,
-0.05174149200320244,
0.16385334730148315,
-1.1521729230880737,
-0.28258416056632996,
0.1542893350124359,
-0.3829416036605835,
0.4304521083831... |
func (l *lexer) nextToken() token {
var tok token
l.skipWhitespace()
switch l.ch {
case ',':
tok = newToken(tokComma, l.ch)
case ':':
tok = newToken(tokColon, l.ch)
case '{':
tok = newToken(tokLBrace, l.ch)
case '}':
tok = newToken(tokRBrace, l.ch)
case '[':
tok = newToken(tokLBracket, l.ch)
case '... | [
0.12971609830856323,
-0.8376665711402893,
0.9237770438194275,
-0.196794331073761,
-0.8779960870742798,
-0.16770006716251373,
-0.5777779817581177,
0.48127254843711853,
-0.0351998470723629,
-0.4222489595413208,
0.19156640768051147,
0.8727918267250061,
0.3615497350692749,
-0.2918716073036194,... |
func (l *lexer) skipWhitespace() {
for l.ch == ' ' || l.ch == '\t' || l.ch == '\n' || l.ch == '\r' {
l.readChar()
}
} | [
-0.2899475693702698,
-0.5444381237030029,
0.42973247170448303,
-1.0862683057785034,
-0.3027084767818451,
-0.04883597418665886,
-0.31172892451286316,
-1.2053865194320679,
-0.7503258585929871,
0.09194885194301605,
0.06401243060827255,
-0.06595582515001297,
-0.21117433905601501,
0.58053177595... |
func (l *lexer) readChar() {
if l.readPosition >= len(l.input) {
l.ch = eof
} else {
l.ch = l.input[l.readPosition]
}
l.position = l.readPosition
l.readPosition++
} | [
0.20198331773281097,
-0.7804624438285828,
0.5154050588607788,
-0.3795916438102722,
-0.306506484746933,
0.14343371987342834,
0.0007680112612433732,
-0.05394144728779793,
-0.6681463718414307,
-1.1314032077789307,
1.1326431035995483,
0.17739668488502502,
0.2881496548652649,
0.7277480959892273... |
func (l *lexer) readString() string {
start := l.position + 1
for {
l.readChar()
if l.ch == '"' || l.ch == eof {
break
}
if l.ch == '\\' && l.peekChar() == '"' {
l.readChar()
}
}
result := strings.Replace(l.input[start:l.position], `\"`, `"`, -1)
return result
} | [
-0.06610150635242462,
-0.5976259112358093,
0.6348292231559753,
-0.20269054174423218,
-0.3423376977443695,
-0.45023977756500244,
-0.23686382174491882,
-0.4748143255710602,
-1.0493898391723633,
0.4268399775028229,
1.124767780303955,
0.6009965538978577,
-0.31381264328956604,
-0.11125891655683... |
func (l *lexer) readNumber() string {
start := l.position
readDecimalPoint := false
for isDigit(l.ch) || (l.ch == '.' && !readDecimalPoint) {
if l.ch == '.' {
readDecimalPoint = true
}
l.readChar()
}
return l.input[start:l.position]
} | [
-0.026036998257040977,
-0.22802193462848663,
0.7675900459289551,
0.6968216300010681,
-1.0040051937103271,
-0.36807096004486084,
-0.6216334104537964,
-0.17479480803012848,
-0.03728383406996727,
-0.6729753613471985,
1.0812486410140991,
0.047702670097351074,
-0.07617121189832687,
-0.446501731... |
func (l *lexer) readKeyword() string {
start := l.position
for isLetter(l.ch) {
l.readChar()
}
return l.input[start:l.position]
} | [
0.11386515200138092,
-0.5934796929359436,
0.5211024880409241,
0.3721902668476105,
-0.9147666692733765,
0.560677707195282,
-1.0624816417694092,
-0.4296112060546875,
-0.5635234713554382,
0.48721182346343994,
0.23228958249092102,
0.3668864369392395,
-0.4802614152431488,
-0.08906522393226624,
... |
func isLetter(ch byte) bool {
return 'a' <= ch && ch <= 'z' || 'A' <= ch && ch <= 'Z' || ch == '_'
} | [
-0.7776000499725342,
-0.6709726452827454,
0.6906427145004272,
-1.0629521608352661,
-0.9096033573150635,
0.8177483081817627,
-0.5051453709602356,
-0.45947641134262085,
0.7352032661437988,
0.22818857431411743,
-1.3384618759155273,
0.26576119661331177,
-0.5129265785217285,
1.0921300649642944,... |
func isDigit(ch byte) bool {
return '0' <= ch && ch <= '9'
} | [
0.21200783550739288,
-1.3067560195922852,
0.43733397126197815,
0.3409396708011627,
0.16089923679828644,
0.9073015451431274,
-0.48317965865135193,
-0.1412360817193985,
0.06638465076684952,
-0.5792296528816223,
-0.8277872204780579,
-0.3162015974521637,
-0.4234517216682434,
0.7347418665885925... |
func newToken(tokenType tokenType, ch byte) token {
return token{Type: tokenType, Literal: string(ch)}
} | [
0.8610833883285522,
-1.0356675386428833,
0.1731170415878296,
-0.6331039667129517,
-0.6635780334472656,
0.16223295032978058,
-1.2701232433319092,
0.44045954942703247,
-0.12396372854709625,
-0.9121474623680115,
-0.8807320594787598,
1.5010749101638794,
0.3551633358001709,
-0.2842935025691986,... |
func New(priority Priority, tag string) (*Writer, error) {} | [
-0.20518334209918976,
-0.9602956771850586,
0.24300618469715118,
0.6694372892379761,
-0.6342553496360779,
-1.5818557739257812,
-0.3914145827293396,
0.8135276436805725,
-1.0140399932861328,
-0.67215496301651,
-0.2692272365093231,
-0.7906149625778198,
0.5373882055282593,
0.5695990324020386,
... |
func Dial(network, raddr string, priority Priority, tag string) (*Writer, error) {} | [
0.1572592854499817,
-0.5517796874046326,
0.2144654095172882,
0.14246074855327606,
0.056873492896556854,
-0.5351787209510803,
-0.755975067615509,
0.8371113538742065,
0.264716774225235,
-0.151835635304451,
0.36793777346611023,
-0.6670747399330139,
-0.42830216884613037,
-0.02696317620575428,
... |
func (w *Writer) Close() error {} | [
-0.5470049977302551,
-0.4178260862827301,
0.38388916850090027,
0.37186476588249207,
-0.22897589206695557,
0.3902713358402252,
1.1895389556884766,
0.09581736475229263,
-0.9014242887496948,
-0.7892340421676636,
0.7493392825126648,
-0.7265824675559998,
-1.0621337890625,
1.4813257455825806,
... |
func (w *Writer) Emerg(m string) error {} | [
-0.9158987998962402,
-0.20563112199306488,
0.4030507802963257,
-0.7687395811080933,
0.06670501083135605,
0.3931424021720886,
0.20250168442726135,
1.4425941705703735,
-0.4473278522491455,
0.558691680431366,
-0.3035610318183899,
-0.41415825486183167,
-0.5428218841552734,
1.2037663459777832,
... |
func (w *Writer) Alert(m string) error {} | [
0.4010826349258423,
-0.9965195059776306,
0.2663561701774597,
-0.19530068337917328,
-0.3718224763870239,
0.12738516926765442,
1.1760165691375732,
0.22971928119659424,
-0.4585261344909668,
0.11851083487272263,
0.5488982200622559,
-0.09406605362892151,
-0.2498452216386795,
0.3541227877140045,... |
func (w *Writer) Crit(m string) error {} | [
0.7132250070571899,
-0.0011860355734825134,
0.15895885229110718,
-0.033778656274080276,
-0.25020086765289307,
0.45823538303375244,
0.9307587146759033,
0.34486621618270874,
-0.9916738271713257,
-0.2281273901462555,
1.0539662837982178,
0.0478118360042572,
-0.7940400242805481,
0.1628591418266... |
func (w *Writer) Err(m string) error {} | [
-0.04161748290061951,
-0.709197998046875,
0.29123425483703613,
0.8251075744628906,
-0.9626779556274414,
0.6415818333625793,
1.0128096342086792,
0.5144913196563721,
-0.6055553555488586,
-0.6540785431861877,
0.8506366014480591,
-0.33300650119781494,
-0.0026782266795635223,
1.0343440771102905... |
func (w *Writer) Warning(m string) error {} | [
-0.23123478889465332,
-0.3310093879699707,
0.34700578451156616,
0.8221597671508789,
-0.5409577488899231,
-0.045390959829092026,
0.5775824189186096,
-0.09838283061981201,
-0.0651526004076004,
0.2846073806285858,
0.25048407912254333,
-0.5364013910293579,
0.12452128529548645,
0.25063344836235... |
func (w *Writer) Notice(m string) error {} | [
-0.41946375370025635,
-0.6341844201087952,
0.2812543511390686,
0.5725025534629822,
0.16467952728271484,
-0.32907983660697937,
0.6844542622566223,
-0.0412164144217968,
-0.24177168309688568,
-0.3059025704860687,
0.3317209482192993,
-0.5943849086761475,
0.2529820501804352,
0.6956334710121155,... |
func (w *Writer) Info(m string) error {} | [
0.005355334375053644,
-0.9484179615974426,
0.3816830515861511,
0.1715414971113205,
-0.32086634635925293,
-0.1665254384279251,
0.9182243347167969,
0.0554589219391346,
-1.3933746814727783,
0.17547743022441864,
0.10901246964931488,
-0.6470984220504761,
0.2167520523071289,
0.5525553226470947,
... |
func (w *Writer) Debug(m string) error {} | [
-0.00514583382755518,
-0.24879133701324463,
0.3805329501628876,
0.005373330786824226,
0.27224838733673096,
0.16242615878582,
0.8159881234169006,
0.3248331844806671,
-0.3989861309528351,
-0.4675189256668091,
0.5034222602844238,
-0.5063175559043884,
-0.30499815940856934,
0.5943291187286377,
... |
func NewLogger(p Priority, logFlag int) (*log.Logger, error) {} | [
0.05419446527957916,
-0.011338893324136734,
0.5233898758888245,
0.7022238969802856,
-0.5177510976791382,
-0.48621299862861633,
-0.8226286768913269,
0.4890969693660736,
-0.129716157913208,
-0.32150518894195557,
-0.4660317897796631,
-0.21987909078598022,
-0.7809796929359436,
0.91271328926086... |
func ensureAtLeastOne(keys []string) bool {
for _, varName := range keys {
if _, found := os.LookupEnv(varName); found {
return true
}
}
return false
} | [
-0.17126910388469696,
0.035431183874607086,
0.6533157825469971,
-0.26672935485839844,
0.5061960816383362,
0.26866546273231506,
-1.4566588401794434,
-1.007049560546875,
-0.7716136574745178,
1.0108001232147217,
-0.310325026512146,
-0.6720449924468994,
-0.6146144866943359,
1.3587234020233154,... |
func convertKey(key string) string {
re := regexp.MustCompile("[^_]_[^_]")
singleReplaced := re.ReplaceAllStringFunc(key, replaceUnderscores)
singleTripleReplaced := strings.ReplaceAll(singleReplaced, "___", "-")
return strings.ToLower(strings.ReplaceAll(singleTripleReplaced, "__", "_"))
} | [
-0.7950846552848816,
-0.5278511643409729,
0.9627400040626526,
-0.9773550629615784,
0.2353575974702835,
-0.3200814127922058,
-0.8166713118553162,
0.7464905381202698,
0.14753130078315735,
0.995100736618042,
-0.378200501203537,
-0.15549422800540924,
0.562041163444519,
0.5286611914634705,
-0... |
func replaceUnderscores(s string) string {
return strings.ReplaceAll(s, "_", ".")
} | [
-0.1729430854320526,
-0.5050764679908752,
0.4148441255092621,
-1.7400442361831665,
-0.9115828275680542,
-0.25703322887420654,
-0.3417724668979645,
0.4758686423301697,
0.035439252853393555,
0.2521207630634308,
-1.132324457168579,
-0.14860136806964874,
-0.20203080773353577,
-0.30657523870468... |
func Contains(slice []string, element string) bool {
for _, v := range slice {
if v == element {
return true
}
}
return false
} | [
0.003948559518903494,
-0.8792144656181335,
0.16978977620601654,
0.16421715915203094,
-0.6745608448982239,
-0.08970694243907928,
-1.3481806516647339,
0.22809982299804688,
-0.01419387012720108,
0.62246173620224,
-0.10737196356058121,
0.92913419008255,
-0.07649014890193939,
0.1070671379566192... |
func ListToMap(kvList []string) map[string]string {
m := make(map[string]string)
for _, l := range kvList {
parts := strings.Split(l, "=")
if len(parts) == 2 {
m[parts[0]] = parts[1]
}
}
return m
} | [
-1.7211389541625977,
-0.2976256310939789,
0.7533190846443176,
-0.19198015332221985,
-0.39456021785736084,
-0.10660796612501144,
-1.1074860095977783,
0.5409412980079651,
1.1983122825622559,
1.2737603187561035,
-0.7122535109519958,
-0.53590327501297,
0.4180278480052948,
0.4404672682285309,
... |
func GetEnvironment() map[string]string {
return ListToMap(os.Environ())
} | [
-0.4805780053138733,
-0.5486261248588562,
0.31382519006729126,
0.05736406892538071,
0.34548407793045044,
0.3598271608352661,
0.4867115020751953,
0.40328988432884216,
-0.027830706909298897,
0.84062659740448,
-0.8530429005622864,
0.09964297711849213,
0.47930237650871277,
1.1980245113372803,
... |
func BuildProperties(spec ConfigSpec, environment map[string]string) map[string]string {
config := make(map[string]string)
for key, value := range spec.Defaults {
config[key] = value
}
for envKey, envValue := range environment {
if newKey, found := spec.Renamed[envKey]; found {
config[newKey] = envValue
} ... | [
-0.5781764984130859,
-0.8832124471664429,
0.620339035987854,
-0.6115700602531433,
-0.18005821108818054,
-0.09225308895111084,
-0.3090467154979706,
1.347571611404419,
-0.7597728967666626,
1.2080466747283936,
-0.09126154333353043,
-0.006551552563905716,
0.20245954394340515,
0.206374749541282... |
func NewRepoUpdateTopicsParams() *RepoUpdateTopicsParams {
var ()
return &RepoUpdateTopicsParams{
timeout: cr.DefaultTimeout,
}
} | [
-0.6933110952377319,
-0.10333158820867538,
0.3442455232143402,
-0.182964026927948,
-0.42714637517929077,
0.09123196452856064,
-0.6541812419891357,
0.08766317367553711,
-0.6802794933319092,
0.11229448765516281,
-0.5026978850364685,
-0.5001701712608337,
-0.3731707036495209,
-0.50244033336639... |
func NewRepoUpdateTopicsParamsWithTimeout(timeout time.Duration) *RepoUpdateTopicsParams {
var ()
return &RepoUpdateTopicsParams{
timeout: timeout,
}
} | [
-0.04200677573680878,
-0.2615063190460205,
0.5083374381065369,
-0.17951184511184692,
-0.44583526253700256,
0.6920856833457947,
-1.193113088607788,
0.07025457918643951,
-0.6354694962501526,
1.0115995407104492,
-0.17090091109275818,
-0.2728978991508484,
-0.4045373499393463,
-0.06347170472145... |
func NewRepoUpdateTopicsParamsWithContext(ctx context.Context) *RepoUpdateTopicsParams {
var ()
return &RepoUpdateTopicsParams{
Context: ctx,
}
} | [
-0.4877950847148895,
-0.2940739691257477,
0.5578463673591614,
-0.4392281472682953,
-0.16209936141967773,
1.0032012462615967,
-1.2106634378433228,
-0.7378569841384888,
-0.17972737550735474,
0.4057216942310333,
-0.46766436100006104,
-0.34267657995224,
-0.3254821002483368,
-0.5662398934364319... |
func NewRepoUpdateTopicsParamsWithHTTPClient(client *http.Client) *RepoUpdateTopicsParams {
var ()
return &RepoUpdateTopicsParams{
HTTPClient: client,
}
} | [
-0.4728504717350006,
-0.5103014707565308,
0.5724782943725586,
-0.37893280386924744,
-0.3696673810482025,
0.8041468858718872,
-0.4868186414241791,
-0.21834611892700195,
-0.7353987097740173,
0.05561022460460663,
-0.6906145811080933,
-0.5798441767692566,
-0.3021077811717987,
-0.44734650850296... |
func (o *RepoUpdateTopicsParams) WithTimeout(timeout time.Duration) *RepoUpdateTopicsParams {
o.SetTimeout(timeout)
return o
} | [
-0.19228632748126984,
-0.1202649250626564,
0.4617319703102112,
-0.637060284614563,
-0.4434388279914856,
0.6747621297836304,
-0.4543763995170593,
-0.149447500705719,
0.056697551161050797,
1.2848048210144043,
0.18229436874389648,
-0.32335129380226135,
0.464942067861557,
0.12485232949256897,
... |
func (o *RepoUpdateTopicsParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
} | [
-0.690959632396698,
-0.011480252258479595,
0.4458739757537842,
-0.617296576499939,
0.039748843759298325,
1.1539336442947388,
-0.588039755821228,
0.13290046155452728,
-0.4363868534564972,
1.2813161611557007,
-0.05225352942943573,
-0.3320072591304779,
-0.04480597749352455,
0.0975548923015594... |
func (o *RepoUpdateTopicsParams) WithContext(ctx context.Context) *RepoUpdateTopicsParams {
o.SetContext(ctx)
return o
} | [
-1.120428204536438,
-0.1384471207857132,
0.507457971572876,
-0.8127155303955078,
-0.49146270751953125,
0.8200217485427856,
-0.6016181707382202,
-0.8999088406562805,
0.4037865400314331,
0.8026435971260071,
0.06070056930184364,
-0.31290146708488464,
-0.07763181626796722,
-0.44558215141296387... |
func (o *RepoUpdateTopicsParams) SetContext(ctx context.Context) {
o.Context = ctx
} | [
-1.276559591293335,
-0.009629450738430023,
0.3334278464317322,
-0.5433926582336426,
0.09875695407390594,
1.037766456604004,
-0.5866626501083374,
-0.6651885509490967,
0.43119940161705017,
0.8221023082733154,
-0.163853257894516,
-0.1750498116016388,
-0.4358826279640198,
-0.19196006655693054,... |
func (o *RepoUpdateTopicsParams) WithHTTPClient(client *http.Client) *RepoUpdateTopicsParams {
o.SetHTTPClient(client)
return o
} | [
-0.5219249129295349,
-0.6656125783920288,
0.503071665763855,
-1.0328282117843628,
-0.2293669581413269,
0.632685124874115,
0.11954342573881149,
-0.6983144879341125,
-0.3090078830718994,
0.2280743271112442,
0.039983637630939484,
-0.45891037583351135,
0.5781695246696472,
-0.4746610224246979,
... |
func (o *RepoUpdateTopicsParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
} | [
-0.46944892406463623,
-0.42285165190696716,
0.3567153215408325,
-1.4202946424484253,
-0.333461731672287,
0.6244333386421204,
0.04387477785348892,
-0.5688960552215576,
-0.8179066777229309,
0.4587938189506531,
-0.38729462027549744,
-0.15721535682678223,
0.04762452840805054,
-0.61158633232116... |
func (o *RepoUpdateTopicsParams) WithBody(body *models.RepoTopicOptions) *RepoUpdateTopicsParams {
o.SetBody(body)
return o
} | [
-1.289850115776062,
-0.20171232521533966,
0.42812976241111755,
-0.8625002503395081,
0.3278912305831909,
0.5445320010185242,
-0.5163751840591431,
-1.1459280252456665,
0.6022672057151794,
0.8869052529335022,
-0.14914292097091675,
-0.8613865375518799,
0.008134240284562111,
-0.0991638153791427... |
func (o *RepoUpdateTopicsParams) SetBody(body *models.RepoTopicOptions) {
o.Body = body
} | [
-1.5312418937683105,
-0.2169152796268463,
0.2567293643951416,
-0.6307140588760376,
0.5901040434837341,
0.8606073260307312,
-0.5648910403251648,
-0.8985267281532288,
0.3417244255542755,
0.9228953719139099,
-0.5884291529655457,
-0.4826231598854065,
-0.569002628326416,
0.35417112708091736,
... |
func (o *RepoUpdateTopicsParams) WithOwner(owner string) *RepoUpdateTopicsParams {
o.SetOwner(owner)
return o
} | [
-0.8245689868927002,
-0.30611419677734375,
0.33162131905555725,
0.24691922962665558,
-0.479997456073761,
0.6279608607292175,
0.3391515910625458,
-0.8228577971458435,
-0.11972243338823318,
0.00451994501054287,
0.15114808082580566,
-0.6283605694770813,
0.4381515085697174,
0.00082711380673572... |
func (o *RepoUpdateTopicsParams) SetOwner(owner string) {
o.Owner = owner
} | [
-1.071302056312561,
-0.521757960319519,
0.263040155172348,
0.5927812457084656,
-0.39701545238494873,
0.851220428943634,
0.21848028898239136,
-0.7685048580169678,
-0.39876434206962585,
0.07612428814172745,
-0.24156248569488525,
-0.46161437034606934,
-0.2759323716163635,
0.037302710115909576... |
func (o *RepoUpdateTopicsParams) WithRepo(repo string) *RepoUpdateTopicsParams {
o.SetRepo(repo)
return o
} | [
-0.7133935689926147,
0.055557847023010254,
0.45403191447257996,
-0.22560939192771912,
-0.3320094048976898,
0.2166202813386917,
-0.05234425887465477,
-0.16341866552829742,
-0.23380832374095917,
0.16089944541454315,
-0.08258762210607529,
-0.9493877291679382,
0.978703498840332,
-0.17724145948... |
func (o *RepoUpdateTopicsParams) SetRepo(repo string) {
o.Repo = repo
} | [
-0.7504534125328064,
-0.12541978061199188,
0.4025641679763794,
0.17951668798923492,
-0.3631633222103119,
0.48151421546936035,
-0.10770227015018463,
0.1453872174024582,
-0.32952141761779785,
0.09533649682998657,
-0.36224016547203064,
-0.7931451797485352,
0.23195266723632812,
-0.138182550668... |
func (o *RepoUpdateTopicsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.Body != nil {
if err := r.SetBodyParam(o.Body); err != nil {
return err
}
}
// path param owner
if err := r.SetPathPa... | [
-1.3019500970840454,
-0.16774369776248932,
0.8472121357917786,
-0.6668885946273804,
0.8893919587135315,
0.35061001777648926,
0.5592000484466553,
-0.26824119687080383,
-0.5368872284889221,
0.5754764080047607,
0.28314903378486633,
-0.18402232229709625,
-0.4143076539039612,
0.0171870272606611... |
func testabc(a,b int){
} | [
1.0840413570404053,
-1.0777573585510254,
0.4482881724834442,
0.4413638412952423,
0.4818575382232666,
-0.02628248743712902,
1.0760928392410278,
-0.9434387683868408,
0.07665518671274185,
-0.6419203877449036,
0.5913808941841125,
1.0054864883422852,
0.5756009221076965,
-0.718243420124054,
-0... |
func NewVolumeUploadFromReader(streamSrc io.ReadCloser, connDst *libvirt.Connect, volDst *libvirt.StorageVol) (instance *VolumeUpload, err error) {
streamDst, err := connDst.NewStream(0)
if err != nil {
return nil, err
}
err = volDst.Upload(streamDst, 0, 0, 0)
if err != nil {
return nil, err
}
instance = &... | [
0.361570805311203,
-1.0221885442733765,
0.483982652425766,
-0.5675442218780518,
-0.6287373900413513,
-0.046608928591012955,
-0.6835017204284668,
0.14745615422725677,
-0.09355822950601578,
0.8434908390045166,
0.2179594337940216,
-0.1274738758802414,
-0.25736016035079956,
-0.5111603736877441... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.