text
stringlengths
11
6.3k
embedding
listlengths
768
768
func YamlData(ctx hiera.ProviderContext) dgo.Map { pv := ctx.Option(`path`) if pv == nil { panic(api.MissingRequiredOption(`path`)) } path := pv.String() bs, err := ioutil.ReadFile(path) if err != nil { if os.IsNotExist(err) { return vf.Map() } panic(err) } v, err := yaml.Unmarshal(bs) if err != nil...
[ 0.2773604691028595, -0.2961306571960449, 0.5989287495613098, -0.36513540148735046, -0.19585509598255157, 0.6564223766326904, -0.46112850308418274, 0.22345717251300812, -0.06453929096460342, -0.035306546837091446, 0.3182557225227356, 1.1578913927078247, 0.6068317890167236, -0.21091589331626...
func NewClient(useOTE bool, apiKey, apiSecret string) (*Client, error) { var endpoint string if useOTE { endpoint = "https://api.ote-godaddy.com" } else { endpoint = "https://api.godaddy.com" } client := Client{ APIKey: apiKey, APISecret: apiSecret, APIEndPoint: endpoint, Client: &http.Cl...
[ -0.5414275527000427, 0.4648965895175934, 0.5426369309425354, -0.2345544695854187, 0.10917342454195023, -0.03281094506382942, -0.6850989460945129, -0.34297069907188416, -0.26114919781684875, 0.7911263108253479, 0.11611896753311157, 0.29202353954315186, -0.5683435201644897, -0.54226881265640...
func (c *Client) Get(url string, resType interface{}) error { return c.CallAPI("GET", url, nil, resType, true) }
[ -0.6917755007743835, 0.3669125437736511, 0.4122260808944702, 0.6259087920188904, 0.443203330039978, -0.013284742832183838, -0.7748288512229919, -0.6368700861930847, -0.10131563246250153, -0.3992934823036194, -0.5815219879150391, 1.2026063203811646, -1.2229429483413696, 0.023585259914398193...
func (c *Client) Patch(url string, reqBody, resType interface{}) error { return c.CallAPI("PATCH", url, reqBody, resType, true) }
[ -0.9760563969612122, 0.0644221380352974, 0.3003392815589905, 0.5531494617462158, -0.13542260229587555, 1.185936450958252, -0.6433830261230469, -0.09054571390151978, 0.8699669241905212, -0.5295559167861938, -0.3031754195690155, 1.1116889715194702, -1.310289740562439, 0.6195197701454163, 0...
func (c *Client) Post(url string, reqBody, resType interface{}) error { return c.CallAPI("POST", url, reqBody, resType, true) }
[ -0.45631933212280273, 0.49928173422813416, 0.2929345667362213, 1.31263267993927, 0.08276093751192093, 0.7055954933166504, -0.8919772505760193, -0.6554393768310547, 0.2506832480430603, -0.9869582056999207, -0.5682413578033447, 0.23153677582740784, -1.5485596656799316, 0.6431233882904053, ...
func (c *Client) Put(url string, reqBody, resType interface{}) error { return c.CallAPI("PUT", url, reqBody, resType, true) }
[ -0.7783513069152832, 0.5646641850471497, 0.3326255977153778, 0.29378727078437805, 0.3289342522621155, 0.9132526516914368, -0.27107304334640503, -0.3446202874183655, 0.24821333587169647, 0.0069658877328038216, -0.693604588508606, 0.8830286860466003, -1.7243400812149048, 0.2170446664094925, ...
func (c *Client) Delete(url string, resType interface{}) error { return c.CallAPI("DELETE", url, nil, resType, true) }
[ -0.18933503329753876, 0.501642644405365, 0.5032397508621216, 1.4265445470809937, 0.6041856408119202, 0.4439873993396759, -0.13647978007793427, -0.5725832581520081, 0.7065552473068237, -0.0482519194483757, -0.527965784072876, 0.563663899898529, -1.839931845664978, 0.06860647350549698, 0.6...
func (c *Client) GetWithContext(ctx context.Context, url string, resType interface{}) error { return c.CallAPIWithContext(ctx, "GET", url, nil, resType, true) }
[ -0.510006844997406, -0.034538619220256805, 0.7596535682678223, 0.7037482857704163, -0.5240722298622131, -0.2811857759952545, -1.1744157075881958, -1.7310775518417358, 0.5244788527488708, -0.3296375274658203, -0.8764174580574036, 0.9495744705200195, -0.9166152477264404, -0.4618648886680603,...
func (c *Client) PatchWithContext(ctx context.Context, url string, reqBody, resType interface{}) error { return c.CallAPIWithContext(ctx, "PATCH", url, reqBody, resType, true) }
[ -0.6239485740661621, -0.33066511154174805, 0.6744733452796936, 0.01413058489561081, -1.1229220628738403, 0.6837731599807739, -0.6596999168395996, -1.1582962274551392, 1.3711988925933838, 0.15812037885189056, -0.7523726224899292, 0.6602755784988403, -1.2422493696212769, 0.1907639354467392, ...
func (c *Client) PostWithContext(ctx context.Context, url string, reqBody, resType interface{}) error { return c.CallAPIWithContext(ctx, "POST", url, reqBody, resType, true) }
[ -0.7459865808486938, -0.11985133588314056, 0.5810502767562866, 0.8772648572921753, -0.7023912072181702, 0.28447267413139343, -1.2230145931243896, -1.4336915016174316, 0.6113620400428772, -0.06474356353282928, -1.2652287483215332, 0.25715723633766174, -1.4086003303527832, 0.3462314009666443...
func (c *Client) PutWithContext(ctx context.Context, url string, reqBody, resType interface{}) error { return c.CallAPIWithContext(ctx, "PUT", url, reqBody, resType, true) }
[ -0.5450141429901123, -0.01310545951128006, 0.69961017370224, -0.19862473011016846, -0.746330201625824, 0.2747032642364502, -0.5891886949539185, -1.4520137310028076, 0.6821684837341309, 0.6095219254493713, -0.9239962100982666, 0.6029136180877686, -1.367762804031372, -0.18415574729442596, ...
func (c *Client) DeleteWithContext(ctx context.Context, url string, resType interface{}) error { return c.CallAPIWithContext(ctx, "DELETE", url, nil, resType, true) }
[ -0.27032849192619324, -0.3139428198337555, 0.8075622320175171, 0.6888158321380615, -0.5941036939620972, -0.09309142082929611, -0.7114095091819763, -1.6271153688430786, 0.9326181411743164, 0.05768235772848129, -0.9887565970420837, 0.2488897144794464, -0.7592999339103699, 0.11284009367227554...
func (c *Client) NewRequest(method, path string, reqBody interface{}, needAuth bool) (*http.Request, error) { var body []byte var err error if reqBody != nil { body, err = json.Marshal(reqBody) if err != nil { return nil, err } } target := fmt.Sprintf("%s%s", c.APIEndPoint, path) req, err := http.NewRe...
[ -0.844525933265686, 0.780357301235199, 0.9809873700141907, -0.6071956157684326, -0.12730152904987335, -0.0686764344573021, -1.2423655986785889, -0.07331927865743637, 0.2794322967529297, 0.8493391871452332, 0.6132190823554993, 1.0813089609146118, -0.11681079119443893, -0.27990514039993286, ...
func (c *Client) Do(req *http.Request) (*http.Response, error) { if c.Logger != nil { c.Logger.LogRequest(req) } c.Ratelimiter.Wait(req.Context()) resp, err := c.Client.Do(req) // In case of several clients behind NAT we still can hit rate limit for i := 1; i < 3 && err == nil && resp.StatusCode == 429; i++ { ...
[ 0.2570353150367737, 0.46146929264068604, 0.9697487354278564, -0.10177546739578247, -0.07390142977237701, 0.4186963737010956, -0.34685641527175903, -1.4695937633514404, -0.16587495803833008, 0.4751814007759094, 0.383988618850708, 0.7570750117301941, -0.44463133811950684, -0.5174817442893982...
func (c *Client) CallAPI(method, path string, reqBody, resType interface{}, needAuth bool) error { return c.CallAPIWithContext(context.Background(), method, path, reqBody, resType, needAuth) }
[ -0.6566069722175598, -0.02675582468509674, 0.5198435187339783, 1.0918947458267212, -0.18819373846054077, 0.749214231967926, -0.37847116589546204, -1.0287383794784546, -0.13498114049434662, 0.4827583134174347, 0.18069814145565033, 0.9583718180656433, -0.6864258646965027, 0.5502611994743347,...
func (c *Client) CallAPIWithContext(ctx context.Context, method, path string, reqBody, resType interface{}, needAuth bool) error { req, err := c.NewRequest(method, path, reqBody, needAuth) if err != nil { return err } req = req.WithContext(ctx) response, err := c.Do(req) if err != nil { return err } return ...
[ -0.7387561202049255, -0.2317250370979309, 0.8960267305374146, 0.49522116780281067, -0.7075570821762085, 0.3887210190296173, -1.2257648706436157, -1.7511022090911865, 0.6692015528678894, 0.8020697832107544, -0.2688296139240265, 0.22517815232276917, -0.9394005537033081, -0.26269984245300293,...
func (c *Client) UnmarshalResponse(response *http.Response, resType interface{}) error { // Read all the response body defer response.Body.Close() body, err := io.ReadAll(response.Body) if err != nil { return err } // < 200 && >= 300 : API error if response.StatusCode < http.StatusOK || response.StatusCode >=...
[ 0.02067749761044979, -0.42753398418426514, 0.7745776772499084, -0.6660935282707214, -0.7747638821601868, -0.5274153351783752, -0.7495917081832886, 0.1472792774438858, 0.6538604497909546, 0.1433338075876236, -0.1260848045349121, -0.30226460099220276, -1.153424859046936, -0.7429414391517639,...
func NewApp() *cli.App { if os.Getenv("HEROGATE_DEBUG") == "1" || os.Getenv("HEROGATE_DEBUG") == "true" { logrus.SetLevel(logrus.DebugLevel) } app := cli.NewApp() app.Name = Name app.Usage = "Deploy and manage containerized applications like Heroku on AWS" app.Version = Version app.Commands = []cli.Command{ ...
[ 0.9136847257614136, -0.6115507483482361, 0.6535058617591858, 1.285803198814392, -0.05768219754099846, 0.3502090275287628, -0.21316920220851898, -0.5671830773353577, 0.2060070037841797, -0.05221900716423988, 0.5996439456939697, 0.4044462740421295, 0.33950287103652954, 0.7836161851882935, ...
func (ModelControlRequest_Type) EnumDescriptor() ([]byte, []int) { return file_grpc_service_proto_rawDescGZIP(), []int{4, 0} }
[ 0.6756212115287781, -0.9584223628044128, 0.6510506272315979, 0.23617465794086456, 0.3486388027667999, 0.14772719144821167, -0.15897820889949799, -0.825614869594574, 0.44294413924217224, -0.591799259185791, 0.011639277450740337, 0.17582134902477264, -0.26887965202331543, 1.277326226234436, ...
func (*StatusRequest) Descriptor() ([]byte, []int) { return file_grpc_service_proto_rawDescGZIP(), []int{0} }
[ -0.6679408550262451, -0.05263585224747658, 0.45187345147132874, 0.4292343854904175, -0.23358112573623657, 0.08001304417848587, 0.44519245624542236, 1.0121350288391113, -0.4100206196308136, -0.32005003094673157, -0.2580760419368744, 0.5735388398170471, -0.12103596329689026, 0.69650036096572...
func (*StatusResponse) Descriptor() ([]byte, []int) { return file_grpc_service_proto_rawDescGZIP(), []int{1} }
[ -0.15813522040843964, -0.10065000504255295, 0.15247127413749695, 0.24202898144721985, 0.08660194277763367, -0.5741809010505676, 0.8784618973731995, 1.022035002708435, -0.15525895357131958, -0.3579151928424835, -1.2277109622955322, -0.2750851809978485, -1.0078939199447632, -0.06250069290399...
func (*HealthRequest) Descriptor() ([]byte, []int) { return file_grpc_service_proto_rawDescGZIP(), []int{2} }
[ -0.4051584303379059, -0.06412887573242188, 0.6228448152542114, -0.31985992193222046, -0.131996750831604, 0.287702351808548, 0.14690004289150238, -0.2651751637458801, -0.28685906529426575, -0.4359741508960724, 0.4865664541721344, 0.8309016227722168, 0.17555958032608032, 0.48113444447517395,...
func (*HealthResponse) Descriptor() ([]byte, []int) { return file_grpc_service_proto_rawDescGZIP(), []int{3} }
[ -0.04028845578432083, -0.012983913533389568, 0.3578625023365021, -0.5213826894760132, 0.29420068860054016, -0.41722792387008667, 0.26303747296333313, -0.3365544378757477, -0.06253110617399216, -0.3749704360961914, -0.31155920028686523, -0.21569988131523132, -0.6910601854324341, -0.18358510...
func (*ModelControlRequest) Descriptor() ([]byte, []int) { return file_grpc_service_proto_rawDescGZIP(), []int{4} }
[ 0.4533364474773407, -0.3265681862831116, 0.43932807445526123, -0.5162239074707031, 0.32547980546951294, -0.09172900021076202, 0.11606238782405853, -0.43224766850471497, 0.005166120361536741, -0.8456569910049438, -0.7332634329795837, -0.18127182126045227, 0.06709447503089905, 0.595389544963...
func (*ModelControlResponse) Descriptor() ([]byte, []int) { return file_grpc_service_proto_rawDescGZIP(), []int{5} }
[ 1.0328289270401, -0.4709151089191437, 0.19525542855262756, -0.5812645554542542, 0.10599665343761444, -0.45306116342544556, 0.334989458322525, -0.6231970191001892, -0.10184664279222488, -0.39499181509017944, -1.5019487142562866, -0.8174218535423279, -0.7859625220298767, 0.2479676753282547, ...
func (*SharedMemoryControlRequest) Descriptor() ([]byte, []int) { return file_grpc_service_proto_rawDescGZIP(), []int{6} }
[ 0.6369538307189941, 0.30555981397628784, 0.6407454609870911, -0.3694591820240021, -0.17335310578346252, 0.12049044668674469, 0.26882997155189514, 0.41702067852020264, 0.4433494508266449, -1.0701366662979126, -0.4367098808288574, 0.043647367507219315, -0.7184501886367798, 0.1772367060184478...
func (*SharedMemoryControlResponse) Descriptor() ([]byte, []int) { return file_grpc_service_proto_rawDescGZIP(), []int{7} }
[ 1.4282622337341309, -0.04216539114713669, 0.24600929021835327, -0.47137168049812317, -0.15663881599903107, -0.3829781711101532, 0.48526662588119507, 0.16581320762634277, 0.37998974323272705, -0.6919537782669067, -1.3538461923599243, -0.6140569448471069, -1.434345006942749, -0.2729109227657...
func (*InferRequest) Descriptor() ([]byte, []int) { return file_grpc_service_proto_rawDescGZIP(), []int{8} }
[ -0.5344192981719971, 0.537542462348938, 0.6798663139343262, 0.05996062234044075, 0.3034311830997467, -0.28044751286506653, 0.18053880333900452, 0.015425750985741615, -0.6235599517822266, -0.15681542456150055, 0.23876792192459106, 0.9640451073646545, -0.5239735841751099, 1.2738871574401855,...
func (*InferResponse) Descriptor() ([]byte, []int) { return file_grpc_service_proto_rawDescGZIP(), []int{9} }
[ -0.030218861997127533, 0.10890048742294312, 0.3238515853881836, -0.24357227981090546, 0.6931074261665344, -0.8087818026542664, 0.8112912774085999, -0.12488830089569092, -0.17397063970565796, -0.017793796956539154, -0.5273773670196533, 0.3293927013874054, -1.3891876935958862, 0.369663685560...
func (*RepositoryRequest) Descriptor() ([]byte, []int) { return file_grpc_service_proto_rawDescGZIP(), []int{10} }
[ -0.6223580241203308, 0.39193665981292725, 0.4516953229904175, -0.2442726194858551, 0.13298550248146057, -0.30279597640037537, 0.31372323632240295, 1.1356470584869385, -0.42610612511634827, -0.437313973903656, 0.008179995231330395, 0.642889142036438, 0.025454014539718628, 0.8164574503898621...
func (*RepositoryResponse) Descriptor() ([]byte, []int) { return file_grpc_service_proto_rawDescGZIP(), []int{11} }
[ -0.17933432757854462, 0.19899676740169525, -0.06756895035505295, -0.4970220923423767, 0.5841447114944458, -1.095384955406189, 0.6333150267601013, 0.5527238249778748, 0.21415485441684723, -0.4066374599933624, -0.5746150016784668, -0.20954331755638123, -0.6537942886352539, 0.0162931624799966...
func (*SharedMemoryControlRequest_Register) Descriptor() ([]byte, []int) { return file_grpc_service_proto_rawDescGZIP(), []int{6, 0} }
[ 0.6074918508529663, 0.13333284854888916, 0.6937951445579529, 0.23342126607894897, 0.014401290565729141, -0.44017672538757324, -0.4093998372554779, 0.5989301204681396, -0.22162744402885437, -1.3048686981201172, -0.6236322522163391, 0.742760419845581, -1.3564869165420532, 0.2829436957836151,...
func (*SharedMemoryControlRequest_Unregister) Descriptor() ([]byte, []int) { return file_grpc_service_proto_rawDescGZIP(), []int{6, 1} }
[ 0.4115682542324066, 0.07899206131696701, 0.5894595384597778, -0.2695271074771881, 0.13457714021205902, -0.3361899256706238, -0.08408188074827194, 1.2066326141357422, -0.24401015043258667, -1.320669174194336, -0.4929268956184387, -0.09785013645887375, -0.9947121739387512, 0.3986081182956695...
func (*SharedMemoryControlRequest_UnregisterAll) Descriptor() ([]byte, []int) { return file_grpc_service_proto_rawDescGZIP(), []int{6, 2} }
[ 0.7966415882110596, -0.010580411180853844, 0.6398240923881531, -0.4105413854122162, 0.24370066821575165, -0.2463606297969818, 0.13825714588165283, 1.0777618885040283, 0.12600696086883545, -1.1110930442810059, -0.3483681380748749, 0.3454974293708801, -0.15047021210193634, 0.4013534188270569...
func (*SharedMemoryControlRequest_Status) Descriptor() ([]byte, []int) { return file_grpc_service_proto_rawDescGZIP(), []int{6, 3} }
[ 1.0148465633392334, -0.8668841123580933, 0.3757413327693939, -0.05243854597210884, -0.4217813014984131, 0.2716521620750427, -0.5507266521453857, 0.1498149186372757, 0.19374436140060425, -1.274912714958191, -0.8447734117507935, 0.12209809571504593, -0.6849588751792908, 0.2602888345718384, ...
func (*SharedMemoryControlRequest_Register_SystemSharedMemoryIdentifier) Descriptor() ([]byte, []int) { return file_grpc_service_proto_rawDescGZIP(), []int{6, 0, 0} }
[ 0.6136530637741089, 0.2519092559814453, 0.4979903995990753, -0.207614466547966, 0.735086977481842, 1.0403270721435547, 0.3809472620487213, 0.7147014737129211, 0.6743497252464294, -0.9461453557014465, -1.351844310760498, 0.13642147183418274, -0.9753583073616028, 0.3770465850830078, 0.9044...
func (*SharedMemoryControlRequest_Register_CUDASharedMemoryIdentifier) Descriptor() ([]byte, []int) { return file_grpc_service_proto_rawDescGZIP(), []int{6, 0, 1} }
[ 0.33489367365837097, 0.4723476767539978, 0.4635002315044403, -0.5001758933067322, 0.3984886109828949, 0.3881186544895172, 0.49511685967445374, 0.4059722423553467, 0.2299397587776184, -0.8566365242004395, -0.7013763189315796, 0.12292229384183884, -0.5164194107055664, -0.06880970299243927, ...
func (*SharedMemoryControlResponse_Status) Descriptor() ([]byte, []int) { return file_grpc_service_proto_rawDescGZIP(), []int{7, 0} }
[ 1.8409065008163452, -0.979973554611206, 0.3199330270290375, -0.702459990978241, -0.08082412928342819, -0.37874922156333923, 0.3317435681819916, 0.012281645089387894, 0.6335339546203613, -1.0784085988998413, -1.5063631534576416, -0.6983452439308167, -0.3425430357456207, -0.10625200718641281...
func NewRecordWriter(w io.Writer) (rec io.Writer, err error) { // TODO 2 - complete implementation }
[ -0.8927412629127502, 0.239884153008461, 0.43713733553886414, 0.8629828691482544, -0.9288179278373718, -1.1041852235794067, 1.467048168182373, 0.09178882837295532, 0.04099712520837784, 0.09714030474424362, -0.3012344241142273, -0.04746661335229874, 0.18858075141906738, 0.9267885684967041, ...
func (mf *ElementFilter) Match(g common.Getter) bool { return mf.filter.Eval(g) }
[ -0.9247391819953918, 0.5297902822494507, 0.30146512389183044, 0.20226331055164337, -0.8027709126472473, 0.6762480735778809, 0.24607977271080017, 0.3707249164581299, -0.7315548062324524, 0.16236399114131927, 0.0726843923330307, -0.26086822152137756, -0.13964559137821198, 0.48792093992233276...
func (mf *ElementFilter) Filter() (*filters.Filter, error) { return mf.filter, nil }
[ -0.47013071179389954, -0.22394856810569763, -0.0792284682393074, 0.8120986819267273, -0.19850024580955505, 0.1750856190919876, 0.6264129281044006, -0.015972359105944633, 0.039622437208890915, -1.2286994457244873, -0.015681209042668343, 0.6322887539863586, -0.3341432213783264, 0.46057859063...
func NewElementFilter(f *filters.Filter) *ElementFilter { return &ElementFilter{filter: f} }
[ -0.39574509859085083, -0.07326657325029373, -0.31132757663726807, 0.9593318104743958, -1.760262131690979, 0.04251585900783539, -0.7142957448959351, 0.4159865379333496, 0.10948707908391953, 0.05216732621192932, -0.8774814009666443, 0.6964531540870667, 0.35741400718688965, 0.6066766381263733...
func NewFilterForEdge(parent Identifier, child Identifier) *filters.Filter { return filters.NewOrFilter( filters.NewTermStringFilter("Parent", string(parent)), filters.NewTermStringFilter("Child", string(child)), ) }
[ 0.44774356484413147, -0.6926227807998657, 0.3217077851295471, -1.0589776039123535, -0.38855817914009094, -0.8144223690032959, -0.917932391166687, -0.31324005126953125, -1.2349162101745605, 0.11920984834432602, 0.26670825481414795, 0.2981022596359253, 0.4613582491874695, -0.3152145147323608...
func filterForTimeSlice(t *common.TimeSlice, startName, endName string) *filters.Filter { if t == nil { u := common.UnixMillis(time.Now()) t = common.NewTimeSlice(u, u) } return filters.NewAndFilter( filters.NewLteInt64Filter(startName, t.Last), filters.NewOrFilter( filters.NewNullFilter(endName), fil...
[ -0.5077545046806335, -0.2292807251214981, 0.3702327311038971, -0.45647934079170227, -0.39720025658607483, -0.66349196434021, -1.5090070962905884, -0.22889678180217743, -0.5105696320533752, 0.28464314341545105, -0.024678053334355354, 0.1688753068447113, 0.5956907868385315, 0.300646334886550...
func (fs *IPfsfs) Req(path string, arg string) (resp *http.Response, err error) { u := url.URL{} u.Scheme = "http" u.Host = ipfsHost u.Path = api + path if arg != "" { val := url.Values{} val.Set("arg", arg) val.Set("encoding", "json") u.RawQuery = val.Encode() } logger.Debug("URL : %s", u.String()) res...
[ -1.53294038772583, -0.09358491748571396, 0.8119680285453796, -0.06945213675498962, 0.25477713346481323, -0.3165895640850067, -0.47048747539520264, 0.5023378133773804, -0.6581128239631653, -0.3402407467365265, 0.6646873354911804, 0.06536004692316055, -0.026424465700984, -0.24488615989685059...
func (fs *IPfsfs) Stat() (stat bool) { _, err := fs.Req("id", "") if err != nil { logger.Critical("IPFS stat , %s", err) return false } return true }
[ -0.925713300704956, 0.13359354436397552, 0.6921496391296387, -0.21243712306022644, 0.3321017622947693, -0.7126628160476685, -0.44517195224761963, -0.0021334027405828238, -0.2733194828033447, -0.9318233132362366, -0.46873530745506287, -0.5622094869613647, -1.1781753301620483, -0.52329444885...
func (fs *IPfsfs) Ls(name string) (data []byte, err error) { logger.Debug("get listing for %s", name) htr, err := fs.Req("file/ls", "/ipfs/"+fs.base+"/"+name) if err != nil { return data, err } data, err = ioutil.ReadAll(htr.Body) return data, err }
[ -1.2935899496078491, 0.031033044680953026, 0.6891828775405884, -0.9250021576881409, -0.6503928303718567, -1.2465695142745972, -1.608647108078003, -0.3404284715652466, -0.08152873814105988, 0.005731938406825066, -0.19911281764507294, 0.4425981640815735, -0.6090296506881714, -0.7724021077156...
func (fs *IPfsfs) Get(s string) (f io.ReadCloser, size int64, err error) { path := "/ipfs/" + fs.base + "/" + s data, err := fs.Req("cat", path) // calc size size, err = fs.Size(s) return data.Body, size, err }
[ -1.2072831392288208, -0.5374512076377869, 0.6981985569000244, -1.0706689357757568, -0.7353841662406921, -1.3394607305526733, -0.8234413266181946, -0.10800258070230484, -1.0398346185684204, -0.7321017384529114, -0.06722920387983322, 0.2881893217563629, -0.18036775290966034, -0.3529488742351...
func (fs *IPfsfs) List(path string) (items []string, err error) { li, err := fs.fullListing(path) ref := li.Arguments["/ipfs/"+fs.base+"/"+path] for _, it := range li.Objects[ref].Links { items = append(items, it.Name) } return items, nil }
[ -1.214467167854309, -0.9593280553817749, 0.6472412943840027, -0.5251656174659729, 0.11366527527570724, -0.8662856817245483, -0.3802397847175598, 0.47145286202430725, 0.09765565395355225, -0.08779441565275192, -0.6462244987487793, -0.09235916286706924, -0.5366547703742981, -0.02846186421811...
func Int(digits int) int { var src = rand.NewSource(time.Now().UnixNano()) b := make([]byte, digits) // A src.Int63() generates 63 random bits, enough for letterIdxMax characters! for i, cache, remain := digits-1, src.Int63(), numberIdxMax; i >= 0; { if remain == 0 { cache, remain = src.Int63(), numberIdxMax ...
[ -0.7613593339920044, 0.5108100175857544, 0.421128511428833, -0.9907801747322083, -0.9624972343444824, 0.42285603284835815, 0.046093814074993134, -0.10270394384860992, 0.028185490518808365, 0.20562882721424103, -0.5063894391059875, 0.3198980987071991, -0.15450462698936462, -0.32968968152999...
func executeShell(ctx context.Context, context ActionExecutionContext) error { //log.Printf("Exec: %s", context.Action.Shell) //cmdAndArgs := strings.Split(s.Shell, " ") //cmd := cmdAndArgs[0] //args := cmdAndArgs[1:] shuttlePath, _ := filepath.Abs(filepath.Dir(os.Args[0])) cmdOptions := go_cmd.Options{ Buffer...
[ 0.10474091023206711, -0.5754522681236267, 0.9065930247306824, -0.24591273069381714, 0.7999897599220276, 1.204659104347229, 0.14447586238384247, 0.5687932372093201, -0.06409518420696259, 0.06674309074878693, 0.06614120304584503, 0.5893242955207825, 0.8836345076560974, 1.193982720375061, 0...
func New(path string) (*LevelDB, error) { return NewWithOptions(path, DefaultOptions) }
[ 0.39690837264060974, -0.34308916330337524, 0.25177857279777527, 0.7073705196380615, -0.3692513108253479, 0.6742210984230042, -0.22434517741203308, 0.05612405017018318, -1.1765687465667725, -0.14390282332897186, -1.0456644296646118, -0.04116630181670189, -0.8092544078826904, 0.7845317721366...
func NewWithOptions(path string, options *opt.Options) (*LevelDB, error) { db, err := lvldb.OpenFile(path, options) if err != nil { return nil, err } return &LevelDB{ Database: db, Format: &ChunkFormatV100{}, chunks: make(map[int]*Chunk), mutex: new(sync.RWMutex), }, nil }
[ 0.6776949763298035, -1.009621500968933, 0.39060014486312866, -0.3967662453651428, -0.7975097894668579, 0.6111690402030945, -0.3897062838077545, -0.5345709323883057, -0.7318410277366638, 0.392055481672287, -0.6324797868728638, -0.06934474408626556, -1.1086221933364868, 0.3536163568496704, ...
func Load(path string) (*LevelDB, error) { return LoadWithOptions(path, DefaultOptions) }
[ 0.2804062068462372, 0.12837189435958862, 0.27662670612335205, 0.44543910026550293, -0.43986284732818604, 0.8233630657196045, -0.5209912061691284, -0.11541160196065903, -0.6573041081428528, 0.13207460939884186, -1.22478187084198, -0.31410717964172363, -1.826836109161377, -0.1183752119541168...
func LoadWithOptions(path string, options *opt.Options) (*LevelDB, error) { db, err := lvldb.OpenFile(path, options) if err != nil { return nil, err } return &LevelDB{ Database: db, Format: &ChunkFormatV100{}, chunks: make(map[int]*Chunk), mutex: new(sync.RWMutex), }, nil }
[ 0.8136330842971802, -0.3714788854122162, 0.5480140447616577, -0.7021331191062927, -0.7952324151992798, 0.6530686616897583, -0.8007574081420898, -0.5721535086631775, -0.30884912610054016, 0.3697572648525238, -0.7079363465309143, -0.19205690920352936, -1.3998441696166992, -0.0823057740926742...
func NewRawBlockState(name string, value int) *RawBlockState { return &RawBlockState{ name: strings.ToLower(name), value: value, } }
[ 0.06796449422836304, -0.10634668171405792, 0.31166303157806396, -0.9377405047416687, -2.695805072784424, -0.6850864887237549, -0.6318041086196899, -0.7468899488449097, 0.18200081586837769, 0.16926206648349762, -1.2087647914886475, -0.1795254498720169, 0.1251639574766159, -0.382198005914688...
func FromRawBlockState(bs level.BlockState) (*RawBlockState, error) { name, meta, ok := bs.ToBlockNameMeta() if !ok { return nil, fmt.Errorf("level.leveldb: usable to convert from %s to RawBlockState", bs.Name()) } return NewRawBlockState(name, meta), nil }
[ 0.6450018286705017, -0.3328944742679596, 0.591641902923584, 0.08141458034515381, -1.6960386037826538, -0.15352001786231995, -0.23541630804538727, -0.37180525064468384, 0.44665321707725525, 0.41951772570610046, -1.3334598541259766, -0.3866465389728546, 0.4517152011394501, -0.022175626829266...
func (block *RawBlockState) Name() string { return block.name }
[ -0.46916934847831726, -0.6103588938713074, 0.535973846912384, 0.37933194637298584, -1.4014060497283936, 0.3027748763561249, 0.04956918954849243, -0.6574504971504211, 0.3070858418941498, 0.6008393168449402, -1.2428792715072632, -0.19978244602680206, 0.43638667464256287, 0.15280993282794952,...
func (block *RawBlockState) Value() int { return block.value }
[ -0.42306289076805115, 0.07627171277999878, 0.4172189235687256, -0.012559846043586731, -0.1994403451681137, 0.31434130668640137, 0.7935289740562439, -0.16735967993736267, 0.157802015542984, -0.03660165145993233, -0.743515133857727, 0.34766775369644165, 0.05754668638110161, 0.412513643503189...
func (block *RawBlockState) Equal(b *RawBlockState) bool { return block.name == b.name && block.value == b.value }
[ -0.40788814425468445, -0.5799943208694458, 0.5740390419960022, 0.2278711497783661, -0.6165018677711487, 0.30775561928749084, -0.40161818265914917, -0.6041237711906433, -0.1371484100818634, 0.7913936376571655, -1.6444998979568481, 0.2554064393043518, -0.2819536030292511, 0.10833263397216797...
func (block *RawBlockState) ToBlockNameProperties() (name string, properties map[string]string, ok bool) { return block.name, make(map[string]string), true }
[ -0.9551441669464111, -0.7879723906517029, 0.8285514712333679, -0.9929946660995483, -1.0332659482955933, -0.9081674218177795, -0.54293292760849, -0.43149885535240173, -0.2975006401538849, 1.143269419670105, -1.431720495223999, -0.19025643169879913, 0.6890460848808289, -0.34632429480552673, ...
func (block *RawBlockState) ToBlockNameMeta() (name string, meta int, ok bool) { return block.name, block.value, true }
[ -0.6244797706604004, -0.4709468483924866, 0.9577285647392273, -0.42776623368263245, -0.6634981632232666, -0.8135616183280945, -0.6037721633911133, -0.6565150618553162, -0.6128070950508118, 1.495263934135437, -1.5657732486724854, -0.2012331485748291, 0.9126715064048767, -0.17624437808990479...
func (block *RawBlockState) ToBlockIDMeta() (id int, meta int, ok bool) { return 0, 0, false }
[ -0.7947208881378174, -0.4758656919002533, 0.8954957127571106, 0.39326807856559753, 0.3091852366924286, -0.6465643048286438, 0.1320076733827591, -0.026655230671167374, -0.10285917669534683, 1.149462342262268, -1.2228734493255615, 0.1825980395078659, 0.13014094531536102, -0.3709264099597931,...
func (lvl *LevelDB) Close() error { if lvl.Database != nil { lvl.mutex.Lock() err := lvl.Database.Close() lvl.mutex.Unlock() return err } return nil }
[ 0.10517600178718567, -0.12305422872304916, 0.8544501662254333, 0.36841434240341187, -0.1396193951368332, 0.8973810076713562, -0.18240156769752502, -0.14690959453582764, -0.6806783676147461, 0.19511257112026215, -0.21071451902389526, 0.37979069352149963, -2.2624166011810303, 1.6737749576568...
func (lvl *LevelDB) Dimension() level.Dimension { return lvl.dimension }
[ -0.11924327909946442, -1.1376457214355469, 0.6221243739128113, 0.5174528956413269, -0.08579712361097336, 1.1145918369293213, 0.49822792410850525, 0.4436509609222412, -0.4069919288158417, 0.13853254914283752, -0.492183655500412, 0.5262008905410767, -1.0744683742523193, 1.137037754058838, ...
func (lvl *LevelDB) SetDimension(dimension level.Dimension) { lvl.dimension = dimension }
[ -0.2785642147064209, -0.7484145164489746, 0.5482227802276611, 0.5423911213874817, -0.1410117894411087, 0.8218742609024048, 0.37889033555984497, 0.7950103878974915, -0.8320435881614685, 0.6399191617965698, -1.3916666507720947, 0.3044843375682831, -0.7164906859397888, 1.8461155891418457, -...
func (lvl *LevelDB) LoadChunk(x, y int, create bool) error { if lvl.IsLoadedChunk(x, y) { return fmt.Errorf("level.leveldb: already loaded the chunk") } exist, err := lvl.HasGeneratedChunk(x, y) if err != nil { return err } if !exist && create { return lvl.GenerateChunk(x, y) } chunk, err := lvl.Format...
[ -0.3431345522403717, 0.32852235436439514, 0.7649368047714233, -0.21887463331222534, 0.14528332650661469, 0.6532959342002869, -0.4228629767894745, -0.46932876110076904, -1.6117223501205444, -0.04086571931838989, 0.15133187174797058, 0.8111212849617004, -0.6794865131378174, 0.638684272766113...
func (lvl *LevelDB) UnloadChunk(x, y int) error { if !lvl.IsLoadedChunk(x, y) { return fmt.Errorf("level.leveldb: not loaded the chunk") } lvl.mutex.Lock() delete(lvl.chunks, lvl.at(x, y)) lvl.mutex.Unlock() return nil }
[ -0.30258962512016296, -0.06880975514650345, 0.5831383466720581, -1.172574758529663, -0.251156210899353, -0.2822679281234741, -0.4997292459011078, -0.2575407326221466, -1.593428373336792, -0.27976593375205994, -0.06765769422054291, 0.8761971592903137, -0.9269788265228271, 0.1195840910077095...
func (lvl *LevelDB) GenerateChunk(x, y int) error { if lvl.IsLoadedChunk(x, y) { return fmt.Errorf("level.leveldb: already loaded the chunk") } chunk := NewChunk(x, y) lvl.mutex.Lock() lvl.chunks[lvl.at(x, y)] = chunk lvl.mutex.Unlock() return nil }
[ -0.8574749827384949, 0.5116844177246094, 0.6745402812957764, -0.6123121380805969, 0.9115322828292847, 0.71717369556427, -0.4706093370914459, -0.27529120445251465, -1.127622127532959, -0.5730239748954773, -0.8543530106544495, 0.510899007320404, -0.37849557399749756, 0.5685091614723206, 0....
func (lvl *LevelDB) HasGeneratedChunk(x, y int) (bool, error) { return lvl.Format.Exist(lvl.Database, x, y, lvl.dimension) }
[ -0.6253035068511963, 0.034804824739694595, 0.6856177449226379, -0.5037830471992493, 0.5408647656440735, 0.3663984537124634, -0.056483734399080276, 0.2873610854148865, -2.3906514644622803, -1.1098850965499878, -0.6244850754737854, 0.6362938284873962, -0.05308505892753601, 1.49269700050354, ...
func (lvl *LevelDB) IsLoadedChunk(x, y int) bool { lvl.mutex.RLock() _, ok := lvl.chunks[lvl.at(x, y)] lvl.mutex.RUnlock() return ok }
[ -0.893131673336029, -0.6239280700683594, 0.7872517704963684, -0.44908490777015686, 0.11901010572910309, -0.20067106187343597, -1.0097872018814087, -0.9566985964775085, -1.313770055770874, -0.34492945671081543, -0.7708302140235901, 1.2078866958618164, -0.6191132664680481, 0.3890173733234405...
func (lvl *LevelDB) SaveChunk(x, y int) error { chunk, ok := lvl.chunk(x, y) if !ok { return fmt.Errorf("level.leveldb: not loaded the chunk") } return lvl.Format.Write(lvl.Database, chunk, lvl.dimension) }
[ -0.817416250705719, -0.03018098883330822, 0.43746063113212585, -0.35354098677635193, 0.5557458996772766, 0.6015281677246094, 0.2420472651720047, 0.031019188463687897, -1.4397623538970947, 0.19870580732822418, -0.7614728808403015, 0.4476490020751953, -0.9663242101669312, 1.0489411354064941,...
func (lvl *LevelDB) SaveChunks() error { for key := range lvl.chunks { err := lvl.SaveChunk(key&0xffff, (key>>16)&0xffff) if err != nil { return err } } return nil }
[ -0.6421341300010681, -0.07134003192186356, 0.49792516231536865, -0.35464486479759216, 1.0370738506317139, 0.13177914917469025, -0.6009050011634827, -0.195444256067276, -1.5343316793441772, 0.5220266580581665, -1.3196009397506714, -0.6108183860778809, -1.582820177078247, 1.3664343357086182,...
func (lvl *LevelDB) Chunk(x, y int) (level.Chunk, error) { err := lvl.LoadChunk(x, y, false) if err != nil { return nil, err } chunk, ok := lvl.chunk(x, y) if ok { return chunk, nil } err = lvl.LoadChunk(x, y, false) if err != nil { return nil, err } return chunk, nil }
[ -0.3368719220161438, -0.005379269830882549, 0.6047701239585876, -0.16052909195423126, 0.08984657377004623, 0.45910149812698364, 0.032868560403585434, -0.5383431315422058, -0.6640232801437378, -0.2062716782093048, 0.536628007888794, 0.8334587812423706, -0.2071252465248108, 0.361030161380767...
func (lvl *LevelDB) LoadedChunks() []level.Chunk { result := make([]level.Chunk, len(lvl.chunks)) lvl.mutex.RLock() count := 0 for _, chunk := range lvl.chunks { result[count] = chunk count++ } lvl.mutex.RUnlock() return result }
[ -0.568476676940918, -1.423781156539917, 0.7491357326507568, -1.1289103031158447, 0.27509650588035583, -0.1625571846961975, -0.0240565724670887, -0.542849600315094, -1.0845680236816406, -0.3016248047351837, -0.9483560919761658, 0.3561362326145172, -1.017022728919983, 0.5816299915313721, -...
func (d *PhoneDiscardGroupCallRequest) FillFrom(from interface { GetCall() (value InputGroupCall) }) { d.Call = from.GetCall() }
[ -0.3028162121772766, 0.750525176525116, 0.5477250814437866, 0.3109769821166992, -0.3594582974910736, 0.7097336053848267, -0.5613083243370056, -0.9741263389587402, 0.4145848751068115, -0.3390510678291321, 0.8754012584686279, -0.11114661395549774, 0.10011270642280579, 0.9575109481811523, 0...
func (*PhoneDiscardGroupCallRequest) TypeID() uint32 { return PhoneDiscardGroupCallRequestTypeID }
[ 0.38851073384284973, -0.23386052250862122, 0.47129741311073303, 0.2889629304409027, -0.16114196181297302, 1.4509732723236084, -0.3709304928779602, -0.992667019367218, 0.8797584772109985, -0.11255209147930145, 0.38905540108680725, -0.07629165798425674, -1.553301453590393, 0.8641386032104492...
func (*PhoneDiscardGroupCallRequest) TypeName() string { return "phone.discardGroupCall" }
[ 0.1893870234489441, 0.14039434492588043, 0.6334572434425354, 0.11411494016647339, -0.3777271509170532, 1.0187432765960693, -0.1621059775352478, -0.4432263672351837, 0.09084577113389969, 0.40296873450279236, 0.46529385447502136, -0.6928040981292725, -0.763672947883606, -0.0734938234090805, ...
func (d *PhoneDiscardGroupCallRequest) TypeInfo() tdp.Type { typ := tdp.Type{ Name: "phone.discardGroupCall", ID: PhoneDiscardGroupCallRequestTypeID, } if d == nil { typ.Null = true return typ } typ.Fields = []tdp.Field{ { Name: "Call", SchemaName: "call", }, } return typ }
[ 0.4313228130340576, 0.512283444404602, 0.5322529077529907, -0.7850050926208496, -0.041053492575883865, 1.0515196323394775, -0.2665148675441742, -0.9786803126335144, -0.17555560171604156, 0.32396113872528076, 0.059115175157785416, -1.0176156759262085, -0.6147374510765076, 0.1148700714111328...
func (d *PhoneDiscardGroupCallRequest) GetCall() (value InputGroupCall) { if d == nil { return } return d.Call }
[ -0.14796379208564758, 0.9659280180931091, 0.2961936593055725, 1.1039848327636719, -0.23971016705036163, 0.8003590703010559, 0.0055812448263168335, -0.7131481766700745, 0.8322915434837341, -0.4388047158718109, 0.8948445916175842, -0.3297654390335083, -0.48847660422325134, 0.4168496727943420...
func (c *Client) PhoneDiscardGroupCall(ctx context.Context, call InputGroupCall) (UpdatesClass, error) { var result UpdatesBox request := &PhoneDiscardGroupCallRequest{ Call: call, } if err := c.rpc.Invoke(ctx, request, &result); err != nil { return nil, err } return result.Updates, nil }
[ -0.6073493957519531, 1.010027289390564, 0.8361403942108154, 0.15014682710170746, -0.5561918616294861, 0.317719042301178, -1.0025200843811035, -1.0550148487091064, 0.3039441406726837, 0.5804927349090576, 0.5685412287712097, -0.1637319028377533, -0.9774470329284668, 0.33454635739326477, 0....
func NewLRU(capacity int) Cache { if capacity <= 0 { panic("lru: capacity <= 0") } return &lru{ capacity: capacity, cache: make(map[interface{}]*list.Element, capacity), list: list.New(), } }
[ -0.3506409823894501, -0.032087668776512146, 0.4338960349559784, 0.04014365375041962, -1.1534751653671265, -0.078252874314785, -0.7268573045730591, 0.41073524951934814, 0.0012300645466893911, -0.524590015411377, -0.09078264236450195, 0.6706216931343079, -0.610521674156189, -0.22829584777355...
func GetSpan(c page.ControlI, id string) *Span { return c.Page().GetControl(id).(*Span) }
[ 0.7846568822860718, 0.3713887333869934, 0.20683549344539642, 0.36834749579429626, 0.04115194454789162, -0.3471398651599884, -0.12464125454425812, -1.0430958271026611, 1.088075876235962, -1.2848979234695435, -0.6923497319221497, 0.34694719314575195, 0.47099316120147705, -0.4718400835990906,...
func GenerateFile(gen *protogen.Plugin, file *protogen.File) *protogen.GeneratedFile { if !file.Generate { return nil } if len(file.Services) == 0 { return nil } // fmt.Println("FILENAME ", file.GeneratedFilenamePrefix) filename := file.GeneratedFilenamePrefix + ".mock.pb.go" g := gen.NewGeneratedFile(filena...
[ -0.11877928674221039, 0.06145186349749565, 0.6799290180206299, -0.2134258896112442, 0.44429513812065125, 0.5165887475013733, 0.4298877716064453, 0.5104014873504639, -0.7236819863319397, -0.6804899573326111, 0.3979804813861847, -0.692285418510437, -0.8713502883911133, 0.2642005383968353, ...
func (m mockServicesGenerator) GenerateFileContent() { if len(m.file.Services) == 0 { return } for _, service := range m.file.Services { m.genService(service) } }
[ -0.7322814464569092, 0.19464078545570374, 0.4615902006626129, -0.17312875390052795, 0.10418883711099625, 0.10786084085702896, 0.06827495247125626, 0.45848900079727173, -0.7428944706916809, -0.2654818892478943, 0.3680253028869629, -1.0867351293563843, -0.3681527078151703, 0.9280301928520203...
func (o *QuoteCouponManagementV1SetPutMineReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewQuoteCouponManagementV1SetPutMineOK() if err := result.readResponse(response, consumer, o.formats); err != nil { ret...
[ -0.7166543006896973, -0.8340022563934326, 0.681516706943512, -0.12138933688402176, -0.2439156472682953, -0.622267484664917, 0.14195117354393005, -0.8174293041229248, 0.36654984951019287, 0.7293070554733276, 0.5247993469238281, -0.3765488266944885, -1.1605298519134521, -0.3969089090824127, ...
func NewQuoteCouponManagementV1SetPutMineOK() *QuoteCouponManagementV1SetPutMineOK { return &QuoteCouponManagementV1SetPutMineOK{} }
[ -0.5914381742477417, -0.3187161087989807, 0.5978507995605469, 0.009792906232178211, -1.1496319770812988, 0.5323216319084167, 0.2299635261297226, -0.5333206057548523, -0.40796247124671936, 1.115376591682434, -0.5284222960472107, -0.36257070302963257, -0.3120579421520233, -0.8459257483482361...
func NewQuoteCouponManagementV1SetPutMineBadRequest() *QuoteCouponManagementV1SetPutMineBadRequest { return &QuoteCouponManagementV1SetPutMineBadRequest{} }
[ -0.9090865850448608, -0.4595133066177368, 0.7089369893074036, -0.4299282431602478, -0.5850369930267334, 0.2697649896144867, -0.700760543346405, -0.9032378792762756, -0.5064272880554199, -0.04178512468934059, -0.41103655099868774, 0.6431484222412109, -0.5847952365875244, -0.0671033710241317...
func NewQuoteCouponManagementV1SetPutMineUnauthorized() *QuoteCouponManagementV1SetPutMineUnauthorized { return &QuoteCouponManagementV1SetPutMineUnauthorized{} }
[ -0.9058322310447693, -0.334533154964447, 0.46071648597717285, -0.32435503602027893, -1.369079351425171, 0.41937255859375, 0.22471901774406433, -0.14036162197589874, -0.4820074439048767, -0.5188457369804382, -0.29216864705085754, 0.8504458665847778, -0.4387092590332031, -1.255616545677185, ...
func NewQuoteCouponManagementV1SetPutMineDefault(code int) *QuoteCouponManagementV1SetPutMineDefault { return &QuoteCouponManagementV1SetPutMineDefault{ _statusCode: code, } }
[ -0.47278907895088196, 0.26975440979003906, 0.43071743845939636, 0.009205983020365238, 0.5550233721733093, -0.3201121687889099, 0.22216105461120605, -0.47788703441619873, -0.2607095539569855, 0.5373477935791016, -1.373733639717102, -0.7136594653129578, -1.2736862897872925, -0.79776042699813...
func (o *QuoteCouponManagementV1SetPutMineDefault) Code() int { return o._statusCode }
[ -0.9453989863395691, 0.37617993354797363, 0.2173542082309723, 0.2906605303287506, 0.8832886815071106, -0.14551445841789246, 0.44870737195014954, -0.2096131443977356, -0.12694236636161804, 0.7574486136436462, -0.8874456882476807, -0.5143429636955261, -1.0075350999832153, -0.2908697426319122...
func HandleSuccessResponse(w http.ResponseWriter, data interface{}) { r := Response{ Message: "success", Data: data, } w.Header().Set("Content-Type", "application/json; charset=utf-8") w.Header().Set("X-Content-Type-Options", "nosniff") json.NewEncoder(w).Encode(r) }
[ 0.3909483253955841, -0.319400429725647, 0.25187745690345764, -0.2601178288459778, -0.015336846932768822, -0.44490715861320496, -0.3062761425971985, -0.8195896148681641, 0.02926812320947647, 0.4387052357196808, -1.0492208003997803, -0.9365198612213135, 0.020399855449795723, 0.14494284987449...
func (d *Delivery) Handle(fn MyHandler) gin.HandlerFunc { return func(c *gin.Context) { data, err := fn(c) if err != nil { HandleErrorResponse(c.Writer, err) return } HandleSuccessResponse(c.Writer, data) } }
[ -0.4199761748313904, -0.1801430732011795, 0.715217649936676, -0.09315796196460724, -0.055153362452983856, 0.23555497825145721, 0.16448208689689636, 0.5584311485290527, 0.11331610381603241, -1.335227370262146, -0.2313925176858902, -0.9632941484451294, 0.6094036102294922, -0.4959914684295654...
func WrapSqlInGorm(sqlConnection DB) (ORM, error) { db, err := gorm.Open("mysql", sqlConnection) return &GormORM{db}, err }
[ -0.4721788763999939, -0.04019627720117569, 0.4848681092262268, -0.7210769653320312, -0.6525002121925354, 0.3097389340400696, -1.6336824893951416, -0.35332998633384705, 0.3488377630710602, -0.3669959008693695, 0.20096704363822937, -0.11614074558019638, 0.29919150471687317, -0.10239443928003...
func NewMySQLDBConnection() (*sql.DB, error) { user := sys.EnvOrDefault("MYSQL_USER", "root") host := sys.EnvOrDefault("MYSQL_HOST", "127.0.0.1") port := sys.EnvOrDefault("MYSQL_PORT", "3306") database := sys.EnvOrDefault("MYSQL_DATABASE", "butter") password := sys.EnvOrDefault("MYSQL_PASSWORD", "") var db *sql....
[ -0.2808661460876465, 0.20653186738491058, 0.9518526792526245, 0.257360577583313, -0.9681723117828369, -0.5198515057563782, 0.4462559223175049, -0.1657935529947281, -0.5444740653038025, 0.021031243726611137, -0.5994438529014587, 0.13604819774627686, -0.9276649355888367, 1.3253188133239746, ...
func status(cmd *cobra.Command, _ []string) error { if err := daemonStatus(cmd); err != nil { return err } if err := connectorStatus(cmd); err != nil { return err } return nil }
[ -0.41697803139686584, -0.9185717105865479, 0.13085393607616425, 0.2084006667137146, 0.5090188384056091, 0.05972908064723015, 0.14271914958953857, 0.9303432106971741, 0.321432888507843, -0.5477023720741272, -0.3692110478878021, 0.36626794934272766, -0.006140058394521475, 1.4188729524612427,...
func NewForwarder(cc *ClusterConfig) proto.Forwarder { // new Forwarder if _, ok := defaultForwardCacheTypes[cc.CacheType]; ok { return newDefaultForwarder(cc) } if cc.CacheType == types.CacheTypeRedisCluster { dto := time.Duration(cc.DialTimeout) * time.Millisecond rto := time.Duration(cc.ReadTimeout) * time...
[ 0.06647490710020065, -0.02024194970726967, 0.34609442949295044, 0.5725437998771667, -0.376949280500412, 0.09849659353494644, -0.045101266354322433, -0.7446452379226685, -0.12227919697761536, 0.21460622549057007, 0.27531516551971436, 0.4542894959449768, -0.6408509016036987, 0.92307990789413...
func parseAttributes(doc *ast.CommentGroup) []Attribute { var attributes []Attribute if doc == nil { return attributes } for _, comment := range doc.List { if strings.HasPrefix(comment.Text, "//extern ") { nameattr := nameAttribute(strings.TrimSpace(comment.Text[9:])) attributes = append(attributes, namea...
[ -0.49325618147850037, -0.2630729675292969, 0.6926003098487854, -0.3431597948074341, -0.6565110683441162, -0.3244103193283081, -0.13984927535057068, 0.4398059844970703, -0.37492191791534424, 0.9718393683433533, 0.1728769987821579, -0.3667531907558441, -0.8581565618515015, 0.8823994398117065...
func parseAttribute(line string) Attribute { if !strings.HasPrefix(line, AttributeCommentPrefix) { return nil } line = strings.TrimSpace(line[len(AttributeCommentPrefix):]) colon := strings.IndexRune(line, ':') var key, value string if colon == -1 { key = line } else { key, value = line[:colon], line[colon...
[ 0.7039021253585815, -1.1103496551513672, 0.27233821153640747, -0.11480917036533356, -0.16720344126224518, -0.6544205546379089, 0.06180145964026451, 0.04929226636886597, -0.14295177161693573, 0.14715878665447235, 0.580552339553833, -0.015603910200297832, -0.30699747800827026, -0.40248501300...
func GetPolicyStatements(driverName string) *PolicyStatements { stmts := &PolicyStatements{} switch driverName { case "postgres", "pg", "pgx": stmts.QueryInsertPolicy = `INSERT INTO am.ladon_policy(id, description, effect, conditions, meta) SELECT $1::varchar, $2, $3, $4, $5 WHERE NOT EXISTS (SELECT 1 FROM am.lado...
[ 0.0018658994231373072, -0.39753738045692444, 0.8814431428909302, -0.7583878040313721, -0.24592864513397217, 0.41839200258255005, -0.43234485387802124, -0.24054409563541412, 0.5176351070404053, -0.026724426075816154, -0.5282217264175415, -0.7130866646766663, -1.2691909074783325, -0.06207701...