text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (u *User) SetMBTI(mbti string) {
u.MBTI = mbti
} | [
0.2610046863555908,
-0.41717529296875,
-0.22326646745204926,
0.781613826751709,
-0.38629043102264404,
1.6665291786193848,
-0.06042509526014328,
-0.6514374017715454,
-0.22112059593200684,
0.2881415784358978,
-1.167975664138794,
0.6766740679740906,
-0.9089564085006714,
-0.016131579875946045,... |
func (u *User) SetSex(sex string) {
u.Sex = sex
} | [
-0.4443431794643402,
1.0040282011032104,
0.04463762044906616,
1.4597711563110352,
-1.3513315916061401,
0.6590213179588318,
-0.6720208525657654,
0.677920937538147,
0.547865092754364,
-1.0721772909164429,
-1.819139838218689,
0.894524097442627,
0.12302058190107346,
0.1689063310623169,
0.255... |
func (u *User) SetInterest(interest string) {
u.Interest = interest
} | [
0.5034604668617249,
0.040867168456315994,
0.0431491993367672,
0.13772869110107422,
0.30914273858070374,
1.25770902633667,
-0.2752498686313629,
-0.5105795860290527,
-0.08589921146631241,
-0.09799563139677048,
-0.9270867705345154,
0.029453180730342865,
-1.2414993047714233,
-0.584787964820861... |
func (u *User) SetHeight(height int) {
u.Height = height
u.inches = 12*(height/100) + height%100
} | [
-0.07994542270898819,
0.9253643155097961,
0.33336034417152405,
0.6726152896881104,
-0.7097303867340088,
0.8111971020698547,
0.6812407970428467,
0.0768028125166893,
-0.13741198182106018,
-0.45093175768852234,
-1.0397090911865234,
-0.196900874376297,
0.3288642466068268,
-0.36142411828041077,... |
func (u *User) InchHeight() int {
return u.inches
} | [
-0.0972752571105957,
0.6969625353813171,
0.32168054580688477,
0.8997353911399841,
-0.9780235290527344,
0.8741003274917603,
0.5995275378227234,
-0.03867071866989136,
-0.47720518708229065,
0.23745401203632355,
-0.9681851267814636,
0.05391014367341995,
-1.3905885219573975,
-0.6857402324676514... |
func (u *User) SetAge(age int) {
u.Age = age
u.legal = age >= 18
u.twentyOne = age >= 21
} | [
-0.8941856622695923,
0.41951513290405273,
0.39224737882614136,
0.5061976313591003,
-0.3285009562969208,
0.8911520838737488,
0.11329922825098038,
0.3790968656539917,
-0.6013464331626892,
0.19899147748947144,
-0.8622276782989502,
-0.23245026171207428,
-1.120295524597168,
0.7417839765548706,
... |
func RegisterReporterServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
conn, err := grpc.Dial(endpoint, opts...)
if err != nil {
return err
}
defer func() {
if err != nil {
if cerr := conn.Close(); cerr != nil {
grpclog.Printf("F... | [
0.2745251953601837,
-0.2038595825433731,
0.9268852472305298,
0.5559085011482239,
0.34455743432044983,
0.416350781917572,
-0.13416311144828796,
-0.6450352072715759,
-0.746526300907135,
-0.17012275755405426,
0.7273382544517517,
-0.25960808992385864,
-1.3156399726867676,
-0.42672958970069885,... |
func RegisterReporterServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
client := NewReporterServiceClient(conn)
mux.Handle("POST", pattern_ReporterService_RegisterState_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.W... | [
-0.13108886778354645,
0.18060354888439178,
0.7678839564323425,
-0.42213788628578186,
0.21858686208724976,
0.3191419541835785,
0.5652264356613159,
-0.13805070519447327,
-0.7441453337669373,
-0.36935266852378845,
0.0724162757396698,
0.062034398317337036,
-0.760225236415863,
0.372920572757720... |
func NewQQwry(filePath string) (*QQwry, error) {
var fileData []byte
_, err := os.Stat(filePath)
if err != nil && os.IsNotExist(err) {
log.Println("文件不存在,尝试从网络获取最新纯真 IP 库")
fileData, err = download.Download(filePath, DownloadUrls...)
if err != nil {
return nil, err
}
} else {
fileBase, err := os.OpenF... | [
-0.2790592610836029,
-1.047257900238037,
1.1442209482192993,
-0.5292866826057434,
-0.7904658317565918,
-0.4839482009410858,
-0.7276501655578613,
-0.6648142337799072,
-0.8178750276565552,
0.247222438454628,
0.2139406055212021,
-0.3521653115749359,
-0.46362975239753723,
0.1685190498828888,
... |
func (o *CreateClusterFirmwareUpgradeItemReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewCreateClusterFirmwareUpgradeItemOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
retur... | [
-0.3014134168624878,
-0.5348109602928162,
0.4989824593067169,
1.283605933189392,
0.33311203122138977,
-0.7629651427268982,
0.5260261297225952,
-0.4611545205116272,
-0.016416791826486588,
0.3710762560367584,
0.24598151445388794,
-0.9831529259681702,
-1.1778124570846558,
0.5575119853019714,
... |
func NewCreateClusterFirmwareUpgradeItemOK() *CreateClusterFirmwareUpgradeItemOK {
return &CreateClusterFirmwareUpgradeItemOK{}
} | [
-0.10314170271158218,
0.36930710077285767,
0.16212929785251617,
1.3997759819030762,
-0.2777286171913147,
-0.529322624206543,
0.6534619927406311,
-0.0302154291421175,
-0.9628065824508667,
0.38338762521743774,
-0.43932127952575684,
-0.87127685546875,
-0.4824947416782379,
0.49331235885620117,... |
func NewCreateClusterFirmwareUpgradeItemDefault(code int) *CreateClusterFirmwareUpgradeItemDefault {
return &CreateClusterFirmwareUpgradeItemDefault{
_statusCode: code,
}
} | [
0.34235313534736633,
0.07324235886335373,
0.07811988890171051,
1.0349903106689453,
1.0049717426300049,
-0.3168339431285858,
0.3375113010406494,
0.30634769797325134,
-0.6716721057891846,
0.403297483921051,
-0.8527587056159973,
-0.6778091788291931,
-1.3162611722946167,
0.8775308132171631,
... |
func (o *CreateClusterFirmwareUpgradeItemDefault) Code() int {
return o._statusCode
} | [
-0.14304418861865997,
0.7283642292022705,
0.027172544971108437,
1.5316226482391357,
0.9959675073623657,
-0.17149145901203156,
-0.004229772370308638,
0.4969668388366699,
-0.804777204990387,
0.1356610655784607,
-0.5630662441253662,
-1.0567739009857178,
-0.9384780526161194,
1.0394278764724731... |
func New(t testing.TB) *T {
return &T{t}
} | [
0.0996360257267952,
-0.7096981406211853,
-0.08002641052007675,
-0.2852828800678253,
-0.4841569662094116,
0.19679464399814606,
0.0009614700102247298,
-0.6802219748497009,
-0.45402783155441284,
0.22701267898082733,
-0.5985409617424011,
-0.056938063353300095,
0.622538685798645,
-0.17027744650... |
func (t *T) Equal(got, want interface{}) bool {
t.Helper()
eq := cmp.Equal(got, want)
if eq {
t.Logf("%s: got %+v", caller(), got)
return eq
}
gotStr, gotStrOK := got.(string)
wantStr, wantStrOK := want.(string)
if gotStrOK && wantStrOK {
diff := difflib.UnifiedDiff{
A: difflib.SplitLines(gotSt... | [
-0.8654183745384216,
-0.33567750453948975,
0.9213846921920776,
-1.0166071653366089,
0.21719320118427277,
0.1985810250043869,
0.2812378704547882,
-0.3551209270954132,
-0.5551843047142029,
0.055168766528367996,
-0.6130335927009583,
0.7337010502815247,
-0.02611161209642887,
0.6140880584716797... |
func (t *T) NotEqual(got, notWant interface{}) bool {
t.Helper()
notEqual := !cmp.Equal(got, notWant)
if notEqual {
t.Logf("%s: got %+v, not %+v", caller(), got, notWant)
} else {
t.Errorf("%s: got %+v, want not %+v", caller(), got, notWant)
}
return notEqual
} | [
-0.9559051394462585,
-0.3287626802921295,
0.6866909265518188,
-0.32366815209388733,
0.09923086315393448,
0.41712215542793274,
-0.765579104423523,
-1.1345165967941284,
-1.0361653566360474,
0.7078894376754761,
-0.5919440388679504,
0.31106895208358765,
-0.6740663647651672,
0.8503414988517761,... |
func displayDumpDiff(v1, v2 interface{}) bool {
// If the types are different, display a dump diff.
t1 := reflect.TypeOf(v1)
t2 := reflect.TypeOf(v2)
if t1 != t2 {
return true
}
// If the type of the values is a simple primitive type, don't display a
// dump diff.
switch t1.Kind() {
case reflect.Bool,
ref... | [
-1.0866546630859375,
0.24955280125141144,
0.820131778717041,
-0.5634966492652893,
-0.5863534212112427,
0.6238745450973511,
0.43003877997398376,
-1.4318777322769165,
0.08470294624567032,
0.13103125989437103,
0.13717015087604523,
0.9326552748680115,
-0.5053563714027405,
0.5791831016540527,
... |
func NewSellerUsecase(srr models.SellerRepository) models.SellerUsecase {
return &sellerUsecase{Repo: srr}
} | [
-1.1297317743301392,
0.06556791812181473,
-0.12379433214664459,
0.44774341583251953,
-0.19889876246452332,
-1.1197963953018188,
0.25598588585853577,
0.33371663093566895,
1.1891733407974243,
1.5262360572814941,
-0.34761762619018555,
-0.44753769040107727,
0.2837885320186615,
0.65764695405960... |
func NewSubscription(ctx *pulumi.Context,
name string, args *SubscriptionArgs, opts ...pulumi.ResourceOption) (*Subscription, error) {
if args == nil {
args = &SubscriptionArgs{}
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Subscription
err := ctx.RegisterResource("google-native:pubsub/v1beta1a:... | [
-0.029881006106734276,
0.0982675701379776,
0.4174348711967468,
0.2088935673236847,
0.1308876872062683,
-0.043868329375982285,
-0.20642337203025818,
-0.3876989483833313,
0.19767995178699493,
0.42427143454551697,
-0.4449392259120941,
-0.013409052044153214,
0.003316841321066022,
0.08582209795... |
func GetSubscription(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SubscriptionState, opts ...pulumi.ResourceOption) (*Subscription, error) {
var resource Subscription
err := ctx.ReadResource("google-native:pubsub/v1beta1a:Subscription", name, id, state, &resource, opts...)
if err != nil {
return ni... | [
0.45478805899620056,
-0.16663289070129395,
0.23577266931533813,
0.1591634601354599,
0.23155029118061066,
-0.19842466711997986,
-0.5075685977935791,
-0.541545569896698,
0.9760029315948486,
-0.14984610676765442,
0.10495055466890335,
0.8902371525764465,
0.23384839296340942,
-1.010361313819885... |
func (o SubscriptionOutput) AckDeadlineSeconds() pulumi.IntOutput {
return o.ApplyT(func(v *Subscription) pulumi.IntOutput { return v.AckDeadlineSeconds }).(pulumi.IntOutput)
} | [
1.3226993083953857,
0.2903045415878296,
0.6290678381919861,
0.004865631926804781,
-0.28947967290878296,
0.17153258621692657,
-0.16182394325733185,
0.27057331800460815,
0.3085424602031708,
-0.5261488556861877,
-0.07936014235019684,
1.1759581565856934,
1.5311753749847412,
-0.7897111773490906... |
func (o SubscriptionOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Subscription) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
} | [
0.7340694069862366,
-0.6974306702613831,
0.46154066920280457,
0.21254146099090576,
-0.8838688135147095,
-0.11521615833044052,
-0.25549113750457764,
-0.44605904817581177,
0.07983583211898804,
0.11275579035282135,
0.02503448724746704,
0.576413094997406,
1.145831823348999,
-1.2298485040664673... |
func (o SubscriptionOutput) PushConfig() PushConfigResponseOutput {
return o.ApplyT(func(v *Subscription) PushConfigResponseOutput { return v.PushConfig }).(PushConfigResponseOutput)
} | [
1.1153186559677124,
0.45702165365219116,
0.47650378942489624,
0.3823901116847992,
-0.40271326899528503,
-0.2918250560760498,
-0.16500669717788696,
0.024807840585708618,
0.5424458980560303,
0.30572885274887085,
-0.3914002776145935,
0.6425411105155945,
0.832024097442627,
-0.18868887424468994... |
func (o SubscriptionOutput) Topic() pulumi.StringOutput {
return o.ApplyT(func(v *Subscription) pulumi.StringOutput { return v.Topic }).(pulumi.StringOutput)
} | [
1.1741832494735718,
-0.13339556753635406,
0.23225659132003784,
0.13948458433151245,
-0.16560256481170654,
0.5763754844665527,
-0.6773939728736877,
-0.006502637639641762,
0.3239361345767975,
-0.5222194194793701,
1.4260733127593994,
0.5828461050987244,
1.2290247678756714,
-1.6647945642471313... |
func (c *Container) GetContainerPids() ([]string, error) {
if !c.batched {
c.lock.Lock()
defer c.lock.Unlock()
if err := c.syncContainer(); err != nil {
return []string{}, errors.Wrapf(err, "error updating container %s state", c.ID())
}
}
return c.getContainerPids()
} | [
-0.3823370635509491,
-0.3291451334953308,
0.5974718928337097,
0.6323113441467285,
0.3301691710948944,
0.37750619649887085,
-0.2122783064842224,
-0.5331300497055054,
0.19146975874900818,
0.8628512024879456,
-0.2759367525577545,
0.6759700179100037,
-0.8298465609550476,
0.3109191656112671,
... |
func (c *Container) getContainerPids() ([]string, error) {
cgroupPath, err := c.CGroupPath()
if err != nil {
return nil, err
}
taskFile := filepath.Join("/sys/fs/cgroup/pids", cgroupPath, "tasks")
logrus.Debug("reading pids from ", taskFile)
content, err := ioutil.ReadFile(taskFile)
if err != nil {
return... | [
0.03305389732122421,
-0.3649454712867737,
0.5082350373268127,
0.048237621784210205,
-0.10421227663755417,
0.6020582914352417,
0.4800461232662201,
0.20099212229251862,
-0.6376427412033081,
0.6831023693084717,
-0.2017597109079361,
0.04885632172226906,
-0.7080422639846802,
0.08942704647779465... |
func NewImagePruneParams() *ImagePruneParams {
var ()
return &ImagePruneParams{
timeout: cr.DefaultTimeout,
}
} | [
-0.2942841649055481,
-0.005517351906746626,
0.20193719863891602,
0.7542463541030884,
-0.3264511823654175,
-0.9128557443618774,
-0.7605555057525635,
-0.0647750198841095,
-0.7330698370933533,
0.9457346200942993,
-0.5242277979850769,
-0.2386399507522583,
-0.5534979701042175,
0.290328651666641... |
func NewImagePruneParamsWithTimeout(timeout time.Duration) *ImagePruneParams {
var ()
return &ImagePruneParams{
timeout: timeout,
}
} | [
0.21550513803958893,
-0.385938435792923,
0.34555912017822266,
0.6142722368240356,
-0.3455747365951538,
0.061847079545259476,
-1.6306440830230713,
-0.13534308969974518,
-0.6961854696273804,
1.5205671787261963,
-0.13903623819351196,
0.06965095549821854,
-0.3106391131877899,
0.632800519466400... |
func NewImagePruneParamsWithContext(ctx context.Context) *ImagePruneParams {
var ()
return &ImagePruneParams{
Context: ctx,
}
} | [
0.09819931536912918,
-0.1702793389558792,
0.44757455587387085,
0.21938909590244293,
-0.37765318155288696,
-0.02549031190574169,
-1.4997469186782837,
-0.9696593284606934,
-0.02573614940047264,
1.0580557584762573,
-0.23563359677791595,
-0.4409852623939514,
-0.12548382580280304,
0.04769786074... |
func NewImagePruneParamsWithHTTPClient(client *http.Client) *ImagePruneParams {
var ()
return &ImagePruneParams{
HTTPClient: client,
}
} | [
-0.11937075108289719,
-0.49424493312835693,
0.4717905521392822,
0.009470975026488304,
-0.17960773408412933,
-0.11465736478567123,
-0.6242197751998901,
-0.13391125202178955,
-0.7007891535758972,
0.46580231189727783,
-0.6242173910140991,
-0.5819627046585083,
-0.22249026596546173,
-0.34823462... |
func (o *ImagePruneParams) WithTimeout(timeout time.Duration) *ImagePruneParams {
o.SetTimeout(timeout)
return o
} | [
0.2805834412574768,
-0.023368025198578835,
0.2258378565311432,
-0.03749433904886246,
0.1604124903678894,
-0.3379513919353485,
-0.416765034198761,
-0.02985137142241001,
0.24813628196716309,
1.281116247177124,
-0.2735505998134613,
0.24815869331359863,
0.2711678147315979,
0.709587037563324,
... |
func (o *ImagePruneParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
} | [
-0.21133169531822205,
0.41007423400878906,
0.22609160840511322,
-0.01673729158937931,
0.6814131736755371,
0.024336863309144974,
-0.31210893392562866,
0.26923099160194397,
-0.22955383360385895,
1.0973247289657593,
-0.4595356583595276,
0.7268661856651306,
-0.4145498275756836,
0.7647878527641... |
func (o *ImagePruneParams) WithContext(ctx context.Context) *ImagePruneParams {
o.SetContext(ctx)
return o
} | [
-0.4801214337348938,
0.08762402087450027,
0.37551674246788025,
-0.09572099894285202,
-0.09493254870176315,
-0.42507439851760864,
-0.45426344871520996,
-0.7906815409660339,
0.7191502451896667,
0.818392276763916,
-0.3344024121761322,
0.04569517448544502,
-0.2732345759868622,
0.13087718188762... |
func (o *ImagePruneParams) SetContext(ctx context.Context) {
o.Context = ctx
} | [
-0.8270587921142578,
0.5363643169403076,
0.2615037262439728,
0.08902063220739365,
0.5821871757507324,
-0.25722774863243103,
-0.3001491129398346,
-0.48859506845474243,
0.7269639372825623,
0.5907960534095764,
-0.5878075361251831,
0.6142645478248596,
-0.6517035365104675,
0.20095764100551605,
... |
func (o *ImagePruneParams) WithHTTPClient(client *http.Client) *ImagePruneParams {
o.SetHTTPClient(client)
return o
} | [
-0.1998186558485031,
-0.7091301679611206,
0.36907532811164856,
-0.5915457606315613,
0.03788287565112114,
-0.6099463105201721,
0.22567103803157806,
-0.5153427720069885,
-0.27634257078170776,
0.1967020183801651,
-0.4606354236602783,
0.044346608221530914,
0.3131960332393646,
-0.16971977055072... |
func (o *ImagePruneParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
} | [
-0.019079294055700302,
-0.34374576807022095,
0.3676570951938629,
-1.0738816261291504,
0.06879057735204697,
-0.6350926160812378,
0.35864144563674927,
-0.31108182668685913,
-0.5828927755355835,
-0.028392838314175606,
-0.6520923376083374,
0.6890309453010559,
-0.41562360525131226,
-0.296486407... |
func (o *ImagePruneParams) WithFilters(filters *string) *ImagePruneParams {
o.SetFilters(filters)
return o
} | [
-0.6029340624809265,
-0.22214268147945404,
0.02911427989602089,
-0.07671979069709778,
0.015895672142505646,
-1.3374720811843872,
-0.19137127697467804,
-1.0553479194641113,
0.41449669003486633,
0.5075442790985107,
-0.2646530866622925,
-0.23298430442810059,
-0.2162104845046997,
0.31215560436... |
func (o *ImagePruneParams) SetFilters(filters *string) {
o.Filters = filters
} | [
-1.4666752815246582,
0.09411091357469559,
0.05487619712948799,
-0.07154468446969986,
0.6200968027114868,
-0.7513740062713623,
-0.1114029735326767,
-0.8230521082878113,
-0.11371923983097076,
0.47512027621269226,
-0.9291626214981079,
0.4035525918006897,
-1.0880075693130493,
0.446394532918930... |
func (o *ImagePruneParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.Filters != nil {
// query param filters
var qrFilters string
if o.Filters != nil {
qrFilters = *o.Filters
}
qFilters := ... | [
-1.2992451190948486,
-0.05714314430952072,
0.8045584559440613,
-0.6657475829124451,
1.0343358516693115,
-0.816125750541687,
0.8928675055503845,
-0.2318999469280243,
-0.02837442047894001,
0.7948408126831055,
0.02422931045293808,
0.48281896114349365,
-0.2826137840747833,
0.24530071020126343,... |
func CreateContext(appToken, servicePublicKey, clientSecretKey, updateToken string) (*Context, error) {
if appToken == "" {
return nil, errors.New("app token is mandatory")
}
skVersion, sk, err := ParseVersionAndContent("SK", clientSecretKey)
if err != nil {
return nil, errors.Wrap(err, "invalid secret key")
... | [
0.26430463790893555,
-0.6027498245239258,
0.7788687944412231,
-0.0765705406665802,
-0.3656560778617859,
0.30846521258354187,
-1.1794759035110474,
0.1391908824443817,
0.2034435123205185,
0.6470399498939514,
0.37949338555336,
-0.1606023609638214,
-0.7080161571502686,
-0.16839134693145752,
... |
func ParseVersionAndContent(prefix, str string) (version uint32, content []byte, err error) {
parts := strings.Split(str, ".")
if len(parts) != 3 || parts[0] != prefix {
return 0, nil, errors.New("invalid string")
}
nVersion, err := strconv.Atoi(parts[1])
if err != nil {
return 0, nil, errors.Wrap(err, "inval... | [
-0.12546655535697937,
-1.083736777305603,
0.7631291747093201,
0.37810248136520386,
-1.2669308185577393,
-0.20691777765750885,
-0.10708386451005936,
0.18230144679546356,
0.2649044096469879,
0.9020068049430847,
-0.16212846338748932,
0.17985330522060394,
-0.4074515104293823,
-0.12798988819122... |
func (c *Client) RunDispatch() {
for {
time.Sleep(pollInterval)
c.SendRequests()
c.RecvResponses()
}
} | [
-0.24932444095611572,
-0.6409472823143005,
0.477091908454895,
-0.480108380317688,
-0.0998128280043602,
1.1980892419815063,
-0.15233245491981506,
0.14697182178497314,
0.02273518592119217,
-1.2180259227752686,
-0.3880690038204193,
0.007972180843353271,
-0.42103832960128784,
0.761582136154174... |
func SessionFromFlag() (bus.Session, error) {
if userName != "" && userToken == "" {
fmt.Println("Your token: ")
bytePassword, err := terminal.ReadPassword(int(syscall.Stdin))
if err != nil {
log.Fatalf("Token input error: %s", err)
}
userToken = string(bytePassword)
}
return qiloop.NewSession(session... | [
0.39811819791793823,
-0.3806382715702057,
0.29914790391921997,
0.8844329118728638,
-0.4443191587924957,
0.31717464327812195,
0.7107938528060913,
-0.6162468791007996,
0.07055003196001053,
-0.5078611373901367,
-0.2821958065032959,
-0.20716601610183716,
-1.112109899520874,
-0.2201904803514480... |
func ServerFromFlag(serviceName string, object bus.Actor) (bus.Server, error) {
session, err := SessionFromFlag()
if err != nil {
log.Fatalf("Failed to connect %s: %s", sessionURL, err)
}
if listenURL == "" {
listenURL = util.NewUnixAddr()
}
var auth bus.Authenticator = bus.Yes{}
if userName != "" {
pas... | [
-0.37203794717788696,
-0.604839563369751,
0.5633442997932434,
0.7028462886810303,
-0.02262449637055397,
0.3152751326560974,
0.37343159317970276,
-0.06336943805217743,
0.6627376079559326,
0.05233584716916084,
-0.5049281120300293,
0.5997530221939087,
-1.0186707973480225,
0.46961382031440735,... |
func NewHook(b BoltHook) (*BoltHook, error) {
boltDB, err := bolt.Open(b.DBLoc, 0600, nil)
if err != nil {
return nil, err
}
return &BoltHook{
DBLoc: b.DBLoc,
Bucket: b.Bucket,
Formatter: b.Formatter,
db: boltDB,
}, nil
} | [
0.21025747060775757,
-0.3423342704772949,
0.41341733932495117,
0.43869850039482117,
-0.2993507981300354,
0.6095414161682129,
0.4993521571159363,
-0.005333932116627693,
-0.20482446253299713,
0.11639513820409775,
-0.11471644788980484,
0.9946500658988953,
0.16285905241966248,
-0.5125876665115... |
func (b *BoltHook) Fire(e *logrus.Entry) error {
return b.db.Update(func(tx *bolt.Tx) error {
bucket, err := tx.CreateBucketIfNotExists([]byte(b.Bucket))
if err != nil {
return err
}
bytes, err := b.Formatter.Format(e)
if err != nil {
return err
}
bucket.Put([]byte(b.now()), bytes)
return ni... | [
-0.1714654415845871,
0.19820252060890198,
0.5726543664932251,
-0.038730066269636154,
1.1103013753890991,
0.24573026597499847,
-0.17882637679576874,
0.4062957465648651,
-0.8943676948547363,
0.03935087472200394,
-0.5968684554100037,
0.8793309926986694,
0.1229899451136589,
0.4168020784854889,... |
func (b *BoltHook) Levels() []logrus.Level {
return logrus.AllLevels
} | [
0.0065270112827420235,
-0.5672420263290405,
0.3592315912246704,
0.45995742082595825,
1.230116367340088,
1.1521672010421753,
-0.7487014532089233,
0.04885970801115036,
-0.5377069711685181,
-0.44372960925102234,
-0.007507823407649994,
1.0850030183792114,
-0.5429229140281677,
0.990610897541046... |
func (s CreateLocationS3Input) String() string {
return awsutil.Prettify(s)
} | [
0.3034878969192505,
-0.2122953236103058,
-0.014263303019106388,
-0.7729332447052002,
-0.5159116983413696,
1.561994194984436,
0.6532027125358582,
-0.5788894295692444,
0.6105563640594482,
-0.4173639416694641,
0.15594930946826935,
0.6887907981872559,
0.5455666780471802,
-0.7039285898208618,
... |
func (s *CreateLocationS3Input) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "CreateLocationS3Input"}
if s.S3BucketArn == nil {
invalidParams.Add(aws.NewErrParamRequired("S3BucketArn"))
}
if s.S3Config == nil {
invalidParams.Add(aws.NewErrParamRequired("S3Config"))
}
if s.S3Config != ni... | [
0.12640388309955597,
-0.11482284963130951,
0.5110707879066467,
-0.16167894005775452,
-0.08684514462947845,
0.7288559079170227,
-0.18196238577365875,
-0.29968348145484924,
-0.07288450002670288,
-0.17063741385936737,
0.2847142517566681,
-0.0058312141336500645,
-0.21061742305755615,
0.6699969... |
func (s CreateLocationS3Output) String() string {
return awsutil.Prettify(s)
} | [
0.7428209185600281,
-0.5450955629348755,
0.012367394752800465,
-0.6271206140518188,
-0.8061448931694031,
0.8034305572509766,
0.6919249296188354,
-0.5129913687705994,
0.1607774794101715,
-0.41825053095817566,
0.392900288105011,
0.3044756054878235,
0.6575804948806763,
-0.8927162289619446,
... |
func (r CreateLocationS3Request) Send(ctx context.Context) (*CreateLocationS3Response, error) {
r.Request.SetContext(ctx)
err := r.Request.Send()
if err != nil {
return nil, err
}
resp := &CreateLocationS3Response{
CreateLocationS3Output: r.Request.Data.(*CreateLocationS3Output),
response: &aw... | [
-0.714590311050415,
0.0646657720208168,
0.10894667357206345,
-0.05795031785964966,
-0.10336565971374512,
0.6670318841934204,
0.07137284427881241,
-0.5095531344413757,
0.7003526091575623,
-0.4354415535926819,
-0.08000541478395462,
0.08919898420572281,
-0.3418162167072296,
-0.514903247356414... |
func (r *CreateLocationS3Response) SDKResponseMetdata() *aws.Response {
return r.response
} | [
0.0826379805803299,
0.031283240765333176,
0.1454847902059555,
-0.622516393661499,
-0.17527039349079132,
1.111781120300293,
-0.6136592626571655,
-0.232300266623497,
1.4167827367782593,
-0.34474116563796997,
-0.3031606078147888,
-0.6528548002243042,
0.2602938413619995,
-1.2310206890106201,
... |
func NewSplitWriter(raw io.Writer, addtl ...io.Writer) SplitWriter {
return &splitWriter{primary: raw, secondary: addtl}
} | [
-0.7106795907020569,
0.18867827951908112,
0.20578467845916748,
0.5964822173118591,
-0.586378812789917,
-0.6539592146873474,
-0.15120980143547058,
0.298461377620697,
-0.34462037682533264,
-0.24071410298347473,
-0.823131263256073,
-0.7381174564361572,
0.1493259221315384,
0.10465998947620392,... |
func NewStorage(vol string) *Storage {
loc := vol
if vol[len(vol)-1:] != "/" {
loc = fmt.Sprintf("%s/", vol)
}
return &Storage{
loc,
}
} | [
-0.07950273156166077,
-0.853116512298584,
0.39550310373306274,
0.3803470730781555,
-0.5406244397163391,
-0.5796772241592407,
0.47980159521102905,
-0.9443457126617432,
0.24229510128498077,
0.11966919153928757,
0.33339181542396545,
-0.5944668650627136,
-0.37157994508743286,
0.066324107348918... |
func (s Storage) List(path string) ([]string, error) {
dir, err := s.fullPath(path)
if err != nil {
return []string{}, err
}
d, err := os.Open(dir)
if err != nil {
return []string{}, err
}
defer d.Close()
return d.Readdirnames(-1)
} | [
-0.6771278977394104,
-0.8092800974845886,
0.6849244832992554,
0.4235423803329468,
0.06243724003434181,
-0.6953033804893494,
-0.1353866457939148,
0.2497529685497284,
0.971409022808075,
0.45507195591926575,
-0.49369052052497864,
-0.06576686352491379,
0.33117514848709106,
0.38526007533073425,... |
func (s Storage) Walk(path string, callback func(path string)) error {
loc, err := s.fullPath(path)
if err != nil {
return err
}
slice := len(s.vol)
if s.vol[:2] == "./" {
slice -= 2
}
return godirwalk.Walk(loc, &godirwalk.Options{
Unsorted: true,
ErrorCallback: func(osPathname string, err error) god... | [
-0.7783200144767761,
0.47060900926589966,
0.7455782890319824,
0.24892233312129974,
-0.04479585215449333,
-0.06899601221084595,
1.6339575052261353,
-0.8902995586395264,
0.373990535736084,
-0.9618430733680725,
-0.2776390016078949,
-0.0961182713508606,
0.36317312717437744,
0.22434574365615845... |
func (s Storage) Create(path string) (io.ReadWriteCloser, error) {
loc, err := s.fullPath(path)
if err != nil {
return nil, err
}
dir, _ := filepath.Split(loc)
_, err = os.Stat(dir)
if err != nil && os.IsNotExist(err) {
err = os.MkdirAll(dir, 0766)
}
if err != nil {
return nil, err
}
return os.Open... | [
0.12186947464942932,
-0.3168676793575287,
0.7464355826377869,
0.2639293372631073,
-0.22615087032318115,
0.16235318779945374,
0.732642650604248,
-0.5985020995140076,
-0.7204312682151794,
-0.1281816065311432,
0.44081124663352966,
-1.028505563735962,
-0.004571374040096998,
0.267843633890152,
... |
func (s Storage) Get(path string) (io.ReadCloser, error) {
loc, err := s.fullPath(path)
if err != nil {
return nil, err
}
return os.Open(loc)
} | [
-0.5915797352790833,
-0.876449704170227,
0.8238296508789062,
-0.49978387355804443,
-0.35217979550361633,
-0.33477482199668884,
-0.23469017446041107,
-0.005376855842769146,
-0.7802150845527649,
-0.6152089238166809,
0.4834357798099518,
0.4236338436603546,
0.3983069956302643,
-0.5226196050643... |
func (s Storage) Put(path string, body io.Reader) error {
loc, err := s.fullPath(path)
if err != nil {
return err
}
dir, _ := filepath.Split(loc)
_, err = os.Stat(dir)
if err != nil && os.IsNotExist(err) {
err = os.MkdirAll(dir, 0766)
}
if err != nil {
return err
}
buff, err := ioutil.ReadAll(body)... | [
-0.11393462866544724,
0.16223634779453278,
0.8879389762878418,
-1.2495633363723755,
0.22785831987857819,
0.5258148312568665,
0.7791728973388672,
-0.01938151754438877,
-0.030454695224761963,
0.4512157738208771,
-0.30577558279037476,
0.06639180332422256,
-0.5657605528831482,
-0.2809157669544... |
func (s Storage) Link(path string, expire time.Duration) (string, error) {
return s.fullPath(path)
} | [
-0.25955888628959656,
0.08148590475320816,
0.3806456923484802,
0.542618989944458,
-0.09362686425447464,
0.2674098312854767,
0.4517982006072998,
-0.17237453162670135,
0.4539273679256439,
-0.31130293011665344,
-0.07371735572814941,
0.2078876495361328,
0.3132948875427246,
-0.5299891233444214,... |
func (s *Storage) Delete(path string) error {
loc, err := s.fullPath(path)
if err != nil {
return err
}
return os.Remove(loc)
} | [
0.7522156834602356,
-0.09688196331262589,
0.44522178173065186,
0.3743869662284851,
0.04709353670477867,
0.15850220620632172,
0.6226675510406494,
0.09072692692279816,
0.27408626675605774,
0.4928535223007202,
-0.3571024239063263,
-0.6601945161819458,
-0.1840812712907791,
-0.4804604947566986,... |
func (s Storage) Stat(path string) (storage.FileInfo, error) {
loc, err := s.fullPath(path)
if err != nil {
return nil, err
}
info, err := os.Stat(loc)
if err != nil {
return nil, err
}
return info, err
} | [
0.40440043807029724,
-0.7676434516906738,
0.5054787993431091,
-0.6828221678733826,
-0.0822506844997406,
-0.6928105354309082,
0.28481346368789673,
-0.5156434178352356,
-0.04894866421818733,
-0.6841537952423096,
-1.080877423286438,
-0.38918933272361755,
0.4512210190296173,
0.1288665682077407... |
func ensureSize(f *os.File, size int64) error {
// On systems which do not support fallocate, we merely truncate it.
// More robust alternatives would be to
// - Use posix_fallocate, or
// - explicitly fill the file with zeroes.
return f.Truncate(size)
} | [
0.9536479115486145,
0.3179207146167755,
0.5701983571052551,
0.18944139778614044,
0.3469570279121399,
0.06615354865789413,
-0.31876617670059204,
-0.4055916666984558,
0.1371367871761322,
-0.07195369899272919,
0.4491039216518402,
-0.6857331395149231,
-0.04122493788599968,
-0.06756798177957535... |
func (v *FlagshipVisitor) UpdateContext(newContext map[string]interface{}) (err error) {
defer func() {
if r := recover(); r != nil {
err = utils.HandleRecovered(r, visitorLogger)
}
}()
errs := validateContext(newContext)
if len(errs) > 0 {
errorStrings := []string{}
for _, e := range errs {
visitorL... | [
-1.4859576225280762,
-0.5894483923912048,
0.9593386054039001,
0.17461273074150085,
-0.7175015211105347,
-0.04931919649243355,
-0.23847156763076782,
0.27209848165512085,
0.9896162152290344,
0.63071209192276,
-0.02022484503686428,
0.24959389865398407,
-0.5581095218658447,
0.17514199018478394... |
func (v *FlagshipVisitor) UpdateContextKey(key string, value interface{}) (err error) {
defer func() {
if r := recover(); r != nil {
err = utils.HandleRecovered(r, visitorLogger)
}
}()
newContext := map[string]interface{}{}
for k, v := range v.Context {
newContext[k] = v
}
newContext[key] = value
err... | [
-1.375954031944275,
-0.6205649375915527,
0.6898552179336548,
0.018529197201132774,
-0.8536776900291443,
-0.3573029339313507,
-0.4189395308494568,
0.2522618770599365,
-0.08983723819255829,
1.3192638158798218,
0.015797775238752365,
0.7726851105690002,
-0.8463864326477051,
0.5086531639099121,... |
func (v *FlagshipVisitor) SynchronizeModifications() (err error) {
defer func() {
if r := recover(); r != nil {
err = utils.HandleRecovered(r, visitorLogger)
}
}()
if v.ID == "" {
err := errors.New("Visitor ID should not be empty")
visitorLogger.Error("Visitor ID is not set", err)
return err
}
visit... | [
-0.446585088968277,
-0.30182623863220215,
0.4330410659313202,
-0.5867271423339844,
0.2720600366592407,
-0.22620722651481628,
-0.019695725291967392,
-0.46577438712120056,
0.0460185706615448,
0.2879398763179779,
-0.40016669034957886,
0.36652952432632446,
-0.029253749176859856,
0.785366535186... |
func (v *FlagshipVisitor) GetAllModifications() (flagInfos map[string]decision.APIClientFlagInfos) {
return v.flagInfos
} | [
-0.314479261636734,
-0.0843794122338295,
0.2912423014640808,
0.03689665347337723,
-0.07716398686170578,
0.6680712103843689,
-0.6320235729217529,
-0.07915427535772324,
0.08800211548805237,
-0.7321207523345947,
-0.20878911018371582,
0.18408966064453125,
-0.20060303807258606,
1.40251231193542... |
func (v *FlagshipVisitor) GetModificationBool(key string, defaultValue bool, activate bool) (castVal bool, err error) {
defer func() {
if r := recover(); r != nil {
err = utils.HandleRecovered(r, visitorLogger)
}
}()
val, err := v.getModification(key, activate)
if err != nil {
visitorLogger.Debug(fmt.Spr... | [
-0.28259143233299255,
0.245676189661026,
0.7397815585136414,
0.5430070161819458,
0.18199743330478668,
-0.35108309984207153,
0.1375524252653122,
0.46710920333862305,
-0.2871380150318146,
1.0625908374786377,
0.22578230500221252,
0.56291663646698,
-0.6862882375717163,
0.1443246752023697,
0.... |
func (v *FlagshipVisitor) GetModificationString(key string, defaultValue string, activate bool) (castVal string, err error) {
defer func() {
if r := recover(); r != nil {
err = utils.HandleRecovered(r, visitorLogger)
}
}()
val, err := v.getModification(key, activate)
if err != nil {
visitorLogger.Debug(f... | [
-0.29477402567863464,
-0.19829760491847992,
0.5559192299842834,
0.33015960454940796,
-0.04843749478459358,
-0.45331934094429016,
0.12345337867736816,
-0.2785674035549164,
-0.24743406474590302,
1.058639407157898,
0.9134548306465149,
0.37647080421447754,
-0.93204665184021,
0.0541017539799213... |
func (v *FlagshipVisitor) GetModificationNumber(key string, defaultValue float64, activate bool) (castVal float64, err error) {
defer func() {
if r := recover(); r != nil {
err = utils.HandleRecovered(r, visitorLogger)
}
}()
val, err := v.getModification(key, activate)
if err != nil {
visitorLogger.Debug... | [
-0.4001084566116333,
0.5953409671783447,
0.6909277439117432,
0.9117128849029541,
0.23969927430152893,
-0.985784113407135,
0.5276302695274353,
0.6831620335578918,
-0.11351943761110306,
0.1498582363128662,
0.4342784881591797,
0.20505249500274658,
-0.7729935646057129,
1.2817425727844238,
0.... |
func (v *FlagshipVisitor) ActivateModification(key string) (err error) {
defer func() {
if r := recover(); r != nil {
err = utils.HandleRecovered(r, visitorLogger)
}
}()
_, err = v.getModification(key, true)
return err
} | [
-1.8161804676055908,
-0.13504941761493683,
0.5686431527137756,
0.17179879546165466,
0.14251263439655304,
-0.8473116755485535,
0.18708442151546478,
0.586711049079895,
0.785025417804718,
0.8096781373023987,
-0.029481349512934685,
0.5443866848945618,
-0.254879891872406,
0.19560058414936066,
... |
func (v *FlagshipVisitor) SendHit(hit tracking.HitInterface) (err error) {
defer func() {
if r := recover(); r != nil {
err = utils.HandleRecovered(r, visitorLogger)
}
}()
visitorLogger.Info(fmt.Sprintf("Sending hit for visitor with id : %s", v.ID))
ok, errs := v.batchHitProcessor.ProcessHit(v.ID, hit)
if... | [
-1.012447476387024,
0.7696074843406677,
0.6370359659194946,
-0.3518785238265991,
0.03398429602384567,
0.29057326912879944,
0.8462708592414856,
-0.35043197870254517,
-0.3722102642059326,
0.49709323048591614,
-0.002908153459429741,
0.16286037862300873,
-0.36643150448799133,
-0.19464027881622... |
func NewPluginRunner(plugin interface{}, opts ...RunnerOption) *cobra.Command {
k := &PluginRunner{
plugin: plugin,
config: func(*cobra.Command, []string) ([]byte, error) { return nil, nil },
generate: func() (resmap.ResMap, error) { return resmap.New(), nil },
transform: func(resmap.ResMap) error { ret... | [
-0.2707773447036743,
-1.101393699645996,
0.49171188473701477,
-0.0016061465721577406,
-0.545032262802124,
-0.88398277759552,
0.43526822328567505,
0.7035493850708008,
0.6195850372314453,
-0.8768173456192017,
-0.7943294644355774,
0.07791024446487427,
-0.4965003728866577,
0.044470902532339096... |
func (k *PluginRunner) preRun(cmd *cobra.Command, args []string) error {
lr := fLdr.RestrictionRootOnly
fSys := filesys.MakeFsOnDisk()
ldr, err := fLdr.NewLoader(lr, filepath.Clean(k.root), fSys)
if err != nil {
return err
}
v := validator.NewKustValidator()
uf := kunstruct.NewKunstructuredFactoryImpl()
var... | [
-0.11074714362621307,
-0.894870400428772,
0.7072051167488098,
0.04507501423358917,
0.2736108899116516,
-0.2717510461807251,
0.7887542843818665,
0.7903349995613098,
0.025429964065551758,
-0.6652480363845825,
-0.4919280409812927,
-0.057514488697052,
-0.363827645778656,
0.9250052571296692,
... |
func (k *PluginRunner) run(cmd *cobra.Command, _ []string) error {
m, err := k.generate()
if err != nil {
return err
}
if err := k.transform(m); err != nil {
return err
}
if err := k.print(cmd.OutOrStdout(), m); err != nil {
return err
}
return nil
} | [
-0.38600581884384155,
-0.44366589188575745,
0.7270776033401489,
-0.003784269094467163,
0.0012325786519795656,
-0.2827870845794678,
0.594849705696106,
0.7021292448043823,
-0.4885806739330292,
-0.026422806084156036,
-1.0624290704727173,
0.8378848433494568,
-0.5635942220687866,
0.328556180000... |
func asYaml(w io.Writer, m resmap.ResMap) error {
b, err := m.AsYaml()
if err != nil {
return err
}
_, err = w.Write(b)
return err
} | [
0.489949107170105,
-0.8657331466674805,
0.5204278230667114,
-0.2464791238307953,
-0.31884485483169556,
-0.10658848285675049,
1.0930124521255493,
-0.1454736441373825,
0.27997249364852905,
-0.21635158360004425,
0.019625840708613396,
-0.621112048625946,
0.5985139608383179,
-0.4920052886009216... |
func (k *PluginRunner) postRun(*cobra.Command, []string) error {
return k.h.Loader().Cleanup()
} | [
-0.17120972275733948,
-1.0326480865478516,
0.1587127149105072,
-0.1201624646782875,
-0.22320355474948883,
0.07298856973648071,
0.502008855342865,
0.6753808259963989,
-0.34890016913414,
-0.308525413274765,
-0.8216846585273743,
-0.14894823729991913,
-1.141153335571289,
1.052415370941162,
0... |
func (k *PluginRunner) newResMapFromStdin() (resmap.ResMap, error) {
b, err := ioutil.ReadAll(k.cmd.InOrStdin())
if err != nil {
return nil, err
}
return k.h.ResmapFactory().NewResMapFromBytes(b)
} | [
0.2337096482515335,
-1.6015660762786865,
0.2940055727958679,
0.27117323875427246,
-0.39866161346435547,
-0.04102092608809471,
-0.23481079936027527,
-0.2228834629058838,
0.028263818472623825,
-0.786837100982666,
-0.6143575310707092,
-0.16399942338466644,
-0.20956602692604065,
0.114600688219... |
func (k *PluginRunner) addTransformerPlugin(t resmap.TransformerPlugin, config []byte) {
k.transform = combineTransformFunc(k.transform, func(m resmap.ResMap) error {
if err := t.Config(k.h, config); err != nil {
return err
}
return t.Transform(m)
})
} | [
-0.6853369474411011,
-0.7447072863578796,
0.5962588787078857,
-0.4621797800064087,
0.46301665902137756,
-0.5866526365280151,
0.35375431180000305,
0.8134544491767883,
0.349691778421402,
-0.36822202801704407,
-1.470516324043274,
-0.8622535467147827,
-0.13770698010921478,
0.5172364115715027,
... |
func combineTransformFunc(t1, t2 func(resmap.ResMap) error) func(resmap.ResMap) error {
if t1 == nil {
return t2
}
return func(m resmap.ResMap) error {
if err := t1(m); err != nil {
return err
}
return t2(m)
}
} | [
0.2654259502887726,
-0.6050168871879578,
0.6069316864013672,
-0.18639642000198364,
0.243904709815979,
-0.43605709075927734,
0.5253127813339233,
-0.14039304852485657,
-0.14751394093036652,
-0.09118270874023438,
-0.24516084790229797,
0.009297507815063,
0.7471615076065063,
-0.3041753470897674... |
func persistResourceOptions(m resmap.ResMap) error {
for _, r := range m.Resources() {
annotations := r.GetAnnotations()
if annotations == nil {
annotations = make(map[string]string)
}
if r.Behavior() != types.BehaviorUnspecified {
annotations["kustomize.config.k8s.io/behavior"] = r.Behavior().String()
... | [
0.26587384939193726,
-0.46135208010673523,
0.33512112498283386,
-0.24846597015857697,
0.7727030515670776,
-0.26279523968696594,
0.18273867666721344,
-0.41720446944236755,
0.6372172236442566,
0.469379186630249,
-0.41605719923973083,
-0.8680638074874878,
-0.773796796798706,
0.783149063587188... |
func WithConfigType(group, version, kind string) RunnerOption {
return func(k *PluginRunner) {
// Record the GVK information on the command
k.cmd.Use = kind + " FILE"
k.cmd.Short = fmt.Sprintf("Executable plugin for the %s kind", kind)
k.cmd.Hidden = true
k.cmd.Annotations = map[string]string{
"group": ... | [
0.3289487659931183,
-0.4467909336090088,
0.6422777771949768,
0.18822994828224182,
0.4367158114910126,
-0.9408135414123535,
-0.21296508610248566,
0.16764777898788452,
-0.36225834488868713,
0.6438958048820496,
-0.38066422939300537,
-0.15183603763580322,
-0.109688900411129,
0.9389784932136536... |
func WithPreRunE(preRunE func(cmd *cobra.Command, args []string) error) RunnerOption {
return func(k *PluginRunner) {
k.cmd.PreRunE = func(cmd *cobra.Command, args []string) error {
if err := preRunE(cmd, args); err != nil {
return err
}
// Explicitly call through to the default implementation to invok... | [
0.23095464706420898,
-0.13353131711483002,
0.6565845608711243,
-0.11314484477043152,
0.3797436058521271,
-1.0355342626571655,
0.47548067569732666,
0.35640808939933777,
-0.4210517704486847,
0.1069146916270256,
-0.3745456337928772,
-0.6678574681282043,
-0.5631800293922424,
0.5055155158042908... |
func WithPrinter(p func(io.Writer, resmap.ResMap) error) RunnerOption {
return func(k *PluginRunner) {
k.print = p
}
} | [
0.22176766395568848,
-1.2642372846603394,
0.3882908225059509,
-0.24459849298000336,
-0.5473127365112305,
-0.36293306946754456,
0.852961540222168,
-0.4586983919143677,
0.5508647561073303,
-0.8206966519355774,
0.19461941719055176,
-0.7688490748405457,
0.25958889722824097,
-0.0344924516975879... |
func (*Sweat) Descriptor() ([]byte, []int) {
return file_src_proto_sweatmgr_sweat_proto_rawDescGZIP(), []int{0}
} | [
-1.393212914466858,
0.6331356167793274,
0.3499574661254883,
-0.2967233657836914,
-0.37350669503211975,
0.8133466839790344,
1.0203531980514526,
-0.48969730734825134,
-0.19207072257995605,
-1.027718424797058,
-0.9583501219749451,
1.3498878479003906,
0.36483728885650635,
1.4956691265106201,
... |
func (*SweatStatsRequest) Descriptor() ([]byte, []int) {
return file_src_proto_sweatmgr_sweat_proto_rawDescGZIP(), []int{1}
} | [
-0.9434037804603577,
0.7914280295372009,
0.14999690651893616,
-0.5973010063171387,
-0.1315343976020813,
0.18051408231258392,
0.6827434301376343,
-0.2237188071012497,
-0.351582407951355,
-1.3217874765396118,
0.18264959752559662,
0.5427394509315491,
0.49491849541664124,
1.603108286857605,
... |
func (*SweatStatsResponse) Descriptor() ([]byte, []int) {
return file_src_proto_sweatmgr_sweat_proto_rawDescGZIP(), []int{2}
} | [
0.08165298402309418,
0.6962065696716309,
-0.20166176557540894,
-0.4963102340698242,
0.007041988894343376,
-0.2087455540895462,
1.112782597541809,
-0.42293718457221985,
-0.30486783385276794,
-0.7456488609313965,
-0.7478264570236206,
-0.4695558547973633,
-0.21363912522792816,
0.6154904961585... |
func NewVerifier(
svcJWKSet jwkservices.SetService,
tracer tlog.Tracer,
issuers ...string,
) (*Verifier, error) {
if tracer == nil {
tracer = tlog.NewTracerNop()
}
jwkset, err := svcJWKSet.GetCerts(tracer)
if err != nil {
return nil, err
}
result := &Verifier{
issuers,
make(map[string]*Cache, 0),
}
... | [
-0.2855488359928131,
-0.08079440891742706,
0.2814705967903137,
0.08033201843500137,
-1.2109867334365845,
-0.30865687131881714,
-0.2778662443161011,
-0.9029721021652222,
0.1471688598394394,
0.4192066192626953,
-0.5408167243003845,
0.005638536065816879,
-0.14544880390167236,
0.90376317501068... |
func (v *Verifier) Verify(
rawtoken string,
header jws.Header,
payload ClaimsSecure,
) (*jws.SignedToken, error) {
token, err := jws.DecodeAndValidate(
rawtoken, header, payload,
func(header jws.Header) (interface{}, error) {
var key *Cache
var ok bool
if key, ok = v.keys[header.GetID()]; !ok {
re... | [
0.5122102499008179,
-0.23104803264141083,
0.5719648003578186,
0.29223009943962097,
-0.4356270134449005,
-0.2922624945640564,
-0.842379629611969,
-0.5702571272850037,
0.2511615455150604,
-0.24124100804328918,
-0.8825401067733765,
1.0587663650512695,
0.35975170135498047,
0.24422034621238708,... |
func New(logger fxevent.Logger, clock fxclock.Clock) *Lifecycle {
return &Lifecycle{logger: logger, clock: clock}
} | [
1.0075937509536743,
-0.5730188488960266,
0.29723140597343445,
-0.7194643616676331,
-1.0051711797714233,
-0.15781055390834808,
-1.0103448629379272,
0.02133302390575409,
-0.08423986285924911,
-0.25545960664749146,
-0.5188642740249634,
0.2522375285625458,
0.8577634692192078,
0.263891220092773... |
func (l *Lifecycle) Append(hook Hook) {
// Save the caller's stack frame to report file/line number.
if f := fxreflect.CallerStack(2, 0); len(f) > 0 {
hook.callerFrame = f[0]
}
l.hooks = append(l.hooks, hook)
} | [
0.0031050294637680054,
0.7175531387329102,
0.2634349465370178,
0.25669336318969727,
0.521140992641449,
0.1273285448551178,
-0.016556421294808388,
0.19220617413520813,
-0.030361294746398926,
-0.5707467198371887,
-0.5915054678916931,
-0.05602876469492912,
-0.4749392569065094,
1.1877260208129... |
func (l *Lifecycle) Start(ctx context.Context) error {
l.mu.Lock()
l.startRecords = make(HookRecords, 0, len(l.hooks))
l.mu.Unlock()
for _, hook := range l.hooks {
if hook.OnStart != nil {
l.mu.Lock()
l.runningHook = hook
l.mu.Unlock()
runtime, err := l.runStartHook(ctx, hook)
if err != nil {
... | [
-0.016912583261728287,
-0.16744723916053772,
0.3260330557823181,
-0.07952197641134262,
0.7200284600257874,
-0.05066608265042305,
0.6054410934448242,
0.2552661597728729,
-0.5344732999801636,
0.06277181208133698,
-0.1439329832792282,
0.331343412399292,
-0.3972788155078888,
0.8814709782600403... |
func (l *Lifecycle) Stop(ctx context.Context) error {
l.mu.Lock()
l.stopRecords = make(HookRecords, 0, l.numStarted)
l.mu.Unlock()
// Run backward from last successful OnStart.
var errs []error
for ; l.numStarted > 0; l.numStarted-- {
hook := l.hooks[l.numStarted-1]
if hook.OnStop == nil {
continue
}
... | [
-0.9054098129272461,
-0.1863066852092743,
0.6271849870681763,
-0.1360546350479126,
0.3739263713359833,
-0.04523611068725586,
0.41342175006866455,
-0.19196149706840515,
-0.33571767807006836,
0.042458675801754,
-0.3058605492115021,
-0.16137991845607758,
-0.3551250696182251,
0.090107642114162... |
func (l *Lifecycle) StartHookRecords() HookRecords {
l.mu.Lock()
defer l.mu.Unlock()
r := make(HookRecords, len(l.startRecords))
copy(r, l.startRecords)
return r
} | [
0.27969956398010254,
0.15202277898788452,
0.38990870118141174,
0.25674495100975037,
0.12055285274982452,
0.6108934283256531,
0.3866758942604065,
0.4339379370212555,
-0.07974769175052643,
0.09877462685108185,
0.029613420367240906,
0.7754661440849304,
-0.9111757874488831,
0.14205676317214966... |
func (l *Lifecycle) StopHookRecords() HookRecords {
l.mu.Lock()
defer l.mu.Unlock()
r := make(HookRecords, len(l.stopRecords))
copy(r, l.stopRecords)
return r
} | [
-0.8281717300415039,
-0.02171630971133709,
0.45955410599708557,
-0.48182952404022217,
0.021443083882331848,
0.8535634279251099,
0.2564195692539215,
0.34339404106140137,
-0.4083262085914612,
0.4945320785045624,
-0.35341891646385193,
0.10855710506439209,
-1.1436125040054321,
-0.2209184318780... |
func (l *Lifecycle) RunningHookCaller() string {
l.mu.Lock()
defer l.mu.Unlock()
return l.runningHook.callerFrame.Function
} | [
-0.5282343626022339,
-0.5944098830223083,
0.36772799491882324,
0.335101842880249,
-0.5428740978240967,
0.759829580783844,
0.1837449073791504,
-0.5336089134216309,
0.12083689868450165,
-0.10994499176740646,
-0.07278643548488617,
-0.5312750339508057,
-0.7975356578826904,
0.2527896463871002,
... |
func (rs HookRecords) String() string {
var b strings.Builder
for _, r := range rs {
fmt.Fprintf(&b, "%s took %v from %s",
fxreflect.FuncName(r.Func), r.Runtime, r.CallerFrame)
}
return b.String()
} | [
0.340512216091156,
-0.5970137715339661,
0.35952532291412354,
-0.6554005742073059,
0.4949832260608673,
0.15729555487632751,
0.9776703119277954,
-0.6328570246696472,
-1.404026746749878,
0.29104191064834595,
0.396942138671875,
0.8055825233459473,
-0.5278538465499878,
0.4667123854160309,
0.3... |
func (rs HookRecords) Format(w fmt.State, c rune) {
if !w.Flag('+') {
// Without %+v, fall back to String().
io.WriteString(w, rs.String())
return
}
for _, r := range rs {
fmt.Fprintf(w, "\n%s took %v from:\n\t%+v",
fxreflect.FuncName(r.Func),
r.Runtime,
r.CallerFrame)
}
fmt.Fprintf(w, "\n")
} | [
0.5191597938537598,
-0.43999651074409485,
0.5604368448257446,
-0.5843876600265503,
0.7205962538719177,
-0.23517164587974548,
0.49276286363601685,
-0.38469767570495605,
-0.7106099724769592,
0.2219393402338028,
1.2523236274719238,
0.7338030338287354,
0.2757126986980438,
1.1295942068099976,
... |
func (c *ClientCmd) runRevoke(cmd *cobra.Command) error {
log.Debug("Entered runRevoke")
var err error
client := lib.Client{
HomeDir: filepath.Dir(c.cfgFileName),
Config: c.clientCfg,
}
id, err := client.LoadMyIdentity()
if err != nil {
return err
}
// aki and serial # are required to revoke a certif... | [
-0.09833875298500061,
-0.2069743275642395,
0.8743758201599121,
0.4845280051231384,
-0.010626399889588356,
0.18738685548305511,
0.9836530089378357,
0.7326713800430298,
-0.43695250153541565,
0.17005208134651184,
-0.26101449131965637,
0.816680908203125,
-1.1376017332077026,
-0.429741442203521... |
func NewActivity(metadata *activity.Metadata) activity.Activity {
return &GPIOActivity{metadata: metadata}
} | [
0.6901747584342957,
-0.6658897399902344,
0.10183613002300262,
0.7509396076202393,
-0.18219251930713654,
0.36196771264076233,
0.43803271651268005,
-0.6057791113853455,
0.10176948457956314,
0.03302191197872162,
0.8195679783821106,
0.5430088043212891,
-0.42414435744285583,
-0.7348960041999817... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.