text
stringlengths
11
6.3k
embedding
listlengths
768
768
func (s *Restore) Autopilot(config *autopilot.Config) error { if err := s.tx.Insert("autopilot-config", config); err != nil { return fmt.Errorf("failed restoring autopilot config: %s", err) } return nil }
[ 0.5962505340576172, 0.6264281272888184, 0.49707862734794617, -0.4376888573169708, -0.5050360560417175, 0.36997300386428833, 0.3575369417667389, 0.4274347722530365, 0.3720344305038452, 0.798230767250061, -1.0521091222763062, -0.08383961766958237, -0.8961641788482666, -1.0328267812728882, ...
func (s *Store) AutopilotConfig() (uint64, *autopilot.Config, error) { tx := s.db.Txn(false) defer tx.Abort() // Get the autopilot config c, err := tx.First("autopilot-config", "id") if err != nil { return 0, nil, fmt.Errorf("failed autopilot config lookup: %s", err) } config, ok := c.(*autopilot.Config) if...
[ -0.5604235529899597, 0.09872908145189285, 0.3675985634326935, -0.28932374715805054, -0.4941692352294922, -0.7246993184089661, 0.07983098924160004, 0.7855014801025391, 0.2768609821796417, 0.9786297082901001, -0.554680347442627, 0.30888426303863525, -0.02363692969083786, 0.2520759701728821, ...
func (s *Store) AutopilotSetConfig(idx uint64, config *autopilot.Config) error { tx := s.db.Txn(true) defer tx.Abort() if err := s.autopilotSetConfigTxn(idx, tx, config); err != nil { return err } tx.Commit() return nil }
[ -0.7987223267555237, 0.12692472338676453, 0.23400090634822845, -0.34845906496047974, -0.4917253851890564, 0.04677193611860275, 0.3573397696018219, 0.032241642475128174, 0.030261969193816185, 0.9343891143798828, -1.200388789176941, 0.05463865026831627, -0.027712471783161163, -0.098174497485...
func (s *Store) AutopilotCASConfig(idx, cidx uint64, config *autopilot.Config) (bool, error) { tx := s.db.Txn(true) defer tx.Abort() // Check for an existing config existing, err := tx.First("autopilot-config", "id") if err != nil { return false, fmt.Errorf("failed autopilot config lookup: %s", err) } // If ...
[ -0.40268462896347046, 0.49438047409057617, 0.6547574400901794, -0.5162791609764099, -0.7472540736198425, 0.2024853378534317, -0.40013453364372253, -0.06437843292951584, 0.42623642086982727, 1.0078891515731812, -0.6061664819717407, -0.40399566292762756, 0.1663522869348526, -0.46018612384796...
func RegisterLogicalType(lt LogicalType) { // Validates that the storage type has known handling. st := lt.StorageType() _, err := reflectTypeToFieldType(st) if err != nil { panic(fmt.Sprintf("LogicalType[%v] has an invalid StorageType %v: %v", lt.ID(), st, err)) } logicalIdentifiers[lt.GoType()] = lt.ID() log...
[ 0.15624186396598816, -0.014289548620581627, 0.257988303899765, -0.36861419677734375, 0.7286295890808105, 0.28582069277763367, -0.6900338530540466, -0.006984435021877289, 0.13748332858085632, 0.06517501175403595, -1.5862072706222534, 0.37590962648391724, -0.3939584195613861, 0.3998874127864...
func NewConvertibleLogicalType(identifier string, goType, storageType reflect.Type) LogicalType { if !(goType.ConvertibleTo(storageType) && storageType.ConvertibleTo(goType)) { panic(fmt.Sprintf("Can't create ConvertibleTo LogicalType: %v and %v are not convertable to each other", goType, storageType)) } return &c...
[ 0.24072951078414917, -0.3872296214103699, 0.14133326709270477, 0.06893959641456604, -0.6108077168464661, 0.33455273509025574, -1.3658802509307861, -0.25745996832847595, -0.36945658922195435, 0.6123847961425781, -0.3523584008216858, 0.18258029222488403, -0.6328169703483582, 0.03347013145685...
func GenerateProfiles() director.GenerateProfilesFunc { return func() ([]*pb.MatchProfile, error) { var profiles []*pb.MatchProfile worlds := []string{"Dune", "Nova", "Pandora", "Orion"} regions := []string{"us-east-1", "us-east-2", "us-west-1", "us-west-2"} skillLevels := []*pb.DoubleRangeFilter{ {Double...
[ 0.0051992726512253284, 0.3196592628955841, 1.1288005113601685, 0.0025841130409389734, -0.2718980312347412, 0.2567040026187897, 0.5364013910293579, -0.5842658877372742, 0.10690605640411377, 0.6770613193511963, -0.5700014233589172, 0.052565041929483414, -0.18967977166175842, 0.30419024825096...
func NewClient(addr string) *Client { return &Client{addr} }
[ 0.8072842359542847, -0.4840032458305359, -0.06334681063890457, -0.3116897642612457, -1.7671287059783936, 0.18245713412761688, 0.6191554665565491, 0.1956915259361267, 0.361429363489151, 0.009668423794209957, 0.08019937574863434, 1.494648814201355, 0.26144295930862427, -1.195029377937317, ...
func (c *Client) Download(namespace string, d core.Digest) (io.ReadCloser, error) { resp, err := httputil.Get( fmt.Sprintf( "http://%s/namespace/%s/blobs/%s", c.addr, url.PathEscape(namespace), d)) if err != nil { return nil, err } return resp.Body, nil }
[ 0.1623562127351761, -0.13801449537277222, 0.7417322993278503, -0.6611781716346741, -0.6032034754753113, -0.2530438005924225, -1.0253783464431763, -1.1471060514450073, 0.4568779170513153, 0.23964381217956543, -0.24961186945438385, 0.26484015583992004, -1.2946748733520508, 0.6002002954483032...
func (c *Client) Delete(d core.Digest) error { _, err := httputil.Delete(fmt.Sprintf("http://%s/blobs/%s", c.addr, d)) return err }
[ 0.8616652488708496, -0.2243981957435608, 0.5425833463668823, -0.9286707639694214, 0.7076210379600525, 0.6870951652526855, 0.22599606215953827, -0.3418799340724945, 0.09121522307395935, 0.6883993744850159, -0.13846313953399658, 0.026947423815727234, -1.2524006366729736, 0.042427726089954376...
func DefaultConfig() Config { newConfig := Config{ // Dependencies. FactoryCollection: factory.MustNewCollection(), Log: log.New(log.DefaultConfig()), StorageCollection: storage.MustNewCollection(), } return newConfig }
[ 0.538375198841095, -0.12139236181974411, 0.30221718549728394, 0.5770805478096008, 0.44830673933029175, 0.6023542881011963, 0.31340834498405457, 0.3309556543827057, -0.10624960064888, -0.36213457584381104, -0.7309226393699646, -0.5209094285964966, 0.4703117907047272, 0.9505511522293091, 0...
func New(config Config) (spec.Tracker, error) { newTracker := &tracker{ Config: config, ID: id.MustNew(), Type: ObjectType, } if newTracker.Log == nil { return nil, maskAnyf(invalidConfigError, "logger must not be empty") } if newTracker.FactoryCollection == nil { return nil, maskAnyf(invalidConfigEr...
[ -0.24123285710811615, -0.21914508938789368, 0.6313864588737488, 0.2648550868034363, 0.21628762781620026, 0.12050975114107132, 0.17975662648677826, -0.14357532560825348, -0.7661375403404236, -0.051024988293647766, -0.548621416091919, -0.08828090131282806, 0.3456820845603943, 1.1062144041061...
func MustNew() spec.Tracker { newTracker, err := New(DefaultConfig()) if err != nil { panic(err) } return newTracker }
[ -0.12582877278327942, 0.8058018684387207, 0.5424243807792664, 0.8604480624198914, 0.21734878420829773, 1.1076186895370483, -0.9510725140571594, -0.5031232833862305, -0.7338932156562805, -0.29594722390174866, -0.4132191836833954, -0.08165432512760162, 0.3927629888057709, 0.9018291234970093,...
func (c *Client) ListPackageVersionAssets(ctx context.Context, params *ListPackageVersionAssetsInput, optFns ...func(*Options)) (*ListPackageVersionAssetsOutput, error) { if params == nil { params = &ListPackageVersionAssetsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListPackageVersionAssets", para...
[ -1.5519026517868042, 0.09347688406705856, 0.7885112762451172, 0.5948249697685242, -0.13704116642475128, -0.2371527999639511, -0.1475123167037964, -0.18704818189144135, 1.1945940256118774, 0.5083423256874084, -1.0141236782073975, 0.6875932216644287, 0.12868399918079376, -0.18365609645843506...
func MultiplexTwo(one, two Interface) Interface { return newMultiplexedBreaker([]Interface{one, two, stub{}}).trigger() }
[ -0.5699520111083984, 0.1493745893239975, 0.653834879398346, 1.415318250656128, -0.44229868054389954, -1.0704889297485352, -0.5019833445549011, -0.4800284206867218, -0.7530032396316528, -0.08138275891542435, -1.9918383359909058, -0.29074159264564514, 0.4202686846256256, 0.6032482981681824, ...
func MultiplexThree(one, two, three Interface) Interface { return newMultiplexedBreaker([]Interface{one, two, three}).trigger() }
[ 0.19584636390209198, 1.0552691221237183, 0.7704512476921082, 0.8907144665718079, 0.17776134610176086, 0.12323958426713943, -0.7407819032669067, 0.39749664068222046, -0.35590770840644836, 0.26506349444389343, -1.9503470659255981, -1.0996891260147095, -0.47416526079177856, -0.624626576900482...
func WithContext(ctx context.Context) (Interface, context.Context) { ctx, cancel := context.WithCancel(ctx) return (&contextBreaker{ctx, cancel}).trigger(), ctx }
[ 0.4069042503833771, 0.3907342255115509, 0.7347402572631836, 0.6917682886123657, -0.8986968994140625, -0.10015703737735748, -0.3367396891117096, -0.317857563495636, 1.169346570968628, -0.19553174078464508, -0.3945867121219635, -0.5332341194152832, 0.07072798162698746, -0.8404842019081116, ...
func Multiplier(arr []int) []int { length := len(arr) prod := ArrayProduct(arr) result := make([]int, length) for i, v := range arr { result[i] = prod / v } return result }
[ -1.3488516807556152, 0.18737632036209106, 0.4946882128715515, 0.46159395575523376, -0.5210431814193726, -0.24229437112808228, 0.19764333963394165, -0.1476166546344757, 0.8994081020355225, 0.11478052288293839, -0.9172622561454773, -0.702383279800415, 0.04823537543416023, 1.6314117908477783,...
func ArrayProduct(arr []int) int { prod := 1 for _, val := range arr { prod *= val } return prod }
[ -0.7706053256988525, 0.14380399882793427, 0.3910118639469147, 0.08205365389585495, -0.21763291954994202, 0.10916067659854889, -0.10638388246297836, -0.7058390378952026, 0.4057587683200836, 0.5120492577552795, -0.11328139156103134, 0.33903366327285767, 0.12860862910747528, 0.554649353027343...
func (state *State) Init() { state.expr = make(exprState, 64) state.lua = lua.NewState() }
[ -0.3307375907897949, -0.5545593500137329, 0.31656309962272644, -0.24958807229995728, -0.6298989653587341, -0.1394420862197876, 0.11318653076887131, 1.030285120010376, 0.25117528438568115, -0.7249903082847595, -0.13611666858196259, 0.6861053705215454, 0.46576613187789917, 0.274743914604187,...
func (state *State) Close() { state.lua.Close() }
[ 0.38717368245124817, -0.7588927149772644, 0.3337993621826172, -0.5548648238182068, -0.5995475649833679, 0.9381664395332336, 0.23470044136047363, 0.26887747645378113, -0.16116586327552795, -1.158699631690979, 0.7228102684020996, -0.12094249576330185, -0.2647026479244232, 0.9942296147346497,...
func (state *State) SetLua(name string, value interface{}) { state.lua.SetGlobal(name, luar.New(state.lua, value)) }
[ -0.9244419932365417, -0.5068567395210266, 0.5924159288406372, -0.1293286830186844, -0.5624542236328125, 0.3478947579860687, -0.01293665450066328, 0.4848264157772064, 0.05048814043402672, -0.48183462023735046, -0.5653725862503052, 0.3483881950378418, 0.30923259258270264, 0.8743495345115662,...
func (state *State) SetExpr(name string, value interface{}) { state.expr[name] = value }
[ -0.5469750761985779, 0.24236762523651123, 0.27779313921928406, 0.01061202771961689, -1.412532091140747, -0.6704999804496765, -1.4498571157455444, 0.3766725957393646, 0.2810400724411011, 0.602971613407135, -0.6953373551368713, 0.46119776368141174, 0.6552231311798096, 1.0750004053115845, 0...
func (state *State) SetAll(name string, value interface{}) { state.SetExpr(name, value) state.SetLua(name, value) }
[ 0.0111366156488657, -0.6364098787307739, 0.48061415553092957, 0.19700312614440918, -1.4393430948257446, -0.01493978500366211, -0.9592588543891907, 0.7861015200614929, 0.364533007144928, -0.2638419270515442, -0.5179548859596252, 0.4203341007232666, 0.7247828245162964, 1.0184935331344604, ...
func (state *State) SetBoth(name string, exprValue interface{}, luaValue interface{}) { state.SetExpr(name, exprValue) state.SetLua(name, luaValue) }
[ -0.36762818694114685, -1.0446569919586182, 0.5589286684989929, -0.23000851273536682, -0.7919923067092896, 0.060600198805332184, -0.09411068260669708, 0.29653188586235046, -0.3090002238750458, -0.6028213500976562, -0.33881035447120667, 1.0080808401107788, 0.8790388107299805, 0.7152080535888...
func (state *State) EvalExpr(expr string) (interface{}, error) { exp, err := govaluate.NewEvaluableExpression(expr) if err != nil { return nil, err } else { res, err := exp.Evaluate(state.expr) return res, err } }
[ -0.6110096573829651, -0.2569344639778137, 0.6946992874145508, -0.008204651065170765, -0.965423583984375, -0.19462843239307404, -1.0858104228973389, 0.564797043800354, 1.0392860174179077, 0.23875586688518524, -0.14431032538414001, 0.40959423780441284, -0.5116264224052429, 0.0534381642937660...
func (state *State) EvalLua(lua string) error { return state.lua.DoString(lua) }
[ -0.2706056833267212, -1.3198177814483643, 0.5038947463035583, -0.7033831477165222, -0.6661015152931213, 0.19513534009456635, -0.46809348464012146, 1.2909890413284302, 1.1942116022109985, -0.46740832924842834, 0.29103636741638184, 0.5313358306884766, -0.1575436294078827, 0.04294345155358314...
func MessageHasPBEX(message *protogen.Message) bool { checked := make(map[string]*struct{}) return messagecheck(message, checked) }
[ 0.44534486532211304, 0.4396240711212158, 0.5972359776496887, 0.7381213903427124, 0.2620641589164734, 0.6585389971733093, -0.7374573945999146, 0.6379742622375488, -0.7080680727958679, -0.6337528228759766, -0.7276807427406311, -0.5711337924003601, -1.0205097198486328, 1.3809840679168701, -...
func MessageHasOneof(message *protogen.Message) bool { checked := make(map[string]*struct{}) return hasoneof(message, checked) }
[ 0.4362439811229706, 0.8435262441635132, 0.49507513642311096, 0.2644641697406769, 0.677435576915741, -0.21014206111431122, -0.2517240345478058, 0.10377707332372665, -0.608697772026062, -0.16087205708026886, -0.0013388852821663022, -0.5656443238258362, -1.1841925382614136, 1.1536458730697632...
func MessageHasEnum(message *protogen.Message) bool { checked := make(map[string]*struct{}) return hasenum(message, checked) }
[ -0.40857014060020447, 0.17428377270698547, 0.5207796096801758, 0.42818281054496765, 0.6333858370780945, 0.305602103471756, -0.07121486216783524, 0.5750754475593567, -0.516467273235321, 0.3460676670074463, -0.48939049243927, -0.35209253430366516, -0.8025574684143066, 1.7328829765319824, -...
func OneOfHasPBEX(message *protogen.Message) bool { checked := make(map[string]*struct{}) return oneofpbex(message, checked) }
[ 0.00885457918047905, 0.4339975118637085, 0.5216299891471863, 0.621345579624176, 0.26572397351264954, 0.09533761441707611, -0.35742729902267456, 0.21359793841838837, -0.04216868802905083, -0.6509764194488525, -0.4827786684036255, -0.3373594284057617, -0.8341076970100403, 0.718529999256134, ...
func FieldHasPBEX(field *protogen.Field) bool { fop := field.Desc.Options().(*descriptorpb.FieldOptions) if field.Desc.IsList() || field.Desc.IsMap() { if proto.HasExtension(fop, E_MapRepeatedLenEq) || proto.HasExtension(fop, E_MapRepeatedLenNotEq) || proto.HasExtension(fop, E_MapRepeatedLenGt) || proto.Ha...
[ 0.041465673595666885, 0.30728089809417725, 0.8285977840423584, -0.1114070862531662, -0.3906491696834564, 0.7721390724182129, -0.2632945775985718, -0.08456142991781235, 0.14558205008506775, -0.5028494596481323, -0.5945501327514648, -0.19300128519535065, -0.7536421418190002, 1.48710465431213...
func main() { basics(i) bitShifting() arrayAndSlices() structs() maps() switchCases() looping() loopingOverCollections() pointers() functions() interfaces() goRoutines() channelBasics() loggerExample() }
[ 0.25097423791885376, -0.04489925131201744, 0.4619399905204773, 0.6671561598777771, 0.27659711241722107, 0.1367720067501068, 0.6089937686920166, -0.8251089453697205, 0.13867957890033722, -0.562354564666748, -0.5471999049186707, 0.006834062747657299, -0.46046000719070435, 0.30343520641326904...
func UserConfig() string { return util.UserConfig() }
[ 0.7928071022033691, -0.33934640884399414, 0.20960603654384613, 0.361740380525589, -1.0500479936599731, -0.0268540158867836, 0.32856473326683044, 0.8346602916717529, -0.23831263184547424, 0.2555859386920929, -0.991973340511322, 0.06299228966236115, 0.9886981844902039, -0.025724729523062706,...
func BuildInfo() *build.Info { return util.BuildInfo() }
[ 0.31895700097084045, -1.157995581626892, 0.017689289525151253, 0.2283080369234085, 0.03473294898867607, 0.8460114598274231, 0.0787356048822403, -0.09186550974845886, -0.9071984887123108, -0.5532233715057373, -0.5849982500076294, 0.23419491946697235, 0.5352782011032104, -0.7027063965797424,...
func FileExist(path string) bool { return util.FileExist(path) }
[ 0.15700584650039673, -0.32537996768951416, 0.4467368721961975, 0.25373581051826477, 0.763495683670044, 1.188779592514038, -0.4156840443611145, 0.729835033416748, -1.7126861810684204, 0.6103447675704956, 0.1425001323223114, -1.2912037372589111, 0.836721658706665, 0.0723133236169815, -1.54...
func NewRequestID() (string, error) { return strings.Replace(util.UniqueID(), "-", "", -1), nil }
[ -0.11324746161699295, -0.6736341118812561, 0.16641034185886383, 0.20926493406295776, -0.5535520911216736, 0.34353089332580566, -1.1184128522872925, 0.3435432016849518, 0.7938181757926941, 0.22704918682575226, 0.8458453416824341, 0.47350868582725525, -0.6494106650352478, -0.0370667241513729...
func ParseDuration(dstr string) (dur time.Duration, err error) { return util.ParseDuration(dstr) }
[ -0.5878511071205139, 0.07110542804002762, 0.16362816095352173, 0.4023120701313019, -1.5836114883422852, -0.26072558760643005, 0.5911059975624084, 0.022613560780882835, 0.8339544534683228, -0.4560696482658386, -0.4437108337879181, 0.17447398602962494, 0.7043347954750061, 0.16915680468082428...
func FileIsRegular(path string) bool { return util.FileIsRegular(path) }
[ -0.5802587866783142, 0.34369558095932007, 0.4177381694316864, 0.5570513010025024, -0.140996053814888, 0.3065349757671356, 0.10674270987510681, 0.36137306690216064, -0.49408650398254395, -0.09313879907131195, 0.0031491550616919994, 0.4645122289657593, -0.08462005108594894, -0.12269338965415...
func FileIsDir(path string) bool { return util.FileIsDir(path) }
[ 0.1368478387594223, -0.25003889203071594, 0.2612323462963104, 0.9442576169967651, -0.21577687561511993, 0.6319940686225891, -0.15508995950222015, 0.1516859233379364, -0.47072386741638184, -0.8952980041503906, 0.3151443898677826, -0.7823652625083923, 0.5059512853622437, 0.9043492674827576, ...
func TestFromReader(t *testing.T) { serialized := `3 3 0 1 1 2 0 2 ` r := strings.NewReader(serialized) g, err := newFromReader(r) if err != nil { t.Fatal(err) } if g.vertices() != 3 { t.Fatalf("incorrect number of vertices expected 2, got %v", g.vertices()) } if len(g.adjascent(0)) != 2 { t.Fatal("exp...
[ 0.4948267340660095, -0.4403506815433502, 0.4554404020309448, -0.04020511358976364, -0.7341650128364563, 0.5166181921958923, 0.32644063234329224, -0.06223750486969948, 0.3104552924633026, -0.2801527678966522, -0.09731923788785934, -0.14166159927845, -0.15268585085868835, -0.4796046018600464...
func (walletSubCmds *walletSubCmds) createBotNameTransferTxCmd(cmd *cobra.Command, args []string) { senderID, err := walletSubCmds.botIDFromPosArgStr(args[0]) if err != nil { cli.DieWithError("failed to parse/fetch unique (sender bot) ID", err) return } receiverID, err := walletSubCmds.botIDFromPosArgStr(args[1...
[ 0.8985847234725952, -0.22301864624023438, 0.8279497623443604, -0.756135880947113, -0.1685730367898941, 0.3293777108192444, -0.5320584774017334, -0.04746459051966667, -0.20319168269634247, 0.21027959883213043, -0.2841276228427887, 0.17062625288963318, -0.7509946227073669, -0.172347933053970...
func parseConditionString(str string) (condition rivinetypes.UnlockConditionProxy, err error) { // try to parse it as an unlock hash var uh rivinetypes.UnlockHash err = uh.LoadString(str) if err == nil { // parsing as an unlock hash was succesfull, store the pair and continue to the next pair condition = rivine...
[ 0.21955566108226776, -0.74471116065979, 0.43681544065475464, -0.007273049559444189, -1.074934720993042, -0.40137627720832825, 0.7370032668113708, -0.2254694104194641, 0.22075732052326202, 0.08606121689081192, 0.7414698004722595, -0.5384449362754822, -0.8709348440170288, -0.9872297644615173...
func Asset(name string) ([]byte, error) { cannonicalName := strings.Replace(name, "\\", "/", -1) if f, ok := _bindata[cannonicalName]; ok { a, err := f() if err != nil { return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err) } return a.bytes, nil } return nil, fmt.Errorf("Asset %s not foun...
[ -0.7961483001708984, -1.2313168048858643, 0.633165180683136, -0.6093899011611938, -1.546921730041504, -0.11101024597883224, 0.12971386313438416, -1.3390334844589233, -1.1358720064163208, 0.4855233430862427, 0.3090141713619232, 0.32495471835136414, -0.6009681224822998, -0.44264674186706543,...
func MustAsset(name string) []byte { a, err := Asset(name) if err != nil { panic("asset: Asset(" + name + "): " + err.Error()) } return a }
[ -0.012778956443071365, 0.11985661834478378, 0.4091298282146454, -0.5268413424491882, -0.8276715278625488, 0.4719155430793762, -0.8186293840408325, -1.5736604928970337, 0.16388541460037231, 0.6357062458992004, -0.5354578495025635, 0.35693347454071045, 0.0057142809964716434, -0.0248885955661...
func AssetInfo(name string) (os.FileInfo, error) { cannonicalName := strings.Replace(name, "\\", "/", -1) if f, ok := _bindata[cannonicalName]; ok { a, err := f() if err != nil { return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err) } return a.info, nil } return nil, fmt.Errorf("Asset...
[ 0.371969997882843, -1.1052993535995483, 0.5630446076393127, -0.922572672367096, -1.356387734413147, 0.0033556853886693716, 0.6777529716491699, -0.8006685972213745, -1.2748286724090576, 0.3115358352661133, 0.2636086046695709, 0.26388120651245117, 0.0635773167014122, -0.3988074064254761, 0...
func AssetNames() []string { names := make([]string, 0, len(_bindata)) for name := range _bindata { names = append(names, name) } return names }
[ -0.7293784618377686, -0.8460342288017273, 0.7321816682815552, -0.39323121309280396, -0.48951536417007446, 0.7661203145980835, -0.5028699636459351, -0.8655748963356018, -0.4145073890686035, 0.8099913597106934, 0.16903363168239594, 1.163049578666687, -0.028152840211987495, 0.0342608317732811...
func RestoreAsset(dir, name string) error { data, err := Asset(name) if err != nil { return err } info, err := AssetInfo(name) if err != nil { return err } err = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755)) if err != nil { return err } err = ioutil.WriteFile(_filePath(dir, name), d...
[ 0.3437124192714691, -0.3622540235519409, 0.6770355701446533, -1.2592030763626099, -0.006139514967799187, -0.04453148692846298, -0.0072639440186321735, -0.43950510025024414, -0.20619122684001923, -0.2510169744491577, 0.1784360408782959, 0.13568510115146637, -0.23627112805843353, -0.56985116...
func RestoreAssets(dir, name string) error { children, err := AssetDir(name) // File if err != nil { return RestoreAsset(dir, name) } // Dir for _, child := range children { err = RestoreAssets(dir, filepath.Join(name, child)) if err != nil { return err } } return nil }
[ 0.42261892557144165, 0.30020031332969666, 0.5813396573066711, -0.20641657710075378, -0.23828908801078796, -0.24414615333080292, 0.5739709138870239, -0.029911456629633904, 0.06188219040632248, -0.43923482298851013, 0.5113736987113953, 0.3275970220565796, -0.6125145554542542, 0.0351656526327...
func (_m *MockLogger) Warn(args ...interface{}) { var _ca []interface{} _ca = append(_ca, args...) _m.Called(_ca...) }
[ -0.5647006034851074, 0.3736079931259155, 0.6609715819358826, 0.18723635375499725, 0.05056309700012207, -0.6049856543540955, 0.3019837439060211, -0.18421851098537445, -0.21862709522247314, 0.3456120193004608, -0.2822267711162567, 1.127583384513855, 0.7334185242652893, 0.46319928765296936, ...
func (_m *MockLogger) WithFields(fields logrus.Fields) Logger { ret := _m.Called(fields) var r0 Logger if rf, ok := ret.Get(0).(func(logrus.Fields) Logger); ok { r0 = rf(fields) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(Logger) } } return r0 }
[ -0.3961321711540222, 0.3918875753879547, 0.384203165769577, -1.0530672073364258, -0.10335723310709, -0.7113064527511597, 0.5397307276725769, -0.10764236003160477, -0.03805102780461311, -0.5678942799568176, -0.4687802493572235, -0.12510283291339874, -0.30578431487083435, 0.03321005403995514...
func NewMockLogger(t mockConstructorTestingTNewMockLogger) *MockLogger { mock := &MockLogger{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock }
[ -0.8039442896842957, -0.6124216914176941, 0.11992122232913971, -0.043501224368810654, -0.1355661004781723, -0.02753383480012417, 0.2019621580839157, -0.33851203322410583, 0.5679990649223328, 0.05835961550474167, -0.7984827160835266, -0.47712817788124084, -0.23554643988609314, 1.85274183750...
func Find(slice []int, val int) bool { for _, item := range slice { if item == val { return true } } return false }
[ -0.04589764028787613, -0.3520667254924774, 0.3553259074687958, -0.02338012494146824, -1.038557529449463, 0.00535536790266633, -0.4861977696418762, -0.6620185375213623, -0.6938822269439697, 1.1471227407455444, -0.218112513422966, -0.4493641257286072, -0.5690136551856995, 1.0156116485595703,...
func main() { instructions := readLineByLine() var accumulator int var hasCycles bool instructionsSwitched := make(map[int]instruction) i := 0 for i > -1 { for k, v := range instructions { instructionsSwitched[k] = v } if i > len(instructions) { break } // cycle through instructions and if foun...
[ -0.17141975462436676, 0.5238569378852844, 0.8341652750968933, 0.023128166794776917, -0.1644556075334549, 0.007742573041468859, 1.8795887231826782, -0.3744365870952606, -0.18553993105888367, 0.07562731206417084, 0.9451512694358826, 0.21913939714431763, 0.4253835082054138, 0.4564138948917389...
func Test_DebugLogger_Log_StandardOut(t *testing.T) { dl := NewDebugLogger("!!!! ") dl.Log("Two is %d", 2) }
[ 0.10503268986940384, 0.36870265007019043, 0.34976452589035034, 0.5573505163192749, -1.0471564531326294, 0.24750684201717377, -0.6970200538635254, 0.5912544131278992, -0.2732357978820801, -0.5919082760810852, -1.4176265001296997, -0.4216289222240448, 0.43545636534690857, 0.6968383193016052,...
func (tw *TestWriter) Write(incoming []byte) (n int, err error) { if tw.mockWriteHandler != nil { return tw.mockWriteHandler(incoming) } tw.capturedOutput = append(tw.capturedOutput, string(incoming)) return 0, nil }
[ -1.2202867269515991, -0.01544163841754198, 0.4886121451854706, 0.2855983078479767, 0.4454136788845062, 0.02137395739555359, 1.2421517372131348, 0.13653405010700226, 0.2937089502811432, -0.09642940759658813, -0.7124968767166138, -0.4621499478816986, -0.8982141017913818, 1.208213210105896, ...
func CreateDeviceFromPlugin(pluginName string) (Device, error) { p, err := plugin.Open(pluginName) if err != nil { return nil, err } f, err := p.Lookup("CreateDevicePlugin") if err != nil { return nil, err } d, err := f.(func() (Device, error))() return d, err }
[ -0.01356648188084364, -0.850117564201355, 0.3850345015525818, 0.4380047917366028, -0.12001816928386688, -0.30138060450553894, 0.6745821833610535, 0.1606713831424713, 0.22170861065387726, -0.9101141691207886, -0.27119341492652893, 0.28491640090942383, -0.4145861566066742, 0.1394571512937545...
func ParsePython(version string) (*Version, error) { result, err := parsePEP440(version) if err != nil { result, err = parseLegacyPython(version) } return result, err }
[ 0.43893060088157654, -0.15543952584266663, 0.4356975853443146, -0.3144744336605072, 0.13988804817199707, -0.33373764157295227, 0.861087441444397, 0.3746665120124817, 0.31463244557380676, -0.10125330835580826, -1.510897159576416, 0.5380669832229614, -0.3379824161529541, 0.6479139924049377, ...
func parsePEP440(version string) (*Version, error) { matches := findNamedMatches(version, pep440NormalizationRegex) if matches == nil { return nil, fmt.Errorf("not PEP440 version: %s", version) } releaseSegments := strings.Split(matches["release"], ".") if len(releaseSegments) > pep440MaxReleaseSegments { ret...
[ -0.5351982712745667, -0.8929867744445801, 0.671273946762085, -0.4423421621322632, -0.42051202058792114, -0.4749208390712738, 0.8035885691642761, -0.34827762842178345, 0.3715231120586395, -0.12500719726085663, -1.1290391683578491, -0.6000170111656189, -0.1376928985118866, 0.3564675450325012...
func parseLegacyPython(version string) (*Version, error) { segments := []string{} for _, segment := range splitLegacyPythonSegments(strings.ToLower(version)) { if strings.HasPrefix(segment, "*") { if segment < "*final" { for len(segments) > 0 && segments[len(segments)-1] == "*final-" { segments = segmen...
[ 0.7119670510292053, -1.153120756149292, 0.8481086492538452, -1.0451011657714844, 0.21955259144306183, -0.3971673846244812, -0.14386725425720215, 0.43718603253364563, 0.38851192593574524, 0.10815514624118805, -0.8262434601783752, -0.0522201843559742, 0.30540725588798523, 0.06266894191503525...
func NewTime(t time.Time) *Time { return &Time{Time: t} }
[ 0.3917304575443268, 0.18659424781799316, 0.10777069628238678, 0.30676499009132385, -0.7324076890945435, 0.38208746910095215, -1.6007399559020996, -1.2565603256225586, 0.3488880693912506, 0.8648092150688171, -0.3814074397087097, -0.17176730930805206, 0.07459944486618042, 0.07857204973697662...
func (t *Time) UnmarshalJSON(b []byte) (err error) { s := strings.Trim(string(b), "\"") if s == "null" { t.Time = time.Time{} return } if strings.HasSuffix(s, "Z") { s = s[:len(s)-1] } t.Time, err = time.Parse(dateFormat, s) return }
[ -0.2434978485107422, -0.23664860427379608, 0.7564578056335449, -0.8019294142723083, -0.6772037744522095, -0.5115222334861755, -0.07738123834133148, -0.1062658280134201, 0.41280704736709595, 1.3327378034591675, -0.8178818225860596, -0.37391170859336853, -0.6682251691818237, 0.71557819843292...
func NewLaptopServer(laptopStore LaptopStore, imageStore ImageStore, rateStore RateStore) *LaptopServer { return &LaptopServer{laptopStore: laptopStore, imageStore: imageStore, rateStore: rateStore} }
[ -1.5519267320632935, -0.18750809133052826, 0.42492255568504333, -0.5193833112716675, -0.5454331636428833, 0.24511118233203888, -0.5126134753227234, 0.04283014312386513, 0.6071951389312744, -0.13765087723731995, -0.6622122526168823, -0.2873183786869049, -0.4688590466976166, -0.2250865399837...
func (server *LaptopServer) CreateLaptop(ctx context.Context, req *pb.CreateLaptopRequest) (*pb.CreateLaptopResponse, error) { laptop := req.GetLaptop() log.Printf("receive a create-laptop request with id: %s", laptop.Id) if len(laptop.Id) > 0 { // check valid UUID _, err := uuid.Parse(laptop.Id) if err ...
[ -1.7292611598968506, 0.10172795504331589, 0.9799625873565674, 0.08941642940044403, 0.18944042921066284, 0.6556800603866577, 0.02436281554400921, -0.03616601228713989, 0.6394218802452087, 0.34149661660194397, -0.7390344738960266, -0.8342898488044739, -1.187030553817749, 0.061735305935144424...
func (server *LaptopServer) RateLaptop(stream pb.LaptopService_RateLaptopServer) error { for { err := contextError(stream.Context()) if err != nil { return err } req, err := stream.Recv() if err == io.EOF { log.Print("no more data") break } if err != nil { return logError(status...
[ -1.272918939590454, 0.3748963177204132, 1.0388797521591187, -0.3694402277469635, 0.20603229105472565, 0.3660021424293518, 0.11516278982162476, -0.49161258339881897, 0.1609964370727539, 0.8601481318473816, -0.3156629204750061, -0.08493701368570328, -0.9529354572296143, -0.08323128521442413,...
func logError(err error) error { if err != nil { log.Print(err) } return err }
[ 0.416714072227478, 0.4149406850337982, 0.25602003931999207, 0.8698392510414124, -0.3758851885795593, -0.40044716000556946, -0.38805192708969116, -0.06921769678592682, 1.2955667972564697, -0.3624952435493469, -0.08089481294155121, -0.03899679332971573, -0.3298338055610657, 0.559155583381652...
func (o StatusDetails) GotLastExitStatus() bool { return o.LastExitStatusErr == nil }
[ 0.2659858167171478, -0.07479315251111984, 0.4560343623161316, -1.0703672170639038, 0.4319699704647064, 0.005010184366255999, -0.06588725745677948, 0.47744062542915344, -0.06159534305334091, 0.000979159725829959, -0.8692260980606079, -0.4581746757030487, 0.6022779941558838, 0.31488019227981...
func (o StatusDetails) GotPid() bool { return o.PidErr == nil }
[ 1.1774725914001465, 0.062172409147024155, 0.5862774848937988, -0.004568180534988642, 0.5345848202705383, 0.7869794368743896, -0.9129277467727661, 0.4915722608566284, 0.5488464832305908, -0.6613654494285583, 0.4208201766014099, -0.5978069305419922, -0.2931284010410309, -0.3596288859844208, ...
func Install(configuration Configuration) error { if configuration.GetKind() == Daemon { err := isRoot() if err != nil { return err } } configPath, err := configuration.GetFilePath() if err != nil { return err } // Try to remove the LaunchAgent first because it may already exist. // Ignore errors be...
[ 0.9496074914932251, -0.23589634895324707, 0.5526862144470215, -0.49507075548171997, 0.007147739175707102, 0.07698075473308563, -0.01538925152271986, 0.39304688572883606, -0.3268378973007202, 0.6718091368675232, -0.267133504152298, -0.4616076350212097, -0.2228233814239502, 0.428476125001907...
func Remove(configPath string, kind Kind) error { if kind == Daemon { err := isRoot() if err != nil { return err } } _, err := run("unload", configPath) if err != nil { return err } err = os.Remove(configPath) if err != nil { return err } return nil }
[ -0.376164048910141, -0.3849753141403198, 0.6184387803077698, 0.33169591426849365, -0.07036226987838745, -0.07270918041467667, -0.26010558009147644, 0.35583388805389404, -0.058549683541059494, 0.5830051302909851, 0.5569604635238647, 0.6282539367675781, -1.0875381231307983, 0.842853248119354...
func RemoveService(label string) error { _, err := run("remove", label) if err != nil { return err } return nil }
[ -0.36449238657951355, 0.26561734080314636, 0.34113311767578125, 0.6961399912834167, 0.40435120463371277, 0.22177660465240479, -0.06597638875246048, 0.16443999111652374, -0.09553900361061096, 0.5155092477798462, -0.1906811147928238, -0.057354241609573364, -1.0482405424118042, 0.758534669876...
func IsInstalled(configuration Configuration) (isInstalled bool, err error) { return configuration.IsInstalled() }
[ 0.1653376817703247, -0.2907457649707794, 0.19134564697742462, 0.6899966597557068, 0.1283186376094818, -0.2786844074726105, 0.8047624230384827, 0.7245513796806335, 0.8870360255241394, 0.7872079610824585, -1.0857625007629395, -0.44582507014274597, 0.1428450495004654, 0.2759789228439331, -0...
func Start(label string, kind Kind) error { if kind == Daemon { err := isRoot() if err != nil { return err } } _, err := run("start", label) if err != nil { return err } return nil }
[ 0.09633703529834747, -0.4969158172607422, 0.5426679849624634, 1.0323625802993774, 0.49604231119155884, 0.40091821551322937, -0.5415626764297485, -0.25682467222213745, -0.28692513704299927, 0.8828433752059937, 0.37735527753829956, 2.2106456756591797, -0.12154781073331833, 0.8103903532028198...
func Stop(label string, kind Kind) error { if kind == Daemon { err := isRoot() if err != nil { return err } } _, err := run("stop", label) if err != nil { return err } return nil }
[ -1.0980240106582642, -0.305341899394989, 0.6422207355499268, 0.7827112078666687, 0.36848223209381104, 0.7106984853744507, -0.8747048377990723, -0.5288619995117188, -0.4170047342777252, 1.1824500560760498, 0.4475293457508087, 1.4738776683807373, -0.5381082892417908, 0.2627589702606201, 0....
func CurrentStatus(label string) (StatusDetails, error) { output, err := run("list", label) if err != nil { if strings.HasPrefix(output, couldNotFindServicePrefix) { return StatusDetails{ Status: NotInstalled, }, nil } return StatusDetails{ Status: Unknown, }, err } details := StatusDetails{ ...
[ -0.8271711468696594, -1.4856480360031128, 0.41942304372787476, -0.5312851667404175, -0.03115425445139408, 0.06538666039705276, -0.7056911587715149, 0.25414496660232544, 0.0015461195725947618, 0.2017485499382019, 0.05762841925024986, 0.3620564937591553, -0.4570792317390442, 1.00640308856964...
func NewFund(initialBalance int) *Fund { // We can return a pointer to a new struct without worrying about // whether it's on the stack or heap: Go figures that out for us. return &Fund{ balance: initialBalance, } }
[ 0.5622490048408508, -1.0552204847335815, 0.21998073160648346, 0.2705729901790619, -0.7617241144180298, -0.7277498245239258, 0.4702889323234558, -1.0048298835754395, 0.5978207588195801, -0.9482071399688721, 0.16283656656742096, 0.4920949339866638, -0.16937579214572906, -0.17728902399539948,...
func (f *Fund) Balance() int { return f.balance }
[ -0.28509268164634705, -0.11871744692325592, 0.27287527918815613, 0.5056414604187012, 0.7015514969825745, -0.026482049375772476, 0.524006724357605, -0.4888797104358673, 0.18830080330371857, -1.2323373556137085, 0.6980907917022705, -0.12834495306015015, -0.34087467193603516, 0.60990166664123...
func (o *AllConnectionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewAllConnectionsOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil ...
[ -0.2994413673877716, -1.3874034881591797, 0.7851212024688721, 0.5717737674713135, 0.14646382629871368, -1.2399741411209106, -0.3077374994754791, -0.10165932774543762, 0.7724199295043945, 0.28090614080429077, 0.6188740134239197, -0.9013266563415527, -0.9359661340713501, 0.12959127128124237,...
func NewAllConnectionsOK() *AllConnectionsOK { return &AllConnectionsOK{} }
[ 0.45315128564834595, -1.2559068202972412, 0.2770606279373169, 0.9630050659179688, -1.518549919128418, -0.8285255432128906, -0.32189154624938965, 0.42252546548843384, 0.30035126209259033, -0.201400488615036, -0.7961204051971436, -1.0891000032424927, 0.5538427829742432, 0.49281373620033264, ...
func NewAllConnectionsBadRequest() *AllConnectionsBadRequest { return &AllConnectionsBadRequest{} }
[ -0.13525491952896118, -1.1930007934570312, 0.7174754738807678, 0.8832753896713257, -0.6738623380661011, -0.6637266874313354, -1.4372166395187378, 0.09773379564285278, 0.20664866268634796, -1.1979542970657349, 0.1421976536512375, -0.19870008528232574, -0.22136375308036804, 1.017667889595031...
func NewAllConnectionsNotFound() *AllConnectionsNotFound { return &AllConnectionsNotFound{} }
[ 0.20630168914794922, -1.725653052330017, 0.27302300930023193, 0.6070296764373779, -0.9100888967514038, -0.1868448257446289, -0.28114840388298035, 0.1281670480966568, 0.9061455726623535, -0.6207574009895325, -0.6060752868652344, -0.32474571466445923, -0.14426465332508087, 0.6278368830680847...
func NextMemoryRegion(p process.Process, address uintptr) (region MemoryRegion, harderror error, softerrors []error) { return nextMemoryRegion(p, address) }
[ 0.09510312974452972, 0.3516823649406433, 0.04111958295106888, -0.35959336161613464, -1.389940619468689, 0.1645183116197586, 0.07216683030128479, -0.2808508574962616, 0.8077065348625183, -0.3203045725822449, 0.284309446811676, 1.587575912475586, -0.48093459010124207, 1.2983027696609497, 0...
func NextMemoryRegionAccess(p process.Process, address uintptr, access Access) (region MemoryRegion, harderror error, softerrors []error) { region, harderror, softerrors = NextMemoryRegion(p, address) if (harderror != nil) || (region == NoRegionAvailable) { return NoRegionAvailable, harderror, softerrors } if (r...
[ 0.0789244994521141, -0.7116378545761108, 0.5037078261375427, -0.5907822847366333, -1.0148128271102905, -0.24441543221473694, 0.732450544834137, -0.17918911576271057, 0.3680760860443115, -0.10247788578271866, 1.5316853523254395, 1.4013571739196777, -0.4061603844165802, 0.8980687260627747, ...
func NextReadableMemoryRegion(p process.Process, address uintptr) (region MemoryRegion, harderror error, softerrors []error) { r1, h1, s1 := NextMemoryRegionAccess(p, address, Readable) for { r2, h2, _ := NextMemoryRegionAccess(p, r1.Address+uintptr(r1.Size), Readable) if (h2 != nil) || (r2 == NoRegionAvailable) ...
[ 0.39519596099853516, -0.4218965768814087, 0.6254693269729614, -0.09366551786661148, -1.1013514995574951, 0.09996158629655838, 0.1285872459411621, -0.5422594547271729, -0.08026786148548126, -0.2165321707725525, 0.44531938433647156, 0.5713111162185669, -0.3646146357059479, 0.3977994918823242...
func CopyMemory(p process.Process, address uintptr, buffer []byte) (harderror error, softerrors []error) { return copyMemory(p, address, buffer) }
[ 0.3459632098674774, -0.5029193758964539, 0.37879109382629395, 0.05975637957453728, -0.6228576898574829, 0.7612938284873962, -0.28080689907073975, -0.5936388373374939, 0.7225158214569092, 0.401416152715683, -0.30245378613471985, 1.2361050844192505, -0.3844524919986725, 0.3632216453552246, ...
func WalkMemory(p process.Process, startAddress uintptr, bufSize uint, walkFn WalkFunc) (harderror error, softerrors []error) { var region MemoryRegion region, harderror, softerrors = NextReadableMemoryRegion(p, startAddress) if harderror != nil { return } // The first region can start befor startAddress. If ...
[ 0.4062459468841553, -0.3759967088699341, 0.47110283374786377, -0.3410094678401947, -0.07435847818851471, -0.3819231390953064, 0.7371389269828796, -0.6458709836006165, 0.015478934161365032, -0.3689432442188263, 0.06458590924739838, 1.277746558189392, -0.6982011198997498, 0.08955266326665878...
func walkRegion(p process.Process, region MemoryRegion, buf []byte, walkFn WalkFunc) (keepWalking bool, errorAddress uintptr, harderror error, softerrors []error) { softerrors = make([]error, 0) keepWalking = true remainingBytes := uintptr(region.Size) for addr := region.Address; remainingBytes > 0; { if remaini...
[ 0.008541819639503956, -0.27664411067962646, 0.5106410384178162, -0.7210702896118164, -0.5560034513473511, 0.10811338573694229, 1.1931120157241821, -0.24385347962379456, 0.13589228689670563, -0.3225221633911133, -0.49639183282852173, 0.6661131978034973, -0.8139377236366272, 0.20646108686923...
func SlidingWalkMemory(p process.Process, startAddress uintptr, bufSize uint, walkFn WalkFunc) ( harderror error, softerrors []error) { if bufSize%2 != 0 { return fmt.Errorf("SlidingWalkMemory doesn't support odd bufferSizes"), softerrors } buffer := make([]byte, bufSize) halfBufferSize := bufSize / 2 current...
[ 0.3667075037956238, -0.8476122617721558, 0.8310967683792114, -0.7520657777786255, -0.6699312329292297, -0.09582830220460892, 1.3985053300857544, -0.2651591897010803, 0.2549279034137726, -0.5489941835403442, -0.8348422646522522, 0.6852860450744629, -0.9166238903999329, 0.3286721408367157, ...
func GetENV() string { if env == "" { return Dev } return env }
[ 0.2915482521057129, 1.135364055633545, 0.3364551067352295, 1.4182889461517334, 0.8425307273864746, 0.7428752183914185, 0.5056347250938416, -0.6013948917388916, 0.33477306365966797, -0.4996335506439209, 0.5393602848052979, 1.188920497894287, -0.4130691885948181, 0.28604575991630554, 0.963...
func GetInt(key string) int { return defaultViper.GetInt(key) }
[ -0.09014183282852173, 1.1726160049438477, 0.11563294380903244, 0.5348204970359802, 0.20603448152542114, -0.5688226819038391, -0.051724646240472794, -0.42696523666381836, -0.7451635003089905, 0.8340498805046082, -0.44947633147239685, -0.36079347133636475, -0.8568563461303711, 0.313302785158...
func GetUint(key string) uint { return defaultViper.GetUint(key) }
[ -0.6301686763763428, 0.5228683948516846, 0.21180419623851776, 0.5327646136283875, 0.02563038095831871, -0.6145240068435669, -0.10310593247413635, 0.5384149551391602, 0.4298578202724457, -0.09351935237646103, -0.7027916312217712, 0.11192433536052704, -0.154351145029068, 0.03206617385149002,...
func GetUint32(key string) uint32 { return defaultViper.GetUint32(key) }
[ -0.24598534405231476, 1.0540170669555664, 0.1168702095746994, 0.5268481969833374, 0.06059843301773071, -0.01630719006061554, -0.6653068661689758, 0.07514391094446182, -0.20150910317897797, 0.30912986397743225, -0.2927047908306122, -0.22899264097213745, 0.10722346603870392, 0.28482761979103...
func GetIntDefault(key string, defaultValue int) int { v := GetInt(key) if v != 0 { return v } return defaultValue }
[ 0.20448867976665497, 0.8596044778823853, 0.5681495666503906, 0.252143919467926, 0.4567296504974365, 0.024732330814003944, -0.4112494885921478, 0.5232888460159302, -0.7815272212028503, 0.7055005431175232, -0.6165293455123901, -0.15189498662948608, -1.5126110315322876, 0.13678185641765594, ...
func GetUint32Default(key string, defaultValue uint32) uint32 { v := GetUint32(key) if v != 0 { return v } return defaultValue }
[ 0.29690131545066833, 1.182389736175537, 0.3722341060638428, 0.17990009486675262, 0.17538723349571228, 0.4152364134788513, -0.9102489352226257, 0.35478222370147705, -0.5337709784507751, 0.3970118761062622, -0.04450497776269913, -0.41775044798851013, -0.7884353399276733, 0.31047382950782776,...
func GetString(key string) string { return defaultViper.GetString(key) }
[ -0.1295202374458313, 0.5434286594390869, 0.05722466856241226, 1.0464351177215576, 0.14944742619991302, -0.418343186378479, -0.2510577440261841, -0.5786293148994446, 0.24967405200004578, 0.9606313705444336, 0.14553894102573395, -0.282478392124176, -0.4808667302131653, -0.2706851065158844, ...
func GetStringDefault(key, defaultValue string) string { v := GetString(key) if v != "" { return v } return defaultValue }
[ 0.7315773367881775, 0.4134156405925751, 0.24750882387161255, -0.007183086592704058, 0.2179027944803238, -0.3052366375923157, -1.025007724761963, 0.29675355553627014, -0.22009968757629395, 0.7134279608726501, 0.45709365606307983, -0.05690385773777962, -1.0214895009994507, -0.264952749013900...
func GetDuration(key string) time.Duration { return defaultViper.GetDuration(key) }
[ -0.16014127433300018, 0.6345104575157166, 0.059604644775390625, 1.4048649072647095, 0.28409457206726074, -0.11428830772638321, 0.6224128007888794, 0.013773786835372448, 0.4587731957435608, 1.4095966815948486, -0.5539416670799255, -0.6287835836410522, -0.10017012059688568, 0.904078423976898...
func GetDurationDefault(key string, defaultValue time.Duration) time.Duration { v := GetDuration(key) if v != 0 { return v } return defaultValue }
[ 0.1176382377743721, 0.532940685749054, 0.29210323095321655, 0.8505251407623291, 0.47685378789901733, 0.17525699734687805, -0.3968859314918518, 0.7603884935379028, -0.2372369021177292, 0.9740957617759705, -0.04680565372109413, -0.5339028835296631, -0.3508680760860443, 0.6525217890739441, ...
func GetStringSlice(key string) []string { return defaultViper.GetStringSlice(key) }
[ -0.8308120965957642, 0.5119304060935974, 0.11353348195552826, 0.582255482673645, 0.7671337723731995, -1.1809369325637817, -1.4603047370910645, -0.8327977657318115, -0.1374821662902832, 0.6837533116340637, 0.1626490205526352, 0.16749264299869537, -0.27418792247772217, 0.1029559001326561, ...
func GetStringMap(key string) map[string]interface{} { return defaultViper.GetStringMap(key) }
[ -0.9314455986022949, 0.13278606534004211, 0.35271748900413513, 0.3363988399505615, 0.08952224999666214, -0.5678579211235046, -0.17442761361598969, -0.12736676633358002, 0.2514721155166626, 0.6057154536247253, -0.3794710636138916, -0.2188459038734436, -0.5236821174621582, -0.105410359799861...