text
stringlengths
11
6.3k
embedding
listlengths
768
768
func (m *List) SetItems(value []ListItemable)() { m.items = value }
[ 0.01764458231627941, 0.33892595767974854, 0.26632294058799744, 0.44313374161720276, 0.3204827606678009, 0.6860560774803162, -0.10957792401313782, 0.2602124810218811, -0.2417670339345932, -0.5827459692955017, -0.7287836670875549, -0.6009833812713623, -0.22249150276184082, 0.7262533903121948...
func (m *List) SetList(value ListInfoable)() { m.list = value }
[ 0.10043223947286606, 0.3420725464820862, 0.07913126051425934, 1.191355586051941, 0.7692409157752991, 0.8165114521980286, 0.08197737485170364, 1.187362551689148, -0.22599536180496216, -0.2681482434272766, -1.2814807891845703, -1.4091366529464722, 0.3140530288219452, 1.214032530784607, -0....
func (m *List) SetOperations(value []RichLongRunningOperationable)() { m.operations = value }
[ -0.40663275122642517, 1.3659957647323608, 0.38555052876472473, 0.8444601893424988, 0.455082505941391, -0.29614534974098206, 1.037742257118225, -0.188058540225029, 0.4524766802787781, -0.5033736824989319, -0.8013713359832764, -1.663631558418274, -0.4280601143836975, 0.8380582332611084, -0...
func (m *List) SetSharepointIds(value SharepointIdsable)() { m.sharepointIds = value }
[ -0.04896804690361023, 0.028847569599747658, 0.2574740946292877, 0.4688050150871277, 0.11751038581132889, 0.8585112690925598, 0.4169371426105499, 1.0955960750579834, 0.33663472533226013, 1.4718114137649536, -1.2987196445465088, -0.26081401109695435, -0.10027115046977997, -0.0951295495033264...
func (m *List) SetSubscriptions(value []Subscriptionable)() { m.subscriptions = value }
[ 0.193580761551857, 0.918362021446228, 0.24423173069953918, 1.6054638624191284, 0.37804853916168213, -0.06887712329626083, 0.19652174413204193, -0.7405122518539429, -0.4422266483306885, -0.2351362705230713, -0.9300594925880432, -0.7892719507217407, 0.062082868069410324, 1.4120968580245972, ...
func (m *List) SetSystem(value SystemFacetable)() { m.system = value }
[ -0.3639945089817047, 1.013985514640808, 0.3055547773838043, 1.7444988489151, 0.2178678661584854, -0.05880759283900261, 0.821439802646637, -0.47626903653144836, -0.04926596209406853, -0.2638595402240753, -0.886887788772583, -0.39158347249031067, -0.1925971359014511, 1.6509634256362915, -0...
func Chair(v string) parameter.Parameter { return Other("CHAIR") }
[ 0.9000856280326843, -0.1731082946062088, 0.1671132743358612, -0.18750742077827454, -0.11796884983778, 0.7390865087509155, -0.1896400898694992, -1.0520600080490112, 0.537547767162323, 0.4164908230304718, 0.38612329959869385, 1.1679673194885254, 0.2653481960296631, 0.43922504782676697, -0....
func ReqParticipant() parameter.Parameter { return Other("REQ-PARTICIPANT") }
[ 0.057732973247766495, -0.5531964898109436, 0.6420977711677551, 0.5180907249450684, 0.4503697156906128, 0.470227986574173, 0.1897844821214676, 0.06376003473997116, 0.45157819986343384, -0.2085801661014557, 0.35741180181503296, -0.2926238477230072, -1.2039545774459839, -0.34556081891059875, ...
func OptParticipant() parameter.Parameter { return Other("OPT-PARTICIPANT") }
[ 0.32266414165496826, -0.47970905900001526, 0.5419557094573975, -0.8207342624664307, 0.12536048889160156, 0.3953688442707062, 0.6523526310920715, -0.0057125091552734375, 0.8689048886299133, 0.800640881061554, 0.4881472587585449, -0.2782224118709564, -1.2865086793899536, -0.8831517100334167,...
func NonParticipant() parameter.Parameter { return Other("NON-PARTICIPANT") }
[ -0.013789955526590347, -0.7352877259254456, 0.3373867869377136, -0.5047873854637146, -0.372305303812027, 0.5308101177215576, 0.7740454077720642, -0.6638824343681335, 0.02720903791487217, 0.6747558116912842, -0.00301825487986207, -0.34799033403396606, -1.2944831848144531, -0.322672277688980...
func Other(v string) parameter.Parameter { return parameter.Single(ROLE, v) }
[ -0.12167365103960037, -0.17633084952831268, 0.20526786148548126, -0.6397916078567505, 0.17267756164073944, 0.31323760747909546, -0.5293792486190796, -0.6446128487586975, 0.439078688621521, 0.3301297724246979, 0.13454337418079376, 0.7267172336578369, -0.016817105934023857, 0.583584725856781...
func (s *ImmutableState) CommonPool() (*quantity.Quantity, error) { _, value := s.Snapshot.Get(commonPoolKeyFmt.Encode()) if value == nil { return &quantity.Quantity{}, nil } var q quantity.Quantity if err := cbor.Unmarshal(value, &q); err != nil { return nil, err } return &q, nil }
[ -0.43089452385902405, -0.17500890791416168, 0.5526827573776245, 0.028533950448036194, -0.14220117032527924, 0.023879894986748695, 0.7006179690361023, -0.27717337012290955, 0.6459499001502991, -0.16549116373062134, 0.19501051306724548, 0.0006850719219073653, -0.14755669236183167, -0.1472245...
func (s *ImmutableState) Thresholds() (map[staking.ThresholdKind]quantity.Quantity, error) { params, err := s.ConsensusParameters() if err != nil { return nil, err } return params.Thresholds, nil }
[ -0.4999343454837799, 0.0482875257730484, 0.38393571972846985, 0.4462146461009979, 0.2309969961643219, -0.4146006405353546, -0.012686729431152344, -0.8777323961257935, -0.5431301593780518, 0.8877873420715332, 0.2932983636856079, 0.12281841784715652, -0.15292513370513916, 0.5878908038139343,...
func (s *ImmutableState) EscrowBalance(id signature.PublicKey) *quantity.Quantity { account := s.Account(id) return account.Escrow.Active.Balance.Clone() }
[ 0.4076867699623108, -0.1336129903793335, 0.4072861969470978, 0.11580850183963776, -0.46120795607566833, -0.09427716583013535, 0.2616850435733795, -1.114582896232605, 0.85068678855896, 0.37944895029067993, -0.7168118357658386, 0.20269355177879333, -0.45756974816322327, -0.0744440034031868, ...
func (s *MutableState) SlashEscrow(ctx *abci.Context, fromID signature.PublicKey, amount *quantity.Quantity) (bool, error) { commonPool, err := s.CommonPool() if err != nil { return false, fmt.Errorf("staking: failed to query common pool for slash: %w", err) } from := s.Account(fromID) // Compute the amount we...
[ 0.16167564690113068, 0.5355336666107178, 1.0812394618988037, -0.2771739959716797, -0.2108900547027588, 0.38525983691215515, 1.7979081869125366, -0.6299372911453247, -0.18853908777236938, 0.8583160042762756, -0.6772489547729492, -0.4275367856025696, -0.5663942098617554, -0.18214181065559387...
func (s *MutableState) TransferFromCommon(ctx *abci.Context, toID signature.PublicKey, amount *quantity.Quantity) (bool, error) { commonPool, err := s.CommonPool() if err != nil { return false, errors.Wrap(err, "staking: failed to query common pool for transfer") } to := s.Account(toID) transfered, err := quant...
[ 0.2234770655632019, 0.33953291177749634, 0.8534558415412903, 0.20051661133766174, -0.2863315939903259, 0.6813857555389404, 0.6337284445762634, -1.1662603616714478, -0.20427003502845764, 0.606563150882721, -0.548257052898407, 0.029680412262678146, -0.6929600238800049, -0.4112391173839569, ...
func (s *MutableState) AddRewards(time epochtime.EpochTime, factor *quantity.Quantity, accounts []signature.PublicKey) error { steps, err := s.RewardSchedule() if err != nil { return err } var activeStep *staking.RewardStep for _, step := range steps { if time < step.Until { activeStep = &step break } ...
[ 0.23706872761249542, 0.29819151759147644, 0.6345246434211731, -0.17409561574459076, 0.47334298491477966, -0.3508090674877167, 0.26141172647476196, -0.5241274237632751, 0.26102104783058167, 0.7654967308044434, 0.6504338383674622, -0.2608802616596222, 0.057033851742744446, 0.6058703064918518...
func (s *MutableState) AddRewardSingleAttenuated(time epochtime.EpochTime, factor *quantity.Quantity, attenuationNumerator, attenuationDenominator int, account signature.PublicKey) error { steps, err := s.RewardSchedule() if err != nil { return err } var activeStep *staking.RewardStep for _, step := range steps ...
[ 0.3902689218521118, -0.2618095874786377, 0.6657204031944275, -0.5002229809761047, 0.09270038455724716, -0.34374332427978516, 0.23941528797149658, -0.7664554715156555, 0.23180754482746124, 0.7761013507843018, -0.5385403633117676, 0.15740811824798584, 0.5506478548049927, -0.15752272307872772...
func NewMutableState(tree *iavl.MutableTree) *MutableState { inner := &abci.ImmutableState{Snapshot: tree.ImmutableTree} return &MutableState{ ImmutableState: &ImmutableState{inner}, tree: tree, } }
[ -0.2406884729862213, -0.5324938893318176, 0.19012916088104248, 0.05962634086608887, -1.9887707233428955, -0.4053146541118622, -1.4532004594802856, -0.23105217516422272, 0.36761873960494995, 0.5054428577423096, -0.8603960275650024, -0.16247503459453583, -0.34575995802879333, -0.608560264110...
func (m *Transport) AddHandle(handle interface{}, args ...string) error { h := handle.(gin.HandlerFunc) if len(args) == 0 { m.engine.Use(h) } else if len(args) == 2 { m.engine.Handle(args[0], args[1], h) } else { return errors.New("invalid args") } return nil }
[ -0.5801388025283813, 0.7048850059509277, 0.5776413083076477, 0.8599123954772949, 1.1824628114700317, 0.7309275269508362, -0.1259469985961914, 0.43555644154548645, -1.2334717512130737, -1.3014518022537231, 0.4861321449279785, -0.30141258239746094, -0.7924711108207703, 0.07147533446550369, ...
func NewMerkleBlobAccess(blobAccess BlobAccess) BlobAccess { return &merkleBlobAccess{ BlobAccess: blobAccess, } }
[ 0.29606056213378906, -1.3336492776870728, 1.055105447769165, 0.19406569004058838, -1.1131418943405151, -0.11981416493654251, 0.5399055480957031, -0.11921653896570206, -0.39353567361831665, 0.5314608812332153, 0.07313680648803711, 0.4216550886631012, -0.7468490600585938, 0.37286749482154846...
func Restart() { log.Println("An error has occured, restarting the app") file, _ := osext.Executable() syscall.Exec(file, os.Args, os.Environ()) }
[ 0.6354398727416992, -0.3042231500148773, 0.4096100330352783, 0.6390128135681152, 0.634475588798523, 1.0259528160095215, -0.363200306892395, 0.827752947807312, -0.7834948897361755, 0.4807828366756439, 0.3136512041091919, 0.9752623438835144, -0.4216151535511017, 0.12573672831058502, 0.6994...
func (obj *subElement) Content() Content { return obj.content }
[ 0.5124956965446472, -0.7016619443893433, 0.17998193204402924, 0.6844939589500427, -1.329849123954773, 1.3320891857147217, 0.790014922618866, -1.0330750942230225, -0.286838173866272, -0.5132648348808289, -0.7381227016448975, 0.4520001709461212, 0.09878333657979965, -0.6918501257896423, -0...
func (obj *subElement) Cardinality() SpecificCardinality { return obj.cardinality }
[ 0.5109368562698364, -0.26829302310943604, 0.3603811264038086, 1.6094833612442017, 0.143649622797966, 0.35276538133621216, 0.21537315845489502, 0.99092698097229, 0.8290684223175049, -0.9401646852493286, -0.6301021575927734, 0.6795573830604553, 0.6387543082237244, 0.1666312962770462, 0.684...
func (inNode *InputNode) IsInputNode() bool { return true }
[ -0.7716814279556274, -0.36135566234588623, 0.5336732268333435, 0.061109062284231186, -1.1314055919647217, 0.22773650288581848, 0.473084419965744, 0.4951659142971039, 0.9408252835273743, -0.05094539746642113, -0.6699868440628052, 1.1455532312393188, -1.7626359462738037, -0.13224293291568756...
func (inNode *InputNode) Start() { }
[ -0.5055215358734131, -0.6822548508644104, 0.3171428143978119, 0.6278395652770996, -0.7020423412322998, 0.23162420094013214, 1.0842043161392212, 0.8182147145271301, -0.10238861292600632, -0.33741623163223267, -0.5253872275352478, 1.4799872636795044, -1.0072505474090576, 0.021656449884176254...
func (inNode *InputNode) Name() string { return inNode.name }
[ -1.1281718015670776, -0.5408413410186768, 0.5339595079421997, 0.05105970799922943, -1.465978980064392, 0.5121655464172363, 0.4011094868183136, -0.10285428911447525, -0.5161874294281006, 0.5027619004249573, -0.05020603910088539, 0.3505265414714813, -0.7218242287635803, -0.16362136602401733,...
func (inNode *InputNode) InStream() msgstream.MsgStream { return inNode.inStream }
[ 0.10331862419843674, 0.10193030536174774, 0.5107925534248352, -0.031799886375665665, -0.8188096880912781, 0.30143409967422485, 0.6002398729324341, -0.12189828604459763, 0.18423376977443695, -0.9670425653457642, 0.5312027335166931, 1.7206815481185913, -1.8029093742370605, 1.124817132949829,...
func (inNode *InputNode) Operate(in []Msg) []Msg { msgPack, ok := <-inNode.inStream.Chan() if !ok { log.Warn("MsgStream closed", zap.Any("input node", inNode.Name())) return []Msg{&MsgStreamMsg{ isCloseMsg: true, }} } // TODO: add status if msgPack == nil { return []Msg{} } sub := tsoutil.SubByNow(m...
[ -0.9083806872367859, 0.5240733027458191, 0.9118108153343201, -0.7288333177566528, 0.23332136869430542, 0.13763266801834106, 1.1217142343521118, -0.38093262910842896, -0.31681954860687256, 0.5284854769706726, 0.6989611387252808, 0.09702912718057632, -0.42337632179260254, 0.9983741044998169,...
func NewInputNode(inStream msgstream.MsgStream, nodeName string, maxQueueLength int32, maxParallelism int32, role string, nodeID int64, collectionID int64, dataType string) *InputNode { baseNode := BaseNode{} baseNode.SetMaxQueueLength(maxQueueLength) baseNode.SetMaxParallelism(maxParallelism) return &InputNode{ ...
[ 0.21444140374660492, -0.31235066056251526, 0.4302426874637604, -0.9604799747467041, -1.2315477132797241, -0.19738462567329407, -0.1558459997177124, 0.2624000012874603, -0.1110883578658104, 0.1702151894569397, 0.04325413331389427, 1.5703306198120117, -1.4775413274765015, 0.3246474266052246,...
func ODataSQLQuery(query url.Values, table string, column string, db *sql.DB) (*sql.Rows, error) { // Parse url values queryMap, err := parser.ParseURLValues(query) if err != nil { return nil, errors.Wrap(ErrInvalidInput, err.Error()) } var finalQuery strings.Builder // SELECT clause finalQuery.WriteString(...
[ 0.12351605296134949, -0.12506698071956635, 0.6295225024223328, -0.6487090587615967, -0.7612812519073486, -0.3384733498096466, -0.9472944736480713, 0.045137640088796616, 0.23050248622894287, 0.06757732480764389, 0.7901326417922974, 0.3149450719356537, 0.8907533884048462, 0.25851279497146606...
func ODataCount(db *sql.DB, table string) (int, error) { var count int selectStmt := fmt.Sprintf("SELECT count(*) FROM %s", pq.QuoteIdentifier(table)) row := db.QueryRow(selectStmt) err := row.Scan(&count) if err != nil { return 0, err } return count, nil }
[ -0.27195674180984497, 0.35377392172813416, 0.712448000907898, -0.599745512008667, -0.6484509706497192, -0.06808283179998398, 0.25808292627334595, 0.11753615736961365, -0.13657113909721375, -0.03130510821938515, -0.0954352468252182, 0.026004355400800705, 0.44053342938423157, 0.0207622349262...
func (c *Context) Factory(host string) (core.Plugin, error) { return core.Function(func(ctx context.Context, flow core.Core) { span := opentracing.SpanFromContext(ctx) span.LogFields(opentracinglog.String("event", "DiscoverService")) if len(host) == 0 { err := fmt.Errorf("host not found from upstream") blo...
[ -0.2074763923883438, 0.06659821420907974, 0.6217648386955261, -0.14725834131240845, -0.47420769929885864, -0.0804608017206192, 0.6165066957473755, -0.20846115052700043, 0.2272457629442215, -0.4132295548915863, 0.08282213658094406, 0.8688904047012329, 0.17754018306732178, 0.5463594198226929...
func init() { // var _r = net.GetRouter() // var r = _r.PathPrefix("/v1").Subrouter() var r = net.GetRouter() //route for test log.Print("cz init net_v1") r.Handle("/v3/fetchtokenizedcards", netHandle(handleDBGettokenizedcards, nil)).Methods("GET") //logicbusiness.go r.Handle("/v3/processpayment", ne...
[ 0.5355620384216309, 0.21879319846630096, 0.6299511790275574, 0.6266008615493774, 0.4811870753765106, 0.7833731770515442, 0.6597903966903687, 0.13094985485076904, 0.2567179799079895, -0.5637011528015137, -0.26777032017707825, -0.11402547359466553, -0.4442327618598938, 0.2756870985031128, ...
func handleTestV1(w http.ResponseWriter, r *http.Request) { defer func() { db.Connection.Close(nil) }() log.Print("cz handleTestV1") fmt.Fprint(w,"youtochi iso 2") rw := net.ResponseWriterJSON(w) rw.Write([]byte(`{"ready":true}`)) }
[ -0.5914489030838013, -0.5235704183578491, 0.6578460335731506, 0.47296831011772156, -0.006242990493774414, 0.3439525365829468, 0.7187150120735168, 0.35443416237831116, -0.1459975689649582, 0.6499421000480652, -0.6244542002677917, -0.304451048374176, -0.7043573260307312, -0.09768902510404587...
func handleDBPostGettokenizedcards(w http.ResponseWriter, r *http.Request) { defer func() { db.Connection.Close(nil) }() var errorGeneral string var errorGeneralNbr string var requestData modelito.RequestTokenizedCards errorGeneral="" requestData, errorGeneral=obtainPostParmsGettokenizedca...
[ -0.08953028172254562, -0.354110985994339, 0.9846563935279846, 0.17583394050598145, -0.2908954322338104, -0.11859256774187088, 0.01842237450182438, 0.06563617289066315, -0.6411919593811035, -0.28369319438934326, -0.5538944005966187, 0.09439712762832642, -0.8041212558746338, 0.73105055093765...
func handleDBPostGeneratetokenized(w http.ResponseWriter, r *http.Request) { defer func() { db.Connection.Close(nil) }() var requestData modelito.RequestTokenized var errorGeneral string var errorGeneralNbr string errorGeneral="" requestData,errorGeneral =obtainPostParmsGeneratetokeni...
[ -0.4244495928287506, -0.3839247226715088, 0.960763156414032, 0.2239939272403717, -0.3493557572364807, 0.22877229750156403, 0.3309422433376312, -0.01634867861866951, -0.8313254117965698, -0.7643982768058777, -0.4004323482513428, -0.23157022893428802, -0.682695746421814, 1.0096426010131836, ...
func v4handleDBPostProcesspayment(w http.ResponseWriter, r *http.Request) { defer func() { db.Connection.Close(nil) }() var errorGeneral string var errorGeneralNbr string var requestData modelito.RequestPayment errorGeneral="" requestData,errorGeneral =obtainPostParmsProcessPayment(r,errorGener...
[ -0.15422464907169342, -0.44913041591644287, 0.9761967658996582, 0.09405981749296188, -0.3586358428001404, 0.08444937318563461, 0.5039461255073547, -0.10770424455404282, -0.37533125281333923, -0.0009655187604948878, 0.4486810266971588, -0.32161375880241394, -0.8099508285522461, 0.5873656272...
func v4handleDBProcesspayment(w http.ResponseWriter, r *http.Request) { defer func() { db.Connection.Close(nil) }() var errorGeneral string var errorGeneralNbr string var requestData modelito.RequestPayment errorGeneral="" requestData,errorGeneral =obtainParmsProcessPayment(r,errorGeneral) //////...
[ -0.2059268355369568, -0.29682788252830505, 0.8215694427490234, -0.07657258957624435, -0.05077856406569481, 0.14415937662124634, 0.4922163188457489, -0.036945704370737076, -0.37127169966697693, 0.08843760937452316, 0.6017264723777771, 0.07878044992685318, -0.7524173259735107, 0.679658174514...
func handleDBGeneratetokenized(w http.ResponseWriter, r *http.Request) { defer func() { db.Connection.Close(nil) }() var requestData modelito.RequestTokenized var errorGeneral string var errorGeneralNbr string errorGeneral="" requestData,errorGeneral =obtainParmsGeneratetokenized(r...
[ -0.7078261375427246, -0.3477936387062073, 1.0041059255599976, 0.2723521292209625, -0.12679696083068848, 0.21208088099956512, 0.470370352268219, 0.04934466630220413, -1.030773401260376, -0.7148234844207764, -0.48654863238334656, 0.09101472049951553, -0.480954110622406, 1.1577404737472534, ...
func (p *S3Publisher) Prune(r repo.Repo, opts *PruneOptions) error { // grouped is a make(map[string]map[string][]*s3.S3Object) // which is not ideal but it's also too soon to optimize... grouped, err := p.group(r) if err != nil { return err } to_prune := make([]*s3.S3Object, 0) for _, details := range gr...
[ -0.07941149920225143, -0.25934407114982605, 0.7362915277481079, 0.28321823477745056, 0.2541797161102295, -0.3511950969696045, 0.27625495195388794, 0.12221897393465042, -0.004643534310162067, 0.8117405772209167, 0.7416800856590271, 0.32564830780029297, -0.24139989912509918, -0.0530844852328...
func (p *S3Publisher) group(r repo.Repo) (map[string]map[string][]*s3.S3Object, error) { grouped := make(map[string]map[string][]*s3.S3Object) // Basically what we're after is something like this: // // + whosonfirst-data-venue-us-ca // + 123455 // - ...csv.bz2 // - ...db.bz2 mu := new(sync.RWMutex) ...
[ -0.32052192091941833, -0.44755983352661133, 0.45709043741226196, -0.5440113544464111, -0.4103280305862427, -0.2898884117603302, 0.5122491121292114, 0.1636165827512741, -0.17839691042900085, 0.6293097734451294, 0.05070627108216286, 0.4345119595527649, 0.07724769413471222, 0.2267837673425674...
func Bit(v int) uint32 { return uint32(1) << uint32(v) }
[ -0.18469774723052979, 0.7808646559715271, 0.34395256638526917, -0.23901143670082092, -0.6241545677185059, 1.2138001918792725, 0.23088645935058594, -1.4780279397964478, 0.2987512946128845, -0.6088386178016663, -0.15124966204166412, 0.026792075484991074, 0.29222261905670166, 0.31253293156623...
func (c *Camera) SetPostviewImageSize(size PostViewSize) (err error) { _, err = c.newRequest(endpoints.Camera, "setPostviewImageSize", size).Do() return }
[ -0.9854224324226379, 0.5040267109870911, 0.5398911833763123, 0.27985745668411255, -1.2029237747192383, -0.27147048711776733, 0.07573854178190231, -0.034290410578250885, 0.326567143201828, -1.0689364671707153, -1.0173267126083374, 0.645161509513855, -0.8027112483978271, 0.7534601092338562, ...
func (c *Camera) GetPostviewImageSize() (size string, err error) { resp, err := c.newRequest(endpoints.Camera, "getPostviewImageSize").Do() if err != nil { return } if len(resp.Result) > 0 { err = json.Unmarshal(resp.Result[0], &size) } return }
[ -0.5760663747787476, 0.8995607495307922, 0.611033022403717, 0.15597140789031982, -1.2413378953933716, -1.1455352306365967, -0.2908087968826294, -0.20421664416790009, -0.18238189816474915, -1.0864421129226685, -0.7824113368988037, 0.5963253378868103, -1.20765221118927, 0.8058446049690247, ...
func (c *Camera) GetSupportedPostviewImageSize() (sizes []string, err error) { resp, err := c.newRequest(endpoints.Camera, "getSupportedPostviewImageSize").Do() if err != nil { return } if len(resp.Result) > 0 { err = json.Unmarshal(resp.Result[0], &sizes) } return }
[ -0.8278725147247314, 0.9705905318260193, 0.7076088190078735, 0.35147392749786377, -1.2286276817321777, -1.0653657913208008, -0.8430016040802002, -0.1641198843717575, 0.07528522610664368, -0.23312997817993164, -1.4208459854125977, 0.34577253460884094, -1.138566017150879, 1.0624617338180542,...
func (c *Camera) GetAvailablePostviewImageSize() (current string, available []string, err error) { resp, err := c.newRequest(endpoints.Camera, "getAvailablePostviewImageSize").Do() if err != nil { return } if len(resp.Result) >= 1 { // Current size if err := json.Unmarshal(resp.Result[0], &current); err != n...
[ -0.9618194699287415, -0.18801717460155487, 0.5987462401390076, -0.11988477408885956, -1.2960381507873535, -0.7691551446914673, -0.33287742733955383, 0.09105586260557175, 0.0793725773692131, 0.08334656059741974, -0.4473089277744293, 0.9099823236465454, -0.8950039744377136, 1.134343028068542...
func HandleRequest(ctx context.Context, request events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error) { _, _ = pretty.Println("parsed:", request.Body) return events.APIGatewayProxyResponse{Body: "response is working", StatusCode: 200}, nil }
[ -0.25279077887535095, -0.2703980803489685, 0.6959658861160278, -1.033484697341919, 0.3988412916660309, 0.32707643508911133, 0.0637059435248375, 0.6264498233795166, 0.17799599468708038, 0.0298822820186615, 0.9758342504501343, -0.4870367646217346, -0.45127221941947937, -0.09903215616941452, ...
func New(store kvstore.KVStore) KeyValueServer { // TODO: implement this! var server keyValueServer server.clientNum = 0 server.listener = nil server.readChan = make(chan []byte) server.channelMap = make(map[net.Conn]chan []byte) // 使用接口时,返回接口类型变量, 参考 book p113 return &server }
[ -0.8967326283454895, -0.6365553140640259, 0.6249532103538513, -0.12308437377214432, -0.5894296169281006, 0.9716566801071167, -0.10115773975849152, 0.23454099893569946, -0.23025691509246826, -0.38471826910972595, 0.15986713767051697, 0.4336267411708832, -0.5624565482139587, 0.58543872833251...
func enterLobby(w http.ResponseWriter, r *http.Request) { lobby, err := getLobby(r) if err != nil { if err == noLobbyIdSuppliedError { http.Error(w, err.Error(), http.StatusBadRequest) } else if err == lobbyNotExistentError { http.Error(w, err.Error(), http.StatusNotFound) } else { http.Error(w, err.Er...
[ -0.6990194320678711, 0.14147211611270905, 1.0617754459381104, 0.2451908141374588, 0.15150287747383118, 0.33314716815948486, 0.9702680110931396, -0.4656590223312378, 0.27502310276031494, 0.6103001236915588, -0.6359782218933105, 0.0001913182932185009, -0.4844651222229004, -0.1864354014396667...
func InterceptRequest(f func(http.Header)) *RequestInterceptor { return &RequestInterceptor{Intercept: f} }
[ -0.8369058966636658, 0.2318132519721985, 0.35756292939186096, -0.5354344248771667, -0.8111135959625244, 0.12857821583747864, -0.44845592975616455, 0.26176682114601135, -0.2095552235841751, -1.067787766456604, 1.0539876222610474, -0.0023116033989936113, 0.648374080657959, -0.572127282619476...
func (m RequestInterceptor) ServeHandler(h http.Handler) http.Handler { if m.Intercept == nil { return h } return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { m.Intercept(r.Header) h.ServeHTTP(w, r) }) }
[ 0.2819182872772217, 0.3142361342906952, 0.5095421671867371, 0.3876535892486572, -0.6210967898368835, 0.29790735244750977, 0.4541798532009125, 0.560416042804718, 0.09081391245126724, 0.174483060836792, 1.099608063697815, -0.9206086993217468, -0.8692388534545898, 0.13482561707496643, 0.523...
func InterceptResponse(f ResponseInterceptFunc) *ResponseInterceptor { return &ResponseInterceptor{Intercept: f} }
[ 0.5715935230255127, 0.005242931190878153, 0.14407065510749817, -1.0595539808273315, -0.696968138217926, -0.4035690128803253, 0.5140345692634583, 0.24681417644023895, 0.6090723276138306, -0.750421941280365, -0.26254501938819885, -1.0137945413589478, 0.22232601046562195, -1.6907356977462769,...
func (m ResponseInterceptor) ServeHandler(h http.Handler) http.Handler { if m.Intercept == nil { return h } return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { nw := interceptRW{ ResponseWriter: w, f: m.Intercept, status: http.StatusOK, } defer nw.intercept()...
[ 0.8921278715133667, 0.10671136528253555, 0.4477040767669678, 0.12673301994800568, -0.7307164072990417, 0.3163301646709442, 1.0356292724609375, 0.6790182590484619, 0.3625456690788269, 0.3937251567840576, 0.5757396817207336, -1.1812649965286255, -0.8637411594390869, 0.2928987145423889, 0.0...
func (w *interceptRW) StatusCode() int { return w.status }
[ 1.1454434394836426, -0.3270817697048187, 0.36683231592178345, -0.30733466148376465, -0.07581257075071335, 0.5472794771194458, 0.6532591581344604, 1.6870068311691284, 0.0575815849006176, -0.3450508713722229, 0.2859954535961151, -0.06371361017227173, -0.8665773272514343, 0.048109401017427444...
func (w *interceptRW) Push(target string, opts *http.PushOptions) error { if w, ok := w.ResponseWriter.(http.Pusher); ok { return w.Push(target, opts) } return http.ErrNotSupported }
[ -0.1493900865316391, 0.6722592115402222, 0.329536497592926, 0.3668825924396515, -0.443015456199646, -0.13767530024051666, -0.5933905839920044, -0.43957626819610596, 0.38068535923957825, 0.25461411476135254, 0.4799273908138275, 0.1992158144712448, -0.33092597126960754, 0.36011552810668945, ...
func (w *interceptRW) Flush() { if w, ok := w.ResponseWriter.(http.Flusher); ok { w.Flush() } }
[ 0.7423283457756042, 0.3306623101234436, 0.1526184380054474, -0.33355799317359924, 0.35305342078208923, 0.15182797610759735, 0.8939154744148254, -0.6832197904586792, 0.15884606540203094, -1.0179063081741333, 0.8086209297180176, 0.17365260422229767, -0.4957018792629242, 1.767066240310669, ...
func (w *interceptRW) Hijack() (net.Conn, *bufio.ReadWriter, error) { if w, ok := w.ResponseWriter.(http.Hijacker); ok { return w.Hijack() } return nil, nil, http.ErrNotSupported }
[ 0.5809523463249207, -0.44519007205963135, 0.6835060119628906, 1.308157205581665, 0.08926969021558762, -0.28578048944473267, -0.08521860092878342, 0.9360836148262024, 0.23308657109737396, -1.2056829929351807, 0.1128605529665947, -0.8441068530082703, -0.7533652782440186, 0.3304575979709625, ...
func NewZKCluster(servers []string, clustername string, timeout time.Duration) (*ZKCluster, error) { cluster := &ZKCluster{ version: -1, } if zc, err := NewZKConnector(servers, timeout); err != nil { return nil, err } else { cluster.zc = zc } if ci, err := cluster.zc.GetCluster(clustername); err != nil { ...
[ 0.22263695299625397, -0.16323409974575043, 0.22248654067516327, 0.443770170211792, -0.5120999813079834, -0.7109913229942322, 0.4291544258594513, 0.2379220873117447, 0.4343215823173523, 0.5230457186698914, 0.3981146216392517, 0.6659224629402161, -0.6790716648101807, 0.14306727051734924, -...
func (c *ZKCluster) Connect(key []byte) (*redis.Client, func(), int64, error) { return c.connector.Connect(key) }
[ -1.2198283672332764, -0.08439991623163223, 0.3204748034477234, 0.43563514947891235, -0.733677089214325, -0.9270464777946472, 0.09322264790534973, -0.7900307774543762, -0.37510448694229126, 0.36632999777793884, -0.37201234698295593, -0.5360460877418518, -0.2994763255119324, 0.21968685090541...
func (c *ZKCluster) ReadNodes() []Shard { cluster_root := ZK_ROOT + "/" + c.info.Name if shardbytes, _, err := c.zc.conn.Get(cluster_root + "/shards"); err != nil { return nil } else { var shards []Shard if err := json.Unmarshal(shardbytes, &shards); err != nil { return nil } return shards } }
[ -0.04457665979862213, 0.19437503814697266, 0.5443680286407471, -0.23889754712581635, 0.4072837829589844, -0.5978097915649414, -0.385225772857666, -0.23698869347572327, -0.19574865698814392, 0.7974703311920166, 0.6400434374809265, 0.33413875102996826, -0.9531053304672241, -0.648752450942993...
func (c *ZKCluster) BuildRing(shards []Shard) *HashRing { switch strings.ToLower(c.info.Options.RingType) { case "consistent": nreplica, err := strconv.Atoi(c.info.Options.RingParams) if err != nil { nreplica = len(shards) } ring := &ConsistentRing{ Nreplica: nreplica, } return ring.BuildRing(shards...
[ -0.32195761799812317, 0.2909223139286041, 0.5468287467956543, 0.38407331705093384, 0.7731533646583557, 0.2462407499551773, 0.5500552654266357, -0.008015933446586132, -0.3467849791049957, 0.5211317539215088, 0.8528315424919128, -0.11300031840801239, -1.0240768194198608, -0.5133678913116455,...
func (c *ZKCluster) watchStatusUpdates() { status_node := ZK_ROOT + "/" + c.info.Name + "/status" for { exists, stat, event, err := c.zc.conn.ExistsW(status_node) if err == nil && exists && stat.Version > c.version { if statusbytes, stat, err := c.zc.conn.Get(status_node); err == nil { var status map[strin...
[ 0.572278618812561, -1.2284642457962036, 0.5886979103088379, 0.3967357277870178, 0.2540317177772522, -0.15425565838813782, -0.04576362669467926, 0.24847286939620972, -0.6131604909896851, 0.4009113609790802, -0.6752408742904663, 0.3564019799232483, -0.32231199741363525, 0.6797130107879639, ...
func (c *ZKCluster) Start(shards []Shard) <-chan ShardStatus { if c.checkerdone != nil { return c.updates } c.checkerdone = make(chan bool) c.status = make(map[string]ShardStatus, len(shards)) c.updates = make(chan ShardStatus, len(shards)) go c.watchStatusUpdates() return c.updates }
[ 0.09878265112638474, -0.5611603856086731, 0.40025952458381653, 0.251742422580719, -0.027593059465289116, -0.33989155292510986, 0.09432268887758255, 0.18345701694488525, 0.03578304871916771, 0.7786917090415955, -0.260768860578537, 0.9747927784919739, -0.5524992942810059, 0.1731218844652176,...
func (c *ZKCluster) Stop() { if c.checkerdone != nil { close(c.checkerdone) close(c.updates) c.checkerdone = nil } }
[ 0.026725126430392265, -0.7561160326004028, 0.04540194198489189, 0.2699998617172241, 0.707697331905365, 0.23027721047401428, 1.0699542760849, 0.3004823923110962, -1.157056450843811, 0.15101030468940735, -0.17110054194927216, 0.15837262570858002, -1.3369520902633667, 0.32390835881233215, 0...
func NewApp(log *log.Logger) *App { app := App{ TreeMux: httptreemux.New(), log: log, } return &app }
[ 0.9230823516845703, -0.48322996497154236, 0.5319636464118958, 0.568259596824646, -1.277194857597351, 0.3973539173603058, -0.5630381107330322, -0.46599194407463074, 0.18904660642147064, -0.08852630108594894, 0.07079312205314636, 0.6879303455352783, 0.09647771716117859, 0.32918307185173035, ...
func doFetch(ctx context.Context, url string, wg *sync.WaitGroup, result chan<- fetchResult) { start := time.Now() defer wg.Done() var ( err error req *http.Request res *http.Response body []byte ) resChan := fetchResult{url: url, err: err} req, err = http.NewRequest("GET", url, nil) if err != nil { ...
[ -0.3216012120246887, 0.02911975607275963, 1.0360121726989746, -0.917464554309845, -0.5014210343360901, -0.1979401707649231, -0.6298915147781372, -0.7087083458900452, -0.23504577577114105, 1.0212632417678833, -0.24223344027996063, 1.2405714988708496, 0.23251940310001373, 0.6863625049591064,...
func NewHTTPClient() *HTTPClient { return &HTTPClient{ Client: http.DefaultClient, CacheDir: viper.GetString("http_cache_dir"), } }
[ -0.24128150939941406, -0.7427834868431091, 0.03258499875664711, 0.833852231502533, -0.1510116159915924, -0.1734466850757599, -0.1488654762506485, -0.11159291118383408, 0.08903542906045914, -0.12907320261001587, -0.7745707035064697, 0.7495033144950867, -0.4030449390411377, -0.33049026131629...
func NewBytesBuffer(p []byte) *BytesBuffer { return &BytesBuffer{reader: bytes.NewReader(p)} }
[ 0.1928587257862091, -0.32786786556243896, -0.015150702558457851, 0.026291735470294952, -0.6195022463798523, -0.4718579649925232, -1.0456745624542236, 0.15160007774829865, 0.43667465448379517, -0.43783512711524963, -0.7668569684028625, -0.22299273312091827, -0.20227213203907013, 0.581009209...
func (bb *BytesBuffer) Read(p []byte) (n int, err error) { return bb.reader.Read(p) }
[ -0.21171225607395172, 0.13391530513763428, 0.45159435272216797, 0.28183606266975403, 0.26318562030792236, 0.47311195731163025, 0.25831592082977295, -0.0585428848862648, -0.19112257659435272, -0.5821418166160583, -0.6702936291694641, 0.511288046836853, -1.1356186866760254, 0.542969286441803...
func (bb *BytesBuffer) Close() error { return nil }
[ 0.8826169371604919, -0.0984211266040802, 0.7471975684165955, 0.20122472941875458, 0.04510681703686714, 0.9333568215370178, 0.5328343510627747, -0.5695940256118774, -0.06379417330026627, -1.6573718786239624, -0.5056507587432861, 1.1061573028564453, -1.893441915512085, 1.1909277439117432, ...
func (hc *HTTPClient) Do(req *http.Request) (*http.Response, error) { if hc.CacheDir == "" { return hc.Client.Do(req) } return hc.doFromCache(req) }
[ -0.485466867685318, 0.44906216859817505, 0.5752972364425659, 1.241234302520752, 0.4995964765548706, 0.6963768005371094, -0.4278603494167328, -0.6770905256271362, -0.10982922464609146, -0.066622793674469, 0.2017674595117569, 0.5231843590736389, 0.05718629062175751, 1.0192939043045044, -0....
func GenerateKey(rand io.Reader) (PublicKey, PrivateKey, error) { priv := make([]byte, PrivateKeySize) if _, err := io.ReadFull(rand, priv); err != nil { return nil, nil, err } pub, err := curve25519.X25519(priv, curve25519.Basepoint) if err != nil { return nil, nil, err } return pub, priv, err }
[ -0.23047590255737305, 0.16791895031929016, 0.4251500368118286, -0.017525216564536095, 0.3057825565338135, -0.05142025277018547, -0.06410013884305954, -0.06368793547153473, 0.7065663933753967, 0.49226972460746765, -0.56328946352005, 0.6080901026725769, -0.6265301704406738, 0.835331082344055...
func (p PublicKey) ToEd25519() (ed25519.PublicKey, error) { a, err := convertMont(p) if err != nil { return nil, err } return a.Bytes(), nil }
[ 0.09473531693220139, 0.46012526750564575, 0.20364166796207428, -0.5839589834213257, -0.2356596440076828, 0.7301222085952759, 0.0037737565580755472, 0.018134115263819695, 0.5626375675201416, 0.5490764379501343, -0.033812228590250015, 0.3809952735900879, -0.5280389189720154, 0.57300072908401...
func (p PublicKey) Equal(x crypto.PublicKey) bool { xx, ok := x.(PublicKey) if !ok { return false } return bytes.Equal(p, xx) }
[ 0.20980960130691528, 0.8785333633422852, 0.0074994382448494434, 0.06064855679869652, 0.32341429591178894, 1.0203453302383423, -0.6792001724243164, -0.754687488079071, -0.5504341125488281, 1.297864556312561, -1.663590669631958, 0.6189406514167786, -0.9841940402984619, 0.305012047290802, -...
func (p PrivateKey) Public() crypto.PublicKey { pub, _ := p.PublicKey() return pub }
[ -0.09405416250228882, 0.012101623229682446, -0.4049532115459442, 0.2123669683933258, 0.02880777046084404, 0.07522665709257126, 0.11948244273662567, -0.005741206929087639, -0.8416483998298645, 0.13337035477161407, -0.17738346755504608, 0.8559532761573792, -0.14143651723861694, 0.33940252661...
func (p PrivateKey) Equal(x crypto.PrivateKey) bool { xx, ok := x.(PrivateKey) if !ok { return false } return bytes.Equal(p, xx) }
[ -0.5397806763648987, 0.34069913625717163, 0.006758823990821838, -0.1949285864830017, 0.8914944529533386, 0.5327930450439453, -0.956790566444397, -1.1623084545135498, 0.2043415755033493, 1.8625589609146118, -1.462917685508728, 0.8679683208465576, -1.4646635055541992, 0.2432185560464859, 0...
func (p PrivateKey) PublicKey() (PublicKey, error) { pub, err := curve25519.X25519(p, curve25519.Basepoint) if err != nil { return nil, err } return pub, nil }
[ 0.7383313179016113, 0.1279720962047577, 0.0024054287932813168, 0.5749201774597168, 0.34178483486175537, -0.2569795548915863, 0.422919362783432, -0.4206157326698303, 0.8820143342018127, 0.7845423221588135, 0.0009390987106598914, 0.7805684208869934, -1.237328290939331, -0.0917898491024971, ...
func (p PrivateKey) SharedKey(peerPublicKey []byte) ([]byte, error) { sharedKey, err := curve25519.X25519(p, peerPublicKey) if err != nil { return nil, err } return sharedKey, nil }
[ -0.37518951296806335, 0.5104330778121948, 0.28271621465682983, 0.3517262041568756, 0.10502146929502487, 0.15819574892520905, 0.2943415939807892, 0.4764961004257202, 1.2745598554611206, 0.27815842628479004, -0.05416165292263031, -0.3150126338005066, -1.96334969997406, 0.7806380391120911, ...
func (p PrivateKey) Sign(rand io.Reader, message []byte, opts crypto.SignerOpts) (signature []byte, err error) { if opts.HashFunc() != crypto.Hash(0) { return nil, errors.New("x25519: cannot sign hashed message") } return Sign(rand, p, message) }
[ 0.20319868624210358, 0.12006013840436935, 0.2475481480360031, 0.5762180089950562, 0.10217174887657166, -0.5143870711326599, -0.10123350471258163, -0.23969562351703644, 0.2585819363594055, 0.11426497995853424, 0.2796627879142761, -0.3124244809150696, -1.5032532215118408, 0.48018360137939453...
func Sign(rand io.Reader, p PrivateKey, message []byte) (signature []byte, err error) { if l := len(p); l != PrivateKeySize { panic("x25519: bad private key length: " + strconv.Itoa(l)) } pub, priv, err := p.calculateKeyPair() if err != nil { return nil, err } random := make([]byte, 64) if _, err := io.Rea...
[ -0.16807332634925842, -0.12246920168399811, 0.8589192032814026, -0.7003936767578125, -0.9668881893157959, -0.44095367193222046, -0.47590646147727966, 0.10759321600198746, 0.6674764752388, 0.5122726559638977, -0.5910764336585999, 0.004445414990186691, -0.6814481616020203, 0.7969965934753418...
func Verify(publicKey PublicKey, message, sig []byte) bool { // The following code should be equivalent to: // // pub, err := publicKey.ToEd25519() // if err != nil { // return false // } // return ed25519.Verify(pub, message, sig) if l := len(publicKey); l != PublicKeySize { panic("x25519: bad...
[ 0.09764564782381058, 0.526629626750946, 0.6775671243667603, 0.3751315176486969, -0.7709116339683533, 0.11522486805915833, -0.4717057943344116, -0.19307321310043335, 0.23867657780647278, 0.7573274970054626, -0.7733080387115479, 0.1914738565683365, -0.7403613328933716, 1.5913275480270386, ...
func (p PrivateKey) calculateKeyPair() ([]byte, *edwards25519.Scalar, error) { var pA edwards25519.Point var sa edwards25519.Scalar k, err := (&edwards25519.Scalar{}).SetBytesWithClamping(p) if err != nil { return nil, nil, err } pub := pA.ScalarBaseMult(k).Bytes() signBit := (pub[31] & 0x80) >> 7 if signB...
[ -0.5819688439369202, -0.1930503398180008, 0.5325210094451904, 0.1984066218137741, -0.7440052628517151, -0.0008028525626286864, -0.41114896535873413, 0.12347698211669922, 0.7482419013977051, 0.4526327848434448, -0.4848421812057495, -0.42694440484046936, -1.251206398010254, 1.862713098526001...
func convertMont(u PublicKey) (*edwards25519.Point, error) { um, err := (&field.Element{}).SetBytes(u) if err != nil { return nil, err } // y = (u - 1)/(u + 1) a := new(field.Element).Subtract(um, one) b := new(field.Element).Add(um, one) y := new(field.Element).Multiply(a, b.Invert(b)).Bytes() // Set sign ...
[ -0.1756778210401535, -0.1317978799343109, 0.7183781266212463, 0.49257543683052063, -0.6965236663818359, 0.6217257976531982, 0.42889711260795593, 0.0041288877837359905, 0.7942615151405334, -0.2185778170824051, -0.18987500667572021, 0.3017891049385071, -0.8680233359336853, 0.6427167057991028...
func Read(path string) (*Project, error) { var error error var data []byte data, error = ioutil.ReadFile(path) if error != nil { return nil, error } var project = &Project{} error = json.Unmarshal(data, project) if error != nil { return nil, error } return project, nil }
[ -0.6319753527641296, 0.08609170466661453, 0.5641646981239319, -0.6568307876586914, -1.0246340036392212, 0.7814217805862427, -0.22765544056892395, -0.4798564314842224, -0.33406564593315125, 0.309222549200058, 0.36507904529571533, 0.39635828137397766, -0.7499372363090515, -0.8183292150497437...
func (a *CredentialsControllerApiService) GetAccount(ctx _context.Context, account string) apiGetAccountRequest { return apiGetAccountRequest{ apiService: a, ctx: ctx, account: account, } }
[ -0.3163025677204132, 0.2973597049713135, 0.2785925269126892, 0.4967444837093353, 0.6388072371482849, -0.6317899227142334, 0.6903541088104248, 0.07666105031967163, 0.8814833164215088, -0.28241389989852905, 0.2677260935306549, 1.49882972240448, -0.07293286174535751, 0.129390686750412, 0.23...
func (r apiGetAccountRequest) Execute() (AccountDetails, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue AccountDetails ) localBasePath, ...
[ -0.5550307631492615, -0.29890358448028564, 0.8371405601501465, 0.16495321691036224, 0.08978083729743958, -0.05930577963590622, 0.12892842292785645, 0.12086448073387146, 0.2861275374889374, 0.3146509826183319, 0.5636563301086426, 0.3158751428127289, -0.7214572429656982, 0.11734510958194733,...
func (a *CredentialsControllerApiService) ListAccounts(ctx _context.Context) apiListAccountsRequest { return apiListAccountsRequest{ apiService: a, ctx: ctx, } }
[ -0.24660290777683258, -0.5555568337440491, 0.4948388636112213, -0.11680908501148224, 0.128990039229393, -0.45379960536956787, -0.34626609086990356, -0.275875449180603, 0.8120506405830383, -0.9738689064979553, 0.48350533843040466, 1.2324415445327759, -0.438012957572937, 0.3371254801750183, ...
func (r apiListAccountsRequest) Execute() ([]Account, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue []Account ) localBasePath, err := r...
[ -0.8477442264556885, -0.6673193573951721, 0.6682863831520081, -0.030209138989448547, -0.01785033382475376, -0.06189647689461708, -0.42253217101097107, 0.2072775959968567, 0.3404538333415985, 0.37263089418411255, 0.46467554569244385, 0.17565952241420746, -0.6884133219718933, 0.4910516738891...
func (t *Template) Clone() (*Template, error) { var tmpl, err = t.Template.Clone() return &Template{tmpl, t.Name}, err }
[ -0.0681002140045166, -0.8601871728897095, 0.34344416856765747, 0.27083683013916016, -1.3718469142913818, 0.2126539796590805, -0.5251855850219727, -0.9272105097770691, 0.3267230987548828, 0.2939217686653137, -0.6178232431411743, -0.22752085328102112, -0.6176941394805908, -0.6356644034385681...
func Root(name, path string) *TRoot { var tmpl = &Template{template.New(name), name} var t = &TRoot{tmpl, path} return t }
[ 0.9913079142570496, 0.00908077321946621, 0.32195165753364563, -0.46687909960746765, -1.354333519935608, -0.22523614764213562, -0.9578791260719299, -0.46408891677856445, 0.33584997057914734, -0.003009057603776455, -0.4297650456428528, 1.0810576677322388, 0.04305196925997734, 0.0718019530177...
func (t *TRoot) Funcs(fnList FuncMap) *TRoot { t.template.Funcs(template.FuncMap(fnList)) return t }
[ -0.5343858003616333, 0.43524959683418274, 0.13651175796985626, -0.3532339036464691, 0.5062664747238159, -1.1418827772140503, -0.08235111832618713, 0.16234706342220306, 0.5603406429290771, -1.1721469163894653, -0.390769898891449, -0.01642901636660099, 0.20812620222568512, 0.3440009653568268...
func (t *TRoot) Clone() *TRoot { var clone, _ = t.template.Clone() return &TRoot{clone, t.Path} }
[ 0.7306641936302185, -0.986427903175354, 0.37766698002815247, 0.3230825364589691, -0.8017321228981018, 0.23214958608150482, 0.37227630615234375, -0.6102081537246704, 0.09067898988723755, 0.5619449019432068, 0.04639391601085663, 0.23145858943462372, -0.33862242102622986, -0.6092821955680847,...
func (t *TRoot) Name() string { return t.template.Name }
[ -0.19376669824123383, -0.6424917578697205, 0.46607428789138794, -0.2805764377117157, -0.9612369537353516, -0.402374267578125, 0.3385789096355438, -0.4626046121120453, -0.26888513565063477, 1.4082564115524292, -0.8701145052909851, -0.978707492351532, 0.17509233951568604, 0.18524308502674103...
func (t *TRoot) ReadPartials(files ...string) error { for _, file := range files { var _, err = t.template.ParseFiles(filepath.Join(t.Path, file)) if err != nil { return err } } return nil }
[ -0.4107578992843628, -0.4011855721473694, 0.5799500942230225, -0.43182680010795593, 0.07575257867574692, 0.6665053367614746, -0.4031730890274048, -0.11981126666069031, -0.968710720539093, 0.10873721539974213, 0.708384096622467, -0.5046865344047546, -0.7017289996147156, 0.13123293220996857,...
func (t *TRoot) MustReadPartials(files ...string) { var err = t.ReadPartials(files...) if err != nil { panic(err) } }
[ -0.3021361827850342, -0.14635412395000458, 0.553727388381958, 0.3222639560699463, -0.19000057876110077, 1.8368078470230103, -1.1324551105499268, -0.6609724760055542, -0.731287956237793, 0.7361321449279785, 1.0197157859802246, -0.5728017687797546, -0.6840981841087341, -0.27516263723373413, ...
func (t *TRoot) Build(path string) (*Template, error) { var tNew, err = t.template.Clone() if err != nil { return nil, err } _, err = tNew.ParseFiles(filepath.Join(t.Path, path)) if err != nil { return nil, err } tNew.Name = path return tNew, nil }
[ -0.11278681457042694, -0.882461428642273, 0.5424512028694153, -0.24933688342571259, -0.8201285004615784, -0.32706162333488464, 0.20378917455673218, -0.5994036793708801, -0.26495856046676636, 0.4249045252799988, -0.751105785369873, -0.6686050295829773, -0.11224113404750824, -0.3764063715934...
func (t *TRoot) MustBuild(path string) *Template { var tmpl, err = t.Build(path) if err != nil { panic(err) } return tmpl }
[ 0.48097237944602966, -0.6031803488731384, 0.5382018685340881, 0.5942277312278748, -0.6790897250175476, 1.3543353080749512, -0.5588118433952332, -0.726681649684906, 0.5260898470878601, 0.09952067583799362, 0.32812634110450745, -0.40219569206237793, -0.20326778292655945, 0.05065980926156044,...
func (t *TRoot) Template() *Template { return t.Clone().template }
[ -0.3192943036556244, 0.07430990785360336, 0.3406836986541748, 0.39263635873794556, -0.5215403437614441, 0.030413325875997543, 0.3610573709011078, -0.5272164940834045, 0.38003408908843994, -0.12865041196346283, -0.2786092758178711, -0.21636708080768585, -0.5170906186103821, -0.7801203131675...
func (c *TimeoutCache) Get(key interface{}) (value interface{}, ok bool) { c.lock.RLock() defer c.lock.RUnlock() if ent, ok := c.items[key]; ok { return ent, true } return nil, false }
[ -1.028255581855774, 0.3021250069141388, 0.6212344765663147, -0.04525621607899666, -0.5433021783828735, -0.3260689973831177, -1.0966479778289795, 0.18724745512008667, -0.9435099363327026, 1.6889513731002808, -0.5235288739204407, -0.505557119846344, -0.4015060067176819, -0.6707638502120972, ...