text
stringlengths
11
6.3k
embedding
listlengths
768
768
func RemoveNote(Ob map[string]interface{}, userId string) *utils.Response { var note *model.Note var path string if _, ok := Ob["Path"].(string); ok { path = Ob["Path"].(string) note = model.NewNote(path) note.UID = userId } else { return utils.WITHOUT_PARAMETERS } notebook, err := note.GetAllStatus() if...
[ -0.7544599175453186, -0.39007410407066345, 0.8627782464027405, 0.5911166667938232, -0.08696748316287994, 0.1351773887872696, 0.7472401857376099, 0.3744063675403595, 0.15777266025543213, 0.4367017447948456, 0.4221123456954956, -0.30758437514305115, -0.615895688533783, 0.06846979260444641, ...
func JoinDecoder(r *http.Request) (Request, error) { var rv joinRequest rv.CodePosted = r.PostFormValue("quiz-join-code") != "" return rv, nil }
[ -0.4083459973335266, -0.07672428339719772, 0.34110885858535767, 0.653174638748169, -1.0310964584350586, 0.4158363342285156, -0.5053960680961609, 0.45698806643486023, -0.20296193659305573, -0.684598982334137, -0.1392095535993576, -0.9188527464866638, -1.196336269378662, 1.1618857383728027, ...
func JoinHandler(s State, r Request) (State, Response, error) { var rv joinResponse req, ok := r.(joinRequest) if !ok { return s, rv, errWrongRequestType{} } if !s.Quiz.QuizKey.Empty() { err := s.checkContestant() if err != nil { // The user isn't a contestant yet - check if we're still okay to join i...
[ -0.4160800278186798, -0.5283061265945435, 0.5212945938110352, 0.6406616568565369, -0.43305516242980957, 0.7613206505775452, 0.6888567209243774, 0.6391453146934509, 0.8535634279251099, 0.04933439940214157, 0.3997613191604614, -0.4308898150920868, -1.1549866199493408, -0.18070325255393982, ...
func TestStationsProto(t *testing.T) { s,err := stations() if err != nil { t.Fatal(err) } // protobuf of all station information b, err := proto.Marshal(&s) if err != nil { t.Error(err) } if err := os.MkdirAll(apiDir, 0777); err != nil { t.Error(err) } if err := ioutil.WriteFile(apiDir + "/stations...
[ -0.3803732097148895, -0.021526707336306572, 0.8623101115226746, 0.17783233523368835, 0.5623274445533752, 0.4905282258987427, 1.570406436920166, -0.7505289912223816, 0.06742171198129654, -0.6114345788955688, -0.27617764472961426, -0.650875449180603, -0.14867962896823883, 0.5489455461502075,...
func ObjectGetAttr(o Object, attr string) Object { // FIXME return nil }
[ 0.9539792537689209, -1.3275002241134644, 0.46131646633148193, 0.8075076937675476, -0.7802400588989258, -0.5820237398147583, 0.33248794078826904, 0.24880056083202362, 0.7989961504936218, -0.2550950050354004, -0.20515596866607666, 0.04132944345474243, 0.9032999277114868, -0.7110642194747925,...
func ObjectRepr(o Object) Object { // FIXME return String(fmt.Sprintf("<%s %v>", o.Type().Name, o)) }
[ -0.3494452238082886, -0.16378150880336761, 0.8774684071540833, -0.9534658193588257, -1.2068437337875366, 0.0895642414689064, -0.9050247669219971, -0.399300217628479, 0.8392369747161865, 0.3816072344779968, -0.32947227358818054, 0.30529850721359253, 0.9192096590995789, -0.9563463926315308, ...
func NewMemoryCache(options ...Option) (LoadingCache, error) { res := memoryCache{ postFlushFn: func() {}, maxKeys: 1000, maxValueSize: 0, } for _, opt := range options { if err := opt(&res); err != nil { return nil, errors.Wrap(err, "failed to set cache option") } } onEvicted := func(key inte...
[ 0.6533164381980896, -0.006547954864799976, 0.6444593667984009, 0.01885034516453743, -1.074668049812317, -0.5114405155181885, -0.4109926223754883, -0.4256258010864258, 0.47164595127105713, 0.3647758960723877, 0.052819397300481796, -0.031254205852746964, -0.9768320918083191, 0.64591073989868...
func (m *memoryCache) Get(key Key, fn func() ([]byte, error)) (data []byte, err error) { mkey := key.Merge() if b, ok := m.bytesCache.Get(mkey); ok { return b.([]byte), nil } if data, err = fn(); err != nil { return data, err } if m.allowed(data) { m.bytesCache.Add(mkey, data) atomic.AddInt64(&m.currentS...
[ -0.23387761414051056, 0.9479640126228333, 0.7632868885993958, 0.1591152846813202, -0.27612048387527466, -0.8878090381622314, -1.2236994504928589, -0.036246977746486664, -0.026338933035731316, -0.057477205991744995, 0.20433585345745087, 0.5871244072914124, -0.6267042756080627, 0.02620399929...
func (m *memoryCache) Flush(req FlusherRequest) { if len(req.scopes) == 0 { m.bytesCache.Purge() go m.postFlushFn() return } // check if fullKey has matching scopes inScope := func(fullKey string) bool { key, err := ParseKey(fullKey) if err != nil { return false } for _, s := range req.scopes { ...
[ -0.6916071176528931, -0.26309457421302795, 0.6776747703552246, -0.13692346215248108, -0.6458890438079834, -0.7368636727333069, 0.45483773946762085, -0.14028596878051758, 0.36272576451301575, 0.4884573519229889, 0.009024705737829208, 0.6637843251228333, -0.7316479086875916, 1.52264952659606...
func GetByLabel(key, value string) ([]machineconfigv1.MachineConfigPool, error) { selector := labels.NewSelector() req, err := labels.NewRequirement(key, selection.Equals, []string{value}) if err != nil { return nil, err } selector = selector.Add(*req) mcps := &machineconfigv1.MachineConfigPoolList{} if err :=...
[ -0.6039282083511353, -0.5433260798454285, 0.6919138431549072, -0.30263763666152954, -0.22737982869148254, -0.28928142786026, -0.23157386481761932, -0.46209338307380676, -0.1608542948961258, 1.1980009078979492, 0.22425197064876556, 0.8355255126953125, -0.5237324237823486, 0.2047832459211349...
func GetByName(name string) (*machineconfigv1.MachineConfigPool, error) { mcp := &machineconfigv1.MachineConfigPool{} key := types.NamespacedName{ Name: name, Namespace: metav1.NamespaceNone, } err := testclient.GetWithRetry(context.TODO(), key, mcp) return mcp, err }
[ 0.17758770287036896, 0.3069150149822235, 0.47616949677467346, -0.31541430950164795, -0.6534028649330139, -0.4300827085971832, 0.38327571749687195, -0.6538994312286377, -0.43381062150001526, 0.6914257407188416, -0.523245096206665, 1.4893155097961426, -1.0891209840774536, -0.0189241841435432...
func GetByNameNoRetry(name string) (*machineconfigv1.MachineConfigPool, error) { mcp := &machineconfigv1.MachineConfigPool{} key := types.NamespacedName{ Name: name, Namespace: metav1.NamespaceNone, } err := testclient.Client.Get(context.TODO(), key, mcp) return mcp, err }
[ 0.07596969604492188, 0.32790616154670715, 0.4057692885398865, -0.6537399888038635, -0.23586450517177582, -0.7650110125541687, -0.127657949924469, -0.6774626970291138, -0.05204363539814949, 0.6303801536560059, -0.14856897294521332, 1.5651158094406128, -0.968205451965332, -0.0258401352912187...
func GetByProfile(performanceProfile *performancev2.PerformanceProfile) (string, error) { mcpLabel := profile.GetMachineConfigLabel(performanceProfile) key, value := components.GetFirstKeyAndValue(mcpLabel) mcpsByLabel, err := GetByLabel(key, value) if err != nil { return "", err } performanceMCP := &mcpsByLabe...
[ 0.1065477728843689, -0.10927312076091766, 0.657456636428833, 0.14926719665527344, -0.7212777137756348, -0.0481145977973938, 0.8521808385848999, -0.7160875201225281, -0.9532235264778137, 0.8715462684631348, 0.16597138345241547, 0.20079132914543152, -0.8620877265930176, -0.03885321691632271,...
func New(mcpName string, nodeSelector map[string]string) *machineconfigv1.MachineConfigPool { return &machineconfigv1.MachineConfigPool{ ObjectMeta: metav1.ObjectMeta{ Name: mcpName, Namespace: metav1.NamespaceNone, Labels: map[string]string{components.MachineConfigRoleLabelKey: mcpName}, }, Spe...
[ -0.5601204633712769, -0.8149549961090088, 0.47387179732322693, -0.7895529866218567, -1.0604965686798096, 0.2826341688632965, 0.011667091399431229, 0.3749504089355469, -1.4838906526565552, 0.49779611825942993, -0.059631623327732086, 0.7578874230384827, 0.2800016403198242, 0.3962130844593048...
func GetConditionStatus(mcpName string, conditionType machineconfigv1.MachineConfigPoolConditionType) corev1.ConditionStatus { mcp, err := GetByNameNoRetry(mcpName) if err != nil { // In case of any error we just retry, as in case of single node cluster // the only node may be rebooting return corev1.ConditionU...
[ -0.2666943371295929, -0.6308267116546631, 0.3531302511692047, 0.11968786269426346, -0.34146153926849365, -0.25633424520492554, 0.18622325360774994, 0.08159776777029037, -0.5340426564216614, 0.7590421438217163, 0.01946958899497986, 0.8085343241691589, -0.7347988486289978, 0.4566426873207092...
func GetConditionReason(mcpName string, conditionType machineconfigv1.MachineConfigPoolConditionType) string { mcp, err := GetByName(mcpName) ExpectWithOffset(1, err).ToNot(HaveOccurred(), "Failed getting MCP %q by name", mcpName) for _, condition := range mcp.Status.Conditions { if condition.Type == conditionType...
[ 0.4506107270717621, -0.6792746782302856, 0.2791040539741516, 0.07335978746414185, -1.0109736919403076, 0.00458877719938755, 0.2501150667667389, -0.20227718353271484, -0.2171725183725357, 0.7446284294128418, 0.06608537584543228, 1.0696498155593872, -0.8586953282356262, 0.5444966554641724, ...
func WaitForCondition(mcpName string, conditionType machineconfigv1.MachineConfigPoolConditionType, conditionStatus corev1.ConditionStatus) { var cnfNodes []corev1.Node runningOnSingleNode, err := cluster.IsSingleNode() ExpectWithOffset(1, err).ToNot(HaveOccurred()) // checking in eventually as in case of single n...
[ -0.06352473795413971, -0.018323637545108795, 0.6612182855606079, -0.10902800410985947, 0.2311249077320099, 0.011098484508693218, 0.8728195428848267, 0.3252676725387573, -0.5837361812591553, 0.4269575774669647, 0.02176676131784916, 0.17532388865947723, -0.7203505635261536, 0.407122403383255...
func WaitForConditionFunc(mcpName string, conditionType machineconfigv1.MachineConfigPoolConditionType, conditionStatus corev1.ConditionStatus, mcpCondGetter func(mcpName string, conditionType machineconfigv1.MachineConfigPoolConditionType) corev1.ConditionStatus) { var cnfNodes []corev1.Node runningOnSingleNode, er...
[ 0.134256973862648, 0.265471875667572, 0.613768994808197, 0.10596062988042831, 0.4160763919353485, 0.09965725243091583, 1.1998405456542969, 0.45041587948799133, -0.8657641410827637, 0.20260369777679443, -0.021779028698801994, 0.4357396364212036, -0.3464149832725525, 0.2816600203514099, -0...
func WaitForProfilePickedUp(mcpName string, profile *performancev2.PerformanceProfile) { runningOnSingleNode, err := cluster.IsSingleNode() ExpectWithOffset(1, err).ToNot(HaveOccurred()) testlog.Infof("Waiting for profile %s to be picked up by the %s machine config pool", profile.Name, mcpName) defer testlog.Infof(...
[ -0.04360712692141533, 0.367766410112381, 0.6504520773887634, -0.5295150279998779, 0.0000038084231164248195, 0.42186179757118225, 1.024081826210022, 0.323249876499176, -0.7964534759521484, 0.17865611612796783, -0.3075447976589203, -0.11625006049871445, -0.291824072599411, -0.117682434618473...
func WaitForDeletion(ctx context.Context, mcpKey types.NamespacedName, timeout time.Duration) error { return wait.PollImmediate(5*time.Second, timeout, func() (bool, error) { mcp := &machineconfigv1.MachineConfigPool{} if err := testclient.Client.Get(ctx, mcpKey, mcp); apierrors.IsNotFound(err) { return true, n...
[ 0.2332070916891098, 0.4330138564109802, 0.35884493589401245, -0.6842283010482788, -0.32956811785697937, 0.22895392775535583, -0.07524210214614868, -0.4976401627063751, -0.3341754078865051, 0.404265433549881, 0.04314427822828293, 0.3048856258392334, -0.4024253785610199, 0.5045185685157776, ...
func GetOrRegisterTimer(name string, r Registry) Timer { if nil == r { r = DefaultRegistry } return r.GetOrRegister(name, NewTimer).(Timer) }
[ -0.4434206485748291, 1.0026788711547852, 0.2024892121553421, 0.2199808657169342, 0.5439246296882629, -0.6828355193138123, -0.6989265084266663, 0.3227763772010803, 0.7961220145225525, 0.6048239469528198, -0.34867045283317566, 0.22751908004283905, -0.4852975904941559, 1.3174915313720703, -...
func NewCustomTimer(h Histogram, m Meter) Timer { if UseNilMetrics { return NilTimer{} } return &StandardTimer{ histogram: h, meter: m, } }
[ 1.4092329740524292, 0.12438411265611649, 0.16699732840061188, 0.466630756855011, -0.9618779420852661, -0.7904461026191711, -0.5507583022117615, 0.8841192126274109, -0.41851404309272766, -0.29091864824295044, -0.32513296604156494, 0.8701406121253967, -0.8503996133804321, 1.3536336421966553,...
func NewRegisteredTimer(name string, r Registry) Timer { c := NewTimer() if nil == r { r = DefaultRegistry } r.Register(name, c) return c }
[ 0.11087771505117416, 0.6091139316558838, -0.02363699860870838, 0.8079720139503479, -0.022411109879612923, -0.47521767020225525, -0.352409690618515, 0.419497013092041, 0.5787384510040283, 0.09797237068414688, -0.7392336130142212, 0.5092171430587769, -0.8392787575721741, 1.339111328125, 0....
func NewTimer() Timer { if UseNilMetrics { return NilTimer{} } return &StandardTimer{ histogram: NewHistogram(NewExpDecaySample(1028, 0.015)), meter: NewMeter(), } }
[ 1.0107710361480713, 0.5762366652488708, 0.2591116726398468, 0.38959577679634094, -0.7958517074584961, -0.1681804358959198, -0.4310039281845093, 0.45539921522140503, 0.10545653849840164, -0.6302491426467896, 0.20763729512691498, 0.3955228328704834, -0.44207319617271423, 1.2376556396484375, ...
func (NilTimer) Count() int64 { return 0 }
[ 0.8676897883415222, -0.3688744902610779, 0.4825572967529297, 0.03767440840601921, 0.19663259387016296, -0.3158774971961975, 0.4348943531513214, -0.4051196277141571, -0.30267712473869324, 0.2263936698436737, -0.7322927713394165, -0.5181365609169006, -0.5950601696968079, 2.592250108718872, ...
func (NilTimer) Max() int64 { return 0 }
[ 0.30179718136787415, 0.4994235932826996, 0.42538657784461975, 0.7670654654502869, 0.15560322999954224, -0.4367712140083313, -0.3546674847602844, 0.0067892251536250114, 0.20097503066062927, 0.4197045564651489, -0.35609951615333557, 0.598738968372345, -0.9587252140045166, 2.2474734783172607,...
func (NilTimer) Mean() float64 { return 0.0 }
[ 0.38096722960472107, 0.14620988070964813, 0.21113049983978271, 0.2270875722169876, 0.402732789516449, -0.2313031405210495, 0.42113998532295227, 0.13082262873649597, 0.3735436201095581, 0.574952244758606, -0.23544380068778992, 0.4642109274864197, -1.0473688840866089, 1.7862223386764526, -...
func (NilTimer) Min() int64 { return 0 }
[ 0.41720056533813477, -0.14787454903125763, 0.23468242585659027, 0.4342452883720398, -0.7701006531715393, -0.21617673337459564, -0.3258129954338074, -0.8150830268859863, 0.44131097197532654, -0.3122789263725281, -0.33760327100753784, -0.03831735625863075, -1.2059369087219238, 2.305008411407...
func (NilTimer) Percentile(p float64) float64 { return 0.0 }
[ 0.7365041375160217, 0.4489372670650482, 0.25486308336257935, -0.22218835353851318, 0.5274259448051453, -0.13190177083015442, 0.2911980450153351, -0.2804713249206543, 0.11679942160844803, -0.6251276135444641, 0.7319460511207581, -0.5866220593452454, -1.6770514249801636, 1.2538223266601562, ...
func (NilTimer) Percentiles(ps []float64) []float64 { return make([]float64, len(ps)) }
[ 0.2322046458721161, 0.7300513386726379, 0.38192442059516907, 0.07724325358867645, 0.43526846170425415, -0.228945791721344, -0.08789894729852676, -0.7107943296432495, 0.6932258009910583, 0.33064037561416626, 0.8149833679199219, -0.523539662361145, -1.2528542280197144, 0.9814420342445374, ...
func (NilTimer) Rate1() float64 { return 0.0 }
[ 0.6565293669700623, 0.3414687216281891, 0.3947276771068573, 0.7769710421562195, 0.28627490997314453, 0.1686190366744995, -0.16376923024654388, -0.2911780774593353, -0.09749922156333923, 0.578347384929657, 0.21638646721839905, 0.2233285754919052, -1.2409851551055908, 1.3921574354171753, -...
func (NilTimer) Rate5() float64 { return 0.0 }
[ 0.832099437713623, 0.4462604522705078, 0.19277863204479218, -0.1409725546836853, -0.06065759062767029, -0.22985224425792694, 0.6912082433700562, -1.0698976516723633, -0.44252654910087585, 0.3696765899658203, -0.6030613780021667, -0.04799918457865715, -1.470022439956665, 1.3537362813949585,...
func (NilTimer) Rate15() float64 { return 0.0 }
[ 1.0310968160629272, 1.1919876337051392, 0.16763785481452942, -0.5661835074424744, -0.1696121096611023, -0.06221949681639671, -0.06301581114530563, -0.8916751742362976, 0.20160630345344543, -0.05916477367281914, 0.4729437828063965, 0.3037794530391693, -0.8099786043167114, 1.1762027740478516...
func (NilTimer) RateMean() float64 { return 0.0 }
[ -0.17688001692295074, 0.3660736680030823, 0.4616837799549103, -0.22192634642124176, 0.7013059258460999, -0.11109054833650589, 0.23666247725486755, -0.179861918091774, -0.11172233521938324, 0.24792467057704926, -0.17757681012153625, 0.5074158906936646, -1.5040497779846191, 1.034447431564331...
func (NilTimer) Snapshot() Timer { return NilTimer{} }
[ 0.6586616039276123, 0.27520111203193665, 0.3419298827648163, -0.5918243527412415, -1.064601182937622, -1.0529699325561523, 0.02623620443046093, -0.15193970501422882, 0.5056185722351074, -0.9757949113845825, -0.5034302473068237, -0.7012674808502197, -0.5998713970184326, 0.6836514472961426, ...
func (NilTimer) StdDev() float64 { return 0.0 }
[ 1.2270315885543823, -0.12388672679662704, 0.5586590766906738, 0.2795025110244751, -0.4269036054611206, 0.15119309723377228, 0.6488770842552185, 0.0027394238859415054, 0.010198681615293026, -0.7129651308059692, -0.27325713634490967, 0.20253488421440125, -0.5578684210777283, 2.16769456863403...
func (NilTimer) Stop() {}
[ 0.0926070362329483, -0.7166947722434998, 0.16893130540847778, -0.26029741764068604, 0.17342935502529144, -0.09400810301303864, 0.6095513105392456, 0.2389555126428604, -0.1700226068496704, 0.5989730358123779, -1.1910619735717773, 0.40354782342910767, -1.2090102434158325, 1.5854885578155518,...
func (NilTimer) Sum() int64 { return 0 }
[ -0.4168042540550232, 0.2517070174217224, 0.3744876980781555, 0.23186057806015015, 0.3162831664085388, -0.5983739495277405, 1.046135425567627, -0.4363061785697937, 0.40490347146987915, 0.44610145688056946, -1.0695432424545288, 0.2885660231113434, -1.2000322341918945, 1.7244527339935303, -...
func (NilTimer) Time(func()) {}
[ 0.48515111207962036, -0.2902145981788635, 0.4035186171531677, 0.4947534501552582, 0.21574079990386963, -0.8702805042266846, 0.6299214959144592, -0.28009968996047974, 0.08096355944871902, 0.008476990275084972, -1.3925033807754517, -0.633784830570221, -0.16634419560432434, 2.0363636016845703...
func (NilTimer) Update(time.Duration) {}
[ -0.06176956370472908, -1.2871973514556885, 0.31282126903533936, -0.1258954405784607, -0.4809514880180359, -0.3311588168144226, -0.2951195240020752, -0.4639872610569, 0.09404457360506058, 0.7683953046798706, -0.7212162017822266, 0.40107566118240356, -0.717666506767273, 1.8051388263702393, ...
func (NilTimer) UpdateSince(time.Time) {}
[ -0.010421646758913994, 0.06777126342058182, 0.5839470624923706, 0.5269527435302734, -1.1553016901016235, -0.19817401468753815, 0.1369960904121399, 0.3770325183868408, 0.31938210129737854, 0.23246176540851593, -1.2792415618896484, 0.2232459932565689, -1.4234294891357422, 1.2318795919418335,...
func (NilTimer) Variance() float64 { return 0.0 }
[ 1.0058468580245972, -0.6661631464958191, 0.5601285696029663, 0.099174365401268, 0.8747938275337219, 0.015240543521940708, 0.9318894147872925, -0.29145747423171997, 0.030294325202703476, -0.6875831484794617, -0.46473926305770874, 0.6275420188903809, -1.0434787273406982, 2.0035386085510254, ...
func (t *StandardTimer) Count() int64 { return t.histogram.Count() }
[ 0.7018685340881348, 0.46759089827537537, 0.3015327453613281, 0.30185094475746155, 0.18087822198867798, 0.3937416076660156, 0.49308377504348755, 0.005745984148234129, -0.783128023147583, 0.4808163344860077, -0.9226076602935791, -0.3280653655529022, 0.15112604200839996, 1.5650486946105957, ...
func (t *StandardTimer) Max() int64 { return t.histogram.Max() }
[ 0.3254029452800751, 1.047430396080017, 0.2667311728000641, 0.8988627791404724, 0.07634016871452332, 0.41834455728530884, -0.298530638217926, 0.1152636855840683, -0.19921135902404785, 0.23376770317554474, -0.36384817957878113, 0.5124375224113464, -0.2997102439403534, 1.2090600728988647, 0...
func (t *StandardTimer) Mean() float64 { return t.histogram.Mean() }
[ -0.4626818299293518, 1.0460658073425293, 0.14821846783161163, 0.40433451533317566, 0.3686528205871582, 0.5524780750274658, 0.11444017291069031, 0.2337835133075714, -0.3008763790130615, 0.5917966961860657, -0.6351354718208313, 0.3788403272628784, -0.6365950703620911, 0.8573229908943176, 0...
func (t *StandardTimer) Min() int64 { return t.histogram.Min() }
[ 0.39399364590644836, 0.45287182927131653, 0.07610446214675903, 0.5654523968696594, -0.5742917060852051, 0.3359910547733307, 0.013004445470869541, -0.3305708169937134, -0.20814217627048492, -0.4813581109046936, -0.25688329339027405, 0.15060144662857056, -0.41915521025657654, 1.1782497167587...
func (t *StandardTimer) Percentile(p float64) float64 { return t.histogram.Percentile(p) }
[ 0.2623366713523865, 1.534121036529541, 0.2281562089920044, -0.020329639315605164, 0.47308024764060974, 0.17229287326335907, 0.40595072507858276, -0.1428612470626831, -0.23679324984550476, 0.031270261853933334, 0.5145716667175293, -0.8145043849945068, -1.3574810028076172, 0.5710932016372681...
func (t *StandardTimer) Percentiles(ps []float64) []float64 { return t.histogram.Percentiles(ps) }
[ 0.056043460965156555, 1.2243238687515259, 0.2798828184604645, 0.3676173985004425, 0.2688921391963959, 0.31949833035469055, 0.2372150421142578, -0.1948717087507248, 0.2721165120601654, 0.35341987013816833, 0.7704838514328003, -0.6630605459213257, -0.8148251175880432, 0.8243798613548279, -...
func (t *StandardTimer) Rate1() float64 { return t.meter.Rate1() }
[ -0.19152210652828217, 0.6587732434272766, 0.2132953554391861, 1.2432901859283447, -0.1887277513742447, 0.6241199970245361, -0.15117788314819336, -0.14149585366249084, -0.9618951678276062, 0.750773549079895, 0.42094942927360535, 0.1668161004781723, -1.1776078939437866, 0.6329697966575623, ...
func (t *StandardTimer) Rate5() float64 { return t.meter.Rate5() }
[ 0.08821720629930496, 0.7856124043464661, 0.05907905474305153, 0.45699334144592285, -0.6515557169914246, 0.2228662520647049, 0.5328058004379272, -1.147339105606079, -1.3548431396484375, 0.6159768104553223, -0.3318450450897217, -0.33037716150283813, -1.3028879165649414, 0.7119350433349609, ...
func (t *StandardTimer) Rate15() float64 { return t.meter.Rate15() }
[ 0.40933507680892944, 1.4233293533325195, 0.07311271876096725, 0.05723785609006882, -0.9493110179901123, 0.413057416677475, -0.20652984082698822, -0.4006056487560272, -0.5145988464355469, 0.10024775564670563, 0.5834609866142273, 0.08842523396015167, -0.5502678751945496, 0.4593535363674164, ...
func (t *StandardTimer) RateMean() float64 { return t.meter.RateMean() }
[ -0.9655625224113464, 0.6838186979293823, 0.28530681133270264, 0.1849357783794403, 0.050210196524858475, 0.2582382559776306, -0.1591721475124359, -0.23883959650993347, -0.8947522044181824, 0.20337720215320587, -0.1930069774389267, 0.3156193196773529, -1.3285778760910034, 0.1713722050189972,...
func (t *StandardTimer) Snapshot() Timer { t.mutex.Lock() defer t.mutex.Unlock() return &TimerSnapshot{ histogram: t.histogram.Snapshot().(*HistogramSnapshot), meter: t.meter.Snapshot().(*MeterSnapshot), } }
[ 0.43679165840148926, 0.37340331077575684, 0.43368029594421387, 0.033289238810539246, -0.7616365551948547, 0.11143392324447632, -0.2159111350774765, 0.2388295829296112, 0.10694871842861176, -0.7391663789749146, 0.07622066885232925, -0.6701803207397461, 0.34599676728248596, 0.063991092145442...
func (t *StandardTimer) StdDev() float64 { return t.histogram.StdDev() }
[ 1.0837533473968506, 0.5987435579299927, 0.44687706232070923, 0.44857561588287354, -0.3627660870552063, 0.6394954919815063, 0.9133864641189575, 0.19309674203395844, -0.35651645064353943, -0.649416446685791, -0.5133318901062012, 0.13475742936134338, -0.3545810878276825, 1.4878696203231812, ...
func (t *StandardTimer) Stop() { t.meter.Stop() }
[ -0.05511466786265373, -0.30425819754600525, 0.0063377139158546925, 0.2388804852962494, -0.06926560401916504, 1.2126092910766602, -0.07954172044992447, 0.538527250289917, -1.3041636943817139, 0.8001251220703125, -0.6723700165748596, -0.03142774850130081, -0.6607266068458557, 0.7852477431297...
func (t *StandardTimer) Sum() int64 { return t.histogram.Sum() }
[ -0.5485498905181885, 1.0662286281585693, 0.305195152759552, 0.4289926588535309, 0.22301091253757477, 0.07296080887317657, 1.014893889427185, -0.11597062647342682, -0.13101914525032043, 0.36033183336257935, -1.0640891790390015, 0.38154593110084534, -0.535342812538147, 0.9237484931945801, ...
func (t *StandardTimer) Time(f func()) { ts := time.Now() f() t.Update(time.Since(ts)) }
[ -0.3024512231349945, 0.8148676156997681, 0.4854057729244232, 0.484811395406723, -0.2978954017162323, 0.35059747099876404, 0.2474965751171112, 0.9155848026275635, -1.23879075050354, 0.7691603899002075, -1.1576966047286987, -0.5069279074668884, 0.7968848347663879, 0.8857866525650024, -0.82...
func (t *StandardTimer) Update(d time.Duration) { t.mutex.Lock() defer t.mutex.Unlock() t.histogram.Update(int64(d)) t.meter.Mark(1) }
[ -0.31678515672683716, 0.7153754234313965, 0.22465966641902924, -0.12421350926160812, -0.09624775499105453, 0.7322313785552979, 0.14342886209487915, 0.2243957817554474, -0.37923070788383484, 0.5157294869422913, -0.28111374378204346, 0.4208333492279053, -0.30805519223213196, 1.08547055721282...
func (t *StandardTimer) UpdateSince(ts time.Time) { t.mutex.Lock() defer t.mutex.Unlock() t.histogram.Update(int64(time.Since(ts))) t.meter.Mark(1) }
[ -0.17593026161193848, 0.9801140427589417, 0.6163965463638306, 0.17487724125385284, -0.5376220941543579, 0.5269927382469177, 0.23328378796577454, 0.7068375945091248, -0.09784531593322754, 0.0856693834066391, -0.8751133680343628, 0.5812802314758301, -0.8090115189552307, 0.4360054135322571, ...
func (t *StandardTimer) Variance() float64 { return t.histogram.Variance() }
[ 0.6110897064208984, 0.2682623863220215, 0.3729042410850525, 0.36089688539505005, 0.9501219987869263, 0.5806793570518494, 0.9284621477127075, 0.10486923903226852, -0.5967251062393188, -0.9113990068435669, -0.7118099331855774, 0.7239903807640076, -0.455055296421051, 1.0039966106414795, 0.2...
func (t *TimerSnapshot) Count() int64 { return t.histogram.Count() }
[ 0.05516874045133591, 0.6239950656890869, 0.2812504470348358, 0.14615273475646973, -0.3452727496623993, 0.1619454026222229, 0.24407732486724854, 0.39441627264022827, 0.06146122142672539, -0.007259456440806389, -0.5783604383468628, -0.5875269174575806, 1.1977596282958984, 1.2971692085266113,...
func (t *TimerSnapshot) Max() int64 { return t.histogram.Max() }
[ -0.13724777102470398, 1.0974037647247314, 0.22448255121707916, 0.7606285214424133, -0.2896133065223694, 0.13788266479969025, -0.5614797472953796, 0.5330649614334106, 0.6297479867935181, -0.22324442863464355, -0.11596162617206573, 0.34618037939071655, 0.7081252336502075, 1.0203919410705566,...
func (t *TimerSnapshot) Mean() float64 { return t.histogram.Mean() }
[ -1.1209278106689453, 1.0120899677276611, 0.16648979485034943, 0.12585119903087616, 0.022391226142644882, 0.26090142130851746, -0.14564386010169983, 0.4274443984031677, 0.522247850894928, 0.27364039421081543, -0.29961276054382324, 0.3441624939441681, 0.4120306074619293, 0.6293061375617981, ...
func (t *TimerSnapshot) Min() int64 { return t.histogram.Min() }
[ -0.07000994682312012, 0.462762713432312, -0.02917393296957016, 0.4231089949607849, -0.9604490995407104, 0.030769314616918564, -0.3253709673881531, -0.0861891359090805, 0.6642054915428162, -0.9510298371315002, 0.0027841501869261265, 0.07552473992109299, 0.5710128545761108, 0.903572320938110...
func (t *TimerSnapshot) Percentile(p float64) float64 { return t.histogram.Percentile(p) }
[ -0.3524228036403656, 1.4870928525924683, 0.15232640504837036, -0.04305948317050934, 0.23014359176158905, 0.14568942785263062, -0.036062806844711304, -0.0889771580696106, 0.35506972670555115, -0.1719445288181305, 0.6651274561882019, -0.7989477515220642, -0.32043924927711487, 0.2474127709865...
func (t *TimerSnapshot) Percentiles(ps []float64) []float64 { return t.histogram.Percentiles(ps) }
[ -0.40009379386901855, 1.1953661441802979, 0.27508479356765747, 0.31391388177871704, 0.08074285835027695, 0.24762289226055145, -0.11432063579559326, -0.07417739927768707, 0.7661839723587036, 0.08801811188459396, 0.9773637056350708, -0.6125478148460388, -0.00966378953307867, 0.59571772813797...
func (t *TimerSnapshot) Rate1() float64 { return t.meter.Rate1() }
[ -0.565248429775238, 0.6527944803237915, 0.2850964665412903, 1.1044299602508545, -0.18028070032596588, 0.5949552059173584, -0.31572258472442627, 0.0028909530956298113, -0.09653837978839874, 0.47153952717781067, 0.5983923673629761, 0.13427674770355225, -0.24092170596122742, 0.317162185907363...
func (t *TimerSnapshot) Rate5() float64 { return t.meter.Rate5() }
[ -0.31494805216789246, 0.7427803874015808, 0.14112620055675507, 0.32076388597488403, -0.6945645809173584, 0.21578149497509003, 0.38684937357902527, -0.9361177682876587, -0.4325660169124603, 0.3338931202888489, -0.13591066002845764, -0.28391480445861816, -0.23195068538188934, 0.3661883473396...
func (t *TimerSnapshot) Rate15() float64 { return t.meter.Rate15() }
[ -0.0027795222122222185, 1.397949457168579, 0.2086460292339325, -0.0007979870424605906, -0.9124075770378113, 0.42195454239845276, -0.31980448961257935, -0.2028316855430603, 0.29974475502967834, -0.09580834954977036, 0.794175922870636, -0.0204782672226429, 0.3974449038505554, 0.2514690756797...
func (t *TimerSnapshot) RateMean() float64 { return t.meter.RateMean() }
[ -1.2320668697357178, 0.5888897180557251, 0.3784888982772827, -0.029278459027409554, -0.15948806703090668, 0.29164448380470276, -0.2836456894874573, -0.09089764207601547, 0.07750207930803299, -0.034609295427799225, -0.007280662190169096, 0.24156807363033295, -0.2693864107131958, 0.025095110...
func (t *TimerSnapshot) Snapshot() Timer { return t }
[ -0.2782015800476074, 0.26490849256515503, 0.22202444076538086, -0.2788699269294739, -0.9216696619987488, 0.2416040003299713, 0.21333251893520355, 0.4088875353336334, 0.8047407269477844, -0.793086051940918, -0.5989276170730591, -0.6360270380973816, 0.11004660278558731, -0.02134079858660698,...
func (t *TimerSnapshot) StdDev() float64 { return t.histogram.StdDev() }
[ 0.5947192907333374, 0.733728289604187, 0.3024695813655853, 0.29051440954208374, -0.5843408107757568, 0.5388222336769104, 0.6371689438819885, 0.6085879802703857, 0.3922092318534851, -0.9192724227905273, -0.4371699094772339, 0.044333674013614655, 0.4928617477416992, 1.136366605758667, -0.0...
func (t *TimerSnapshot) Stop() {}
[ -1.784684419631958, -0.024429038166999817, 0.26618677377700806, 0.16549676656723022, -0.6730470657348633, 0.6462841033935547, 0.2787353992462158, 1.0853527784347534, 0.33417585492134094, 0.42478662729263306, -0.9086295962333679, -0.3763151168823242, 0.529744029045105, 0.6669888496398926, ...
func (t *TimerSnapshot) Sum() int64 { return t.histogram.Sum() }
[ -1.0487220287322998, 1.044691562652588, 0.24452102184295654, 0.1898501217365265, -0.19663764536380768, -0.1833561509847641, 0.7336171269416809, 0.2987082898616791, 0.6901651620864868, -0.10945874452590942, -0.7139490842819214, 0.1448775827884674, 0.43631866574287415, 0.7214650511741638, ...
func (t *TimerSnapshot) Variance() float64 { return t.histogram.Variance() }
[ 0.07928561419248581, 0.24913518130779266, 0.2876236140727997, 0.052510835230350494, 0.6047651767730713, 0.3146384358406067, 0.4658549726009369, 0.2863938808441162, 0.1279236078262329, -1.221801519393921, -0.3829900920391083, 0.5937108397483826, 0.41887494921684265, 0.642903745174408, -0....
func Success(w http.ResponseWriter) { w.Write(JSON(SuccessResponse{Message: "success", Code: 200})) }
[ -0.34359225630760193, -0.4570096433162689, 0.1885116547346115, 0.21454358100891113, -0.45358985662460327, 0.12066258490085602, 0.6224411129951477, -0.03223084285855293, -0.1469539850950241, 0.14883926510810852, -1.1854808330535889, -0.04951159283518791, 0.9912106394767761, 0.53801280260086...
func JSONString(e interface{}) string { return string(JSON(e)) }
[ -1.2358698844909668, -0.3740054965019226, 0.4686363637447357, -0.462597131729126, -1.1822586059570312, 0.2375684231519699, -0.017605852335691452, -1.1176611185073853, 0.7151538729667664, 0.37264513969421387, -0.1300736367702484, -0.1902422159910202, 1.4260247945785522, 0.34502825140953064,...
func JSON(e interface{}) []byte { contents, err := json.Marshal(e) if err != nil { return []byte{} } return contents }
[ -0.3354008197784424, -0.030328862369060516, 0.6113666892051697, -0.399016410112381, -0.7955502271652222, -0.44681021571159363, -0.1703391820192337, -0.8167158365249634, 0.5590678453445435, -0.5341636538505554, -0.5048380494117737, 0.9110450148582458, 0.47419145703315735, 0.906541645526886,...
func UnmarshalRequestBody(r *http.Request, v interface{}) error { if r == nil { return errors.New("http request must be non-nil") } contents, err := ioutil.ReadAll(r.Body) if err != nil { return err } err = json.Unmarshal(contents, v) if err != nil { return err } return nil }
[ -0.4811910092830658, -0.09923354536294937, 0.8395200967788696, -0.4873131811618805, -0.8438354134559631, -0.4341273307800293, -0.8819593191146851, -0.49570170044898987, 0.4987262785434723, 0.19893485307693481, 0.2968997061252594, -0.22652117908000946, -0.4060143530368805, 0.493994534015655...
func calcDiffAdjustBitcoin(start, end *wire.BlockHeader, p *Params) uint32 { duration := end.Timestamp.Unix() - start.Timestamp.Unix() minRetargetTimespan := int64(p.TargetTimespan.Seconds()) / p.RetargetAdjustmentFactor maxRetargetTimespan := int64(p.TargetTimespan.Seconds()) * p.RetargetAdjustmentFactor if...
[ -0.29917317628860474, 0.27854442596435547, 0.8533969521522522, -0.4960736930370331, -0.4047808051109314, 0.20846420526504517, 0.31139230728149414, -0.734914243221283, -0.34057146310806274, -0.3741506040096283, 0.06906120479106903, 1.3398535251617432, -0.3114425241947174, -0.372245490550994...
func diffBitcoin( headers []*wire.BlockHeader, height int32, p *Params) (uint32, error) { ltcmode := p.Name == "litetest4" || p.Name == "litereg" || p.Name == "vtcreg" || p.Name == "litecoin" || p.Name == "vtctest" || p.Name == "vtc" //if p.Name == "regtest" { // logging.Error("REKT") // return 0x207fffff, nil...
[ -0.1318524181842804, -0.16653449833393097, 1.1043750047683716, 0.13213904201984406, 0.272162526845932, -0.6666425466537476, 0.23495861887931824, -0.6358456611633301, -0.8154770135879517, 0.12303174287080765, -0.1730026751756668, 0.7839655876159668, -0.9744929671287537, 0.18049554526805878,...
func calcDiffAdjustKGW( headers []*wire.BlockHeader, height int32, p *Params) (uint32, error) { var minBlocks, maxBlocks int32 minBlocks = 144 maxBlocks = 4032 if height-1 < minBlocks { return p.PowLimitBits, nil } idx := -2 currentBlock := headers[len(headers)+idx] lastSolved := currentBlock var blocksS...
[ 0.23190318048000336, 0.3714295029640198, 0.9774328470230103, 0.2677963674068451, -0.7657704949378967, -0.5469669699668884, 0.6570256352424622, -0.49191370606422424, -0.2632756531238556, -0.32418933510780334, 0.22093917429447174, 0.4114345908164978, -0.5332839488983154, 1.173444151878357, ...
func use(p unsafe.Pointer)
[ -0.2456187754869461, 0.3788915276527405, 0.49129119515419006, -0.22040703892707825, 0.22455957531929016, 0.15969040989875793, 0.22906477749347687, -0.5820248126983643, -0.2301723212003708, 0.28149303793907166, -0.19332094490528107, 0.29823586344718933, -0.9365919232368469, 0.19197283685207...
func uitoa(val uint) string { var buf [32]byte // big enough for int64 i := len(buf) - 1 for val >= 10 { buf[i] = byte(val%10 + '0') i-- val /= 10 } buf[i] = byte(val + '0') return string(buf[i:]) }
[ -1.1984236240386963, -0.22612251341342926, 0.8367432951927185, -1.0068867206573486, -0.19012917578220367, -0.4217982590198517, 0.1584574580192566, -0.6007688045501709, 0.8612470030784607, 0.1807502806186676, 0.7874616980552673, 0.38991472125053406, 0.5598589777946472, 0.5494930148124695, ...
func linkat(olddirfd uintptr, oldpath string, newdirfd int, newpath string, flags int) (err error) { var _p0 *byte _p0, err = syscall.BytePtrFromString(oldpath) if err != nil { return } var _p1 *byte _p1, err = syscall.BytePtrFromString(newpath) if err != nil { return } _, _, e1 := syscall.Syscall6(unix.SY...
[ 0.17102408409118652, -1.0395103693008423, 0.9200654029846191, -0.8109150528907776, 0.633650004863739, 0.10847323387861252, 0.3528045117855072, -0.4982430636882782, 0.18204808235168457, -0.3839416205883026, 0.1361703723669052, 0.7781317234039307, -0.31877875328063965, 0.7772846817970276, ...
func fcntl(fd uintptr, cmd int, arg int) (val int, err error) { r0, _, e1 := syscall.Syscall(syscall.SYS_FCNTL, fd, uintptr(cmd), uintptr(arg)) val = int(r0) if e1 != 0 { err = e1 // err = errnoErr(e1) } return }
[ -0.10097034275531769, -0.1516786813735962, 0.8344393968582153, 0.2601330280303955, -0.5190193057060242, -0.23982840776443481, 0.8417249321937561, 0.13087594509124756, 0.15369482338428497, -0.38800498843193054, 0.3556746542453766, -0.2660669982433319, 0.4646821618080139, 0.6109709143638611,...
func testList(t *testing.T) *List { c := testClient() c.BaseURL = mockResponse("lists", "list-api-example.json").URL list, err := c.GetList("4eea4ff", Defaults()) if err != nil { t.Fatal(err) } return list }
[ 0.11006384342908859, -0.38261258602142334, 0.2941667437553406, 0.010074655525386333, 0.994186282157898, -0.132151260972023, -0.5891039371490479, 0.5061291456222534, 1.1723698377609253, -0.06980334967374802, -1.2864469289779663, -0.6379202604293823, -0.2963509261608124, 0.4818788766860962, ...
func (e TransportSize) PLC4XEnumName() string { switch e { case TransportSize_BOOL: return "BOOL" case TransportSize_BYTE: return "BYTE" case TransportSize_WORD: return "WORD" case TransportSize_DWORD: return "DWORD" case TransportSize_LWORD: return "LWORD" case TransportSize_INT: return "INT" case ...
[ -0.6490442752838135, -0.655351459980011, 1.0658811330795288, -1.2629565000534058, -1.0781562328338623, 0.24389277398586273, -0.6397686004638672, 0.22434522211551666, 0.6604031920433044, 0.5415316224098206, -0.6075459718704224, -0.1567065715789795, -0.058498185127973557, -0.303466260433197,...
func main() { fmt.Println(quote.Go()) useFprintf() }
[ 0.7386786341667175, -0.05026889219880104, 0.5049029588699341, 0.30101579427719116, 0.9971963167190552, -0.5442466139793396, 0.592188835144043, 0.5647224187850952, -0.9032641649246216, -0.1679438352584839, -0.14683020114898682, 1.2754545211791992, -0.02761724404990673, 1.1327365636825562, ...
func NewTTExtractor( database db.Writer, conf *cnf.VTEConf, colgenFn colgen.AlignedColGenFn, statusChan chan Status, stopChan <-chan os.Signal, ) (*TTExtractor, error) { filter, err := LoadCustomFilter(conf.Filter.Lib, conf.Filter.Fn) if err != nil { return nil, err } ans := &TTExtractor{ database: ...
[ -0.30201566219329834, -0.41300225257873535, 0.4938327372074127, -0.6645768284797668, -0.8539905548095703, -1.238308310508728, 0.16582313179969788, 0.27728763222694397, -0.7626802325248718, 0.43258851766586304, -0.48552030324935913, -0.3157927989959717, -0.29424574971199036, 0.8329811692237...
func (tte *TTExtractor) ProcToken(tk *vertigo.Token, line int, err error) error { select { case s := <-tte.stopChan: return fmt.Errorf("received stop signal: %s", s) default: } if err != nil { return tte.handleProcError(line, err) } tte.lineCounter = line if tte.filter.Apply(tk, tte.attrAccum) { tte.token...
[ 0.11308027803897858, -0.49679890275001526, 0.5852051377296448, -0.6431519985198975, 0.09418072551488876, -0.7536608576774597, 0.25622788071632385, 0.22563771903514862, -0.4530339241027832, -0.02755901776254177, -0.2702256441116333, -0.183286651968956, 0.4824007749557495, 0.4745163321495056...
func (tte *TTExtractor) ProcStruct(st *vertigo.Structure, line int, err error) error { select { case s := <-tte.stopChan: return fmt.Errorf("received stop signal: %s", s) default: } if err != nil { // error from the Vertigo parser return tte.handleProcError(line, err) } tte.lineCounter = line err2 := tte.at...
[ 0.2808181345462799, -1.1578961610794067, 0.6094815731048584, -0.8325461745262146, -0.566577672958374, -0.673730731010437, 0.1390371024608612, -0.24760964512825012, -0.3018089234828949, -0.5156219005584717, 0.2589101791381836, -0.3074813783168793, 0.41522660851478577, 0.5405710339546204, ...
func (tte *TTExtractor) ProcStructClose(st *vertigo.StructureClose, line int, err error) error { select { case s := <-tte.stopChan: return fmt.Errorf("received stop signal: %s", s) default: } if err != nil { // error from the Vertigo parser return tte.handleProcError(line, err) } accumItem, err2 := tte.attrA...
[ 0.3663308322429657, -0.7406198978424072, 0.6872448921203613, -0.35592174530029297, -0.22447055578231812, -0.1143709048628807, 0.34484124183654785, -0.11089733242988586, -0.24404798448085785, 0.08094701170921326, 0.24329838156700134, -0.5703649520874023, -0.3228611350059509, 0.4871193468570...
func (tte *TTExtractor) acceptAttr(structName string, attrName string) bool { tmp := tte.structures[structName] for _, v := range tmp { if v == attrName { return true } } return false }
[ -0.42098507285118103, -0.43299999833106995, 0.40003490447998047, -1.1071524620056152, -1.2824960947036743, 0.5648965239524841, 0.10886829346418381, 0.2395947426557541, -0.7766507267951965, 0.6396494507789612, 1.014032244682312, -0.579438328742981, -0.07086063921451569, 0.5983107089996338, ...
func (tte *TTExtractor) Run(conf *vertigo.ParserConf) error { log.Print("INFO: using zero-based indexing when reporting line errors") log.Printf("Starting to process the vertical file %s...", conf.InputFilePath) tte.attrNames = tte.generateAttrList() var err error tte.docInsert, err = tte.database.PrepareInsert("l...
[ 0.3872102200984955, -0.7453934550285339, 0.7850509285926819, -0.05654774606227875, 0.9367095232009888, 0.00863620638847351, 0.7491699457168579, 0.8407768607139587, -1.5633704662322998, 0.2722517251968384, -0.2830389738082886, -0.6030568480491638, -0.4778292775154114, 0.4124405086040497, ...
func (f FlagHandler) Create(c echo.Context) error { req := request.CreateFlagRequest{} if err := c.Bind(&req); err != nil { logrus.Errorf("flag handler bind (create): %s", err.Error()) return echo.NewHTTPError(http.StatusBadRequest, ErrInvalidJSONSyntax.Error()) } if err := req.Validate(); err != nil { logr...
[ -0.6293187737464905, 0.4151322841644287, 0.6799228191375732, 0.553712010383606, 0.31311070919036865, 0.9956789612770081, 0.05444890633225441, -0.4070485532283783, -0.9505027532577515, 0.33072352409362793, -0.6000542640686035, -0.14433565735816956, -0.3904816210269928, 1.0049442052841187, ...
func (f FlagHandler) Delete(c echo.Context) error { id, err := strconv.ParseInt(c.Param("id"), 0, 64) if err != nil { logrus.Errorf("flag handler param (delete): %s", err.Error()) return echo.NewHTTPError(http.StatusBadRequest) } if err := f.FlagRepo.Delete(id); err != nil { logrus.Errorf("flag handler faile...
[ -0.20031799376010895, 0.8095810413360596, 0.43941614031791687, 0.5031149983406067, 0.19710876047611237, 0.8979873657226562, 0.07004565745592117, 0.39144986867904663, -0.7190515995025635, 0.3157358467578888, 0.024537954479455948, 0.12114924192428589, -1.014127492904663, 0.7120734453201294, ...
func (f FlagHandler) Update(c echo.Context) error { id, err := strconv.ParseInt(c.Param("id"), 0, 64) if err != nil { logrus.Errorf("flag handler param (update): %s", err.Error()) return echo.NewHTTPError(http.StatusBadRequest) } req := request.UpdateFlagRequest{} if err := c.Bind(&req); err != nil { logru...
[ -0.5636196136474609, 0.017230181023478508, 0.6325893998146057, 0.3581334948539734, -0.310266375541687, 1.0303974151611328, 0.0348639078438282, -0.15430167317390442, -0.8429290652275085, -0.00838144589215517, -0.5756337642669678, 0.36841070652008057, -0.5125553607940674, 0.6638153791427612,...
func (f FlagHandler) FindByID(c echo.Context) error { id, err := strconv.ParseInt(c.Param("id"), 0, 64) if err != nil { logrus.Errorf("flag handler param (find by id): %s", err.Error()) return echo.NewHTTPError(http.StatusBadRequest) } flag, err := f.FlagRepo.FindByID(id) if err != nil { if err == model.Err...
[ 0.0737842321395874, 0.2698427140712738, 0.46809667348861694, -0.08083821088075638, -0.17549438774585724, 0.3652912676334381, 0.19328910112380981, -0.6386023759841919, -0.7466204762458801, 0.40842345356941223, -0.732486367225647, 0.1664506047964096, -0.8683050274848938, 1.7869529724121094, ...
func (f FlagHandler) FindByTag(c echo.Context) error { req := request.FindFlagsByTagRequest{} if err := c.Bind(&req); err != nil { logrus.Errorf("flag handler bind (find by tag): %s", err.Error()) return echo.NewHTTPError(http.StatusBadRequest, ErrInvalidJSONSyntax.Error()) } if err := req.Validate(); err != ...
[ 0.27353930473327637, 0.20887231826782227, 0.5486927628517151, -0.02565832994878292, -0.07524017244577408, -0.04209785535931587, 0.5862058997154236, -0.8156099319458008, -1.0654592514038086, 0.4038129448890686, -0.6658077239990234, -0.11868691444396973, -0.6336717009544373, 1.78652787208557...