query
stringlengths
10
3.85k
ru_query
stringlengths
9
3.76k
document
stringlengths
17
430k
metadata
dict
negatives
listlengths
97
100
negative_scores
listlengths
97
100
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
getBits sets all bits in the range [min, max], modulo the given step size.
getBits устанавливает все биты в диапазоне [min, max], с учетом заданного размера шага.
func getBits(min, max, step uint) uint64 { var bits uint64 // If step is 1, use shifts. if step == 1 { return ^(math.MaxUint64 << (max + 1)) & (math.MaxUint64 << min) } // Else, use a simple loop. for i := min; i <= max; i += step { bits |= 1 << i } return bits }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func Range(low, high, step int) Bits {\n\tvar b Bits\n\tif low < 0 {\n\t\tlow = 0\n\t}\n\tif high > 63 {\n\t\thigh = 63\n\t}\n\tfor n := low; n <= high; n += step {\n\t\tb = b.Set(n)\n\t}\n\treturn b\n}", "func SetBits(z *big.Int, abs []big.Word) *big.Int {\n\treturn z.SetBits(abs)\n}", "func newBitset(bits ui...
[ "0.6353587", "0.54566395", "0.53469795", "0.53462315", "0.5337429", "0.5304013", "0.5241235", "0.52031434", "0.5197273", "0.5193695", "0.51649874", "0.51403403", "0.5129424", "0.5081992", "0.50790936", "0.5070936", "0.5058837", "0.5049866", "0.5022632", "0.50153077", "0.49825...
0.7482306
0
NewKafkaProducer returns a new writer for writing messages to a given topic.
NewKafkaProducer возвращает новый writer для записи сообщений в заданный топик.
func NewKafkaProducer(kafkaAddress, topic string) (*kafka.Writer, error) { conn, err := kafka.Dial("tcp", kafkaAddress) if err != nil { return nil, err } err = conn.CreateTopics(kafka.TopicConfig{ Topic: topic, NumPartitions: 6, ReplicationFactor: 1, }) if err != nil { return nil, err ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewProducer(brokers string) *kafkago.Writer {\n\treturn kafkago.NewWriter(kafkago.WriterConfig{\n\t\tBrokers: []string{brokers},\n\t\tTopic: viper.GetString(\"kafka.topic\"),\n\t\tBalancer: &kafkago.Hash{},\n\t\tBatchTimeout: time.Duration(100) * time.Millisecond,\n\t\tQueueCapacity: 10000...
[ "0.7589761", "0.7055011", "0.68371147", "0.67392504", "0.6711313", "0.6677843", "0.66746676", "0.6628656", "0.64824504", "0.63408065", "0.62722284", "0.62657493", "0.62012464", "0.61716956", "0.6127535", "0.6051101", "0.604499", "0.60395133", "0.6035999", "0.6013231", "0.5914...
0.74114734
1
UnmarshalJSON unmarshall implementation for Country
Реализация разбора JSON для Country
func (country *Country) UnmarshalJSON(data []byte) error { var str string if err := json.Unmarshal(data, &str); err != nil { return err } _, err := ByCountryStrErr(str) if err != nil { return err } *country = Country(str) return nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (s *ServiceCountry) UnmarshalJSON(data []byte) error {\n\tvar rawMsg map[string]json.RawMessage\n\tif err := json.Unmarshal(data, &rawMsg); err != nil {\n\t\treturn fmt.Errorf(\"unmarshalling type %T: %v\", s, err)\n\t}\n\tfor key, val := range rawMsg {\n\t\tvar err error\n\t\tswitch key {\n\t\tcase \"id\":\n...
[ "0.7520358", "0.7236365", "0.6672791", "0.66148806", "0.6038574", "0.5802558", "0.56341153", "0.5518476", "0.544189", "0.54402363", "0.54201967", "0.54020405", "0.5388485", "0.53526396", "0.534792", "0.5329885", "0.532914", "0.5324301", "0.5320204", "0.5309219", "0.5292587", ...
0.74020594
1
IsSet indicates if Country is set
IsSet указывает, установлен ли Country
func (country Country) IsSet() bool { return len(string(country)) > 0 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (m *User) SetCountry(value *string)() {\n m.country = value\n}", "func (me *TSupplierCountry) Set(s string) { (*xsdt.String)(me).Set(s) }", "func (a *Meta_Country) Set(fieldName string, value interface{}) {\n\tif a.AdditionalProperties == nil {\n\t\ta.AdditionalProperties = make(map[string]interface{})...
[ "0.65503603", "0.65052235", "0.6231138", "0.6095958", "0.6047148", "0.5990728", "0.58719623", "0.5839228", "0.581528", "0.5749963", "0.5691082", "0.5689148", "0.5682564", "0.5672455", "0.56587803", "0.56568104", "0.5652519", "0.5650086", "0.5649846", "0.5614951", "0.5588311",...
0.7769249
0
IsCountryIn Checks there is a country in Countries
IsCountryIn Проверяет, есть ли страна в Countries
func (countries Countries) IsCountryIn(country string) bool { for _, c := range countries { if string(c) == country { return true } } return false }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func isCountry(str string) bool {\n\tfor _, entry := range govalidator.ISO3166List {\n\t\tif str == entry.EnglishShortName {\n\t\t\treturn true\n\t\t}\n\t}\n\n\treturn false\n}", "func CountryIn(vs ...string) predicate.Location {\n\tv := make([]interface{}, len(vs))\n\tfor i := range v {\n\t\tv[i] = vs[i]\n\t}\n...
[ "0.7393233", "0.72111654", "0.64721316", "0.6398905", "0.63727", "0.63351285", "0.62785286", "0.62423366", "0.61999017", "0.6182004", "0.61802745", "0.6177708", "0.615309", "0.6137258", "0.6083767", "0.6018212", "0.59891874", "0.5952523", "0.5952199", "0.5889898", "0.5869588"...
0.8314264
0
UnmarshalJSON unmarshall implementation for Currency
Реализация метода UnmarshalJSON для Currency
func (currency *Currency) UnmarshalJSON(data []byte) error { var str string if err := json.Unmarshal(data, &str); err != nil { return err } currencyValue, err := ByCurrencyStrErr(str) if err != nil { return err } *currency = currencyValue.Currency() return nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (c *Currency) UnmarshalJSON(b []byte) error {\n\t// UnmarshalJSON does not expect quotes\n\tb = bytes.Trim(b, `\"`)\n\terr := c.i.UnmarshalJSON(b)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif c.i.Sign() < 0 {\n\t\tc.i = *big.NewInt(0)\n\t\treturn ErrNegativeCurrency\n\t}\n\treturn nil\n}", "func (v *Curren...
[ "0.742587", "0.71653044", "0.6980743", "0.68119055", "0.64238787", "0.63120264", "0.6245073", "0.6195886", "0.6194892", "0.6182612", "0.6112677", "0.6090041", "0.60086787", "0.59561217", "0.59060544", "0.5903369", "0.5868142", "0.58613175", "0.5851409", "0.58497226", "0.58438...
0.7172785
1
IsSet indicates if Currency is set
IsSet указывает, установлен ли Currency
func (currency Currency) IsSet() bool { return len(string(currency)) > 0 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (m NoSides) HasSettlCurrency() bool {\n\treturn m.Has(tag.SettlCurrency)\n}", "func (t *VSIntDbl) IsSet() bool {\n\treturn true\n}", "func (country Country) IsSet() bool {\n\treturn len(string(country)) > 0\n}", "func (t *VSDbl) IsSet() bool {\n\treturn true\n}", "func (t *VSStrDbl) IsSet() bool {\n\t...
[ "0.63235146", "0.62823975", "0.61658186", "0.6161759", "0.6142526", "0.61146784", "0.6071438", "0.6032922", "0.60309446", "0.6022377", "0.5981361", "0.59167683", "0.58959395", "0.5871354", "0.5824443", "0.5822197", "0.5774597", "0.5711065", "0.5703303", "0.56996065", "0.56971...
0.7954899
0
IsSet indicates if Code is set
IsSet указывает, установлен ли код
func (code Code) IsSet() bool { return len(string(code)) > 0 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (t *VSIntStr) IsSet() bool {\n\treturn true\n}", "func (o *BuildComboFormDescriptorOK) IsCode(code int) bool {\n\treturn code == 200\n}", "func (o *SetAllocatorMetadataItemOK) IsCode(code int) bool {\n\treturn code == 200\n}", "func (o *CreateOrUpdateAWSSettingsCreated) IsCode(code int) bool {\n\treturn...
[ "0.600504", "0.5894775", "0.5868944", "0.5815714", "0.5802817", "0.580272", "0.5783933", "0.5768184", "0.5755762", "0.5716777", "0.5711601", "0.56909645", "0.56888294", "0.56586444", "0.5655527", "0.5650609", "0.5644416", "0.56438637", "0.56348795", "0.56344795", "0.5632594",...
0.739425
0
IsSet indicates if Number is set
IsSet указывает, установлено ли число
func (number Number) IsSet() bool { return len(string(number)) > 0 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (t *VSIntDbl) IsSet() bool {\n\treturn true\n}", "func (t *VSStrInt) IsSet() bool {\n\treturn true\n}", "func (t *VSStrDbl) IsSet() bool {\n\treturn true\n}", "func (t *VSInt) IsSet() bool {\n\treturn true\n}", "func (t *VSIntInt) IsSet() bool {\n\treturn true\n}", "func (t *VSDblInt) IsSet() bool {...
[ "0.69339883", "0.6756747", "0.6663215", "0.66329336", "0.6566586", "0.6484455", "0.634472", "0.6265728", "0.6180234", "0.61563396", "0.61460376", "0.60782546", "0.605109", "0.5982352", "0.5968536", "0.59613574", "0.5849868", "0.5842947", "0.5774191", "0.5755659", "0.5718024",...
0.77407116
0
CurrencyByCurrency get currency by currency
Валюта по валюте получает валюту по валюте
func (currencies currencies) CurrencyByCurrency(curr string) (currency, bool) { for _, c := range currencies { if string(c.currency) == curr { return c, true } } return currency{}, false }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func ByCurrency(currency Currency) (c currency, ok bool) {\n\tc, ok = currenciesByCurrency[currency.String()]\n\treturn\n}", "func GetCurrency(code Code) (c Currency, ok bool) {\n\tok = false\n\tif !code.IsValid() {\n\t\treturn\n\t}\n\n\tc, ok = currenciesByCode[code]\n\treturn\n}", "func (h *HitBTC) GetCurren...
[ "0.712126", "0.6747095", "0.67326546", "0.66519374", "0.64402825", "0.6391166", "0.6330754", "0.6322158", "0.6318228", "0.63087094", "0.62615204", "0.6257262", "0.6242342", "0.6214747", "0.614413", "0.61223215", "0.6066883", "0.6050893", "0.604564", "0.60454744", "0.6022849",...
0.72543776
0
CurrencyByCode gets currency by code
CurrencyByCode получает валюту по коду
func (currencies currencies) CurrencyByCode(code string) (currency, bool) { for _, c := range currencies { if string(c.code) == code { return c, true } } return currency{}, false }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func ByCode(code Code) (c currency, ok bool) {\n\tc, ok = currenciesByCode[code.String()]\n\treturn\n}", "func (s *Currencies) FindByCode(code string) (*models.Currency, error) {\n\tvar currency models.Currency\n\n\terr := s.db.Where(\"code = ?\", code).FirstOrInit(&currency).Error\n\n\treturn &currency, err\n}"...
[ "0.77351403", "0.74289626", "0.7260116", "0.7163229", "0.69392973", "0.6830337", "0.67866826", "0.67462707", "0.6739368", "0.669114", "0.6622207", "0.65072155", "0.6408006", "0.6378446", "0.6357323", "0.63329697", "0.6305248", "0.6265441", "0.62562954", "0.61683005", "0.61658...
0.7806417
0
CurrencyByNumber gets currency by number
CurrencyByNumber получает валюту по номеру
func (currencies currencies) CurrencyByNumber(number string) (currency, bool) { for _, c := range currencies { if string(c.number) == number { return c, true } } return currency{}, false }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func ByNumber(number Number) (c currency, ok bool) {\n\tc, ok = currenciesByNumber[number.String()]\n\treturn\n}", "func ByNumberStr(number string) (c currency, ok bool) {\n\tc, ok = currenciesByNumber[number]\n\treturn\n}", "func Currency() *CurrencyInfo {\n\tindex := rand.Intn(len(data.Data()[\"currency\"][\...
[ "0.74653196", "0.68633723", "0.6495746", "0.6428904", "0.63087445", "0.6232836", "0.6177459", "0.6165097", "0.5944682", "0.59029067", "0.588898", "0.5877524", "0.5839041", "0.583721", "0.58142686", "0.58103347", "0.57569075", "0.5723884", "0.57216394", "0.56859946", "0.562979...
0.7446671
1
ByCodeStr lookup for currency type by code
Поиск типа валюты по коду ByCodeStr
func ByCodeStr(code string) (c currency, ok bool) { c, ok = currenciesByCode[code] return }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func ByCode(code Code) (c currency, ok bool) {\n\tc, ok = currenciesByCode[code.String()]\n\treturn\n}", "func ByCodeStrErr(code string) (c currency, err error) {\n\tvar ok bool\n\tc, ok = currenciesByCode[code]\n\n\tif !ok {\n\t\treturn currency{}, fmt.Errorf(\"'%s' is not valid ISO-4217 code\", code)\n\t}\n\n\...
[ "0.73103803", "0.6828898", "0.6659425", "0.64761", "0.6436941", "0.6435694", "0.64262456", "0.6325654", "0.624168", "0.62250626", "0.60374033", "0.59841007", "0.56001306", "0.55955267", "0.5517457", "0.5515457", "0.5472482", "0.54600394", "0.5382138", "0.5378068", "0.5372913"...
0.7808488
0
ByCurrencyStr lookup for currency type by currency
Поиск типа валюты по строке валюты ByCurrencyStr
func ByCurrencyStr(currency string) (c currency, ok bool) { c, ok = currenciesByCurrency[currency] return }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func ByCountryStr(country string) (c currencies, ok bool) {\n\tc, ok = currenciesByCountry[country]\n\treturn\n}", "func ByCodeStr(code string) (c currency, ok bool) {\n\tc, ok = currenciesByCode[code]\n\treturn\n}", "func ByNumberStr(number string) (c currency, ok bool) {\n\tc, ok = currenciesByNumber[number]...
[ "0.68975925", "0.6786371", "0.67324406", "0.6673408", "0.6592272", "0.6533355", "0.6397389", "0.6046408", "0.59839725", "0.5982539", "0.59611624", "0.5863553", "0.5841928", "0.5815756", "0.5796604", "0.5770695", "0.5715139", "0.56904584", "0.5637685", "0.548118", "0.5476843",...
0.78283846
0
ByNumberStr lookup for currency type by number
По номеру строки поиск типа валюты по номеру
func ByNumberStr(number string) (c currency, ok bool) { c, ok = currenciesByNumber[number] return }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func ByNumber(number Number) (c currency, ok bool) {\n\tc, ok = currenciesByNumber[number.String()]\n\treturn\n}", "func ByNumberStrErr(number string) (c currency, err error) {\n\tvar ok bool\n\tc, ok = currenciesByNumber[number]\n\n\tif !ok {\n\t\treturn currency{}, fmt.Errorf(\"'%s' is not valid ISO-4217 numbe...
[ "0.6817933", "0.65723807", "0.6502705", "0.6447706", "0.6443985", "0.5979146", "0.5968836", "0.57494783", "0.574361", "0.56470025", "0.5584685", "0.5536671", "0.55269", "0.54442865", "0.54131377", "0.5378354", "0.53639525", "0.530616", "0.5285936", "0.52613264", "0.52027345",...
0.7869854
0
ByCountryStr lookup for currencies type by country
По стране строка поиска типов валют по стране
func ByCountryStr(country string) (c currencies, ok bool) { c, ok = currenciesByCountry[country] return }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func ByCountry(country Country) (c currencies, ok bool) {\n\tc, ok = currenciesByCountry[country.String()]\n\treturn\n}", "func ByCountryStrErr(country string) (c currencies, err error) {\n\tvar ok bool\n\tc, ok = currenciesByCountry[country]\n\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"'%s' is not valid ISO-4217...
[ "0.7116249", "0.6771441", "0.6448623", "0.61640435", "0.60912514", "0.56510687", "0.562963", "0.56018627", "0.55800307", "0.54929966", "0.54818165", "0.5421905", "0.53713953", "0.53572464", "0.5337062", "0.53153455", "0.5249796", "0.52379555", "0.5210464", "0.51556665", "0.51...
0.8230134
0
ByCodeStrErr lookup for currency type by code
Поиск типа валюты по коду ByCodeStrErr
func ByCodeStrErr(code string) (c currency, err error) { var ok bool c, ok = currenciesByCode[code] if !ok { return currency{}, fmt.Errorf("'%s' is not valid ISO-4217 code", code) } return }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func ByCodeErr(code Code) (c currency, err error) {\n\tvar ok bool\n\tc, ok = currenciesByCode[code.String()]\n\n\tif !ok {\n\t\treturn currency{}, fmt.Errorf(\"'%s' is not valid ISO-4217 code\", code)\n\t}\n\n\treturn\n}", "func ByCodeStr(code string) (c currency, ok bool) {\n\tc, ok = currenciesByCode[code]\n\...
[ "0.7749114", "0.6958004", "0.662515", "0.65252256", "0.6470898", "0.64441013", "0.6224553", "0.6029232", "0.59684896", "0.5962775", "0.58444315", "0.5785742", "0.57549185", "0.5750396", "0.57261664", "0.56605464", "0.56460124", "0.56161344", "0.56147873", "0.5612118", "0.5604...
0.7907018
0
ByCurrencyStrErr lookup for currency type by currency
Поиск типа валюты по строке валюты ByCurrencyStrErr
func ByCurrencyStrErr(currencyStr string) (c currency, err error) { var ok bool c, ok = currenciesByCurrency[currencyStr] if !ok { return currency{}, fmt.Errorf("'%s' is not valid ISO-4217 currency", currencyStr) } return }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func ByCurrencyErr(currencyStr Currency) (c currency, err error) {\n\tvar ok bool\n\tc, ok = currenciesByCurrency[currencyStr.String()]\n\n\tif !ok {\n\t\treturn currency{}, fmt.Errorf(\"'%s' is not valid ISO-4217 currency\", currencyStr)\n\t}\n\n\treturn\n}", "func ByCountryStrErr(country string) (c currencies,...
[ "0.791155", "0.7033588", "0.6906172", "0.68585384", "0.67705154", "0.6440552", "0.63040984", "0.6203238", "0.6036318", "0.5979185", "0.58646864", "0.5829881", "0.58076686", "0.5793948", "0.5785826", "0.5701816", "0.56405437", "0.5605415", "0.5544147", "0.55334294", "0.5348575...
0.78136224
1
ByNumberStrErr lookup for currency type by number
Поиск типа валюты по номеру с ошибкой
func ByNumberStrErr(number string) (c currency, err error) { var ok bool c, ok = currenciesByNumber[number] if !ok { return currency{}, fmt.Errorf("'%s' is not valid ISO-4217 number", number) } return }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func ByNumberErr(number Number) (c currency, err error) {\n\tvar ok bool\n\tc, ok = currenciesByNumber[number.String()]\n\n\tif !ok {\n\t\treturn currency{}, fmt.Errorf(\"'%s' is not valid ISO-4217 number\", number)\n\t}\n\n\treturn\n}", "func ByNumberStr(number string) (c currency, ok bool) {\n\tc, ok = currenc...
[ "0.7464267", "0.701826", "0.66607094", "0.66269207", "0.6476945", "0.6183518", "0.6154435", "0.59164727", "0.5779423", "0.57048374", "0.55546963", "0.5391889", "0.53823334", "0.5304725", "0.5281949", "0.5280108", "0.52798015", "0.5269731", "0.5257536", "0.51309687", "0.510625...
0.7802311
0
ByCountryStrErr lookup for currencies type by country
Поиск типов валют по стране ByCountryStrErr
func ByCountryStrErr(country string) (c currencies, err error) { var ok bool c, ok = currenciesByCountry[country] if !ok { return nil, fmt.Errorf("'%s' is not valid ISO-4217 country", country) } return }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func ByCountryErr(country Country) (c currencies, err error) {\n\tvar ok bool\n\tc, ok = currenciesByCountry[country.String()]\n\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"'%s' is not valid ISO-4217 country\", country)\n\t}\n\n\treturn\n}", "func ByCountryStr(country string) (c currencies, ok bool) {\n\tc, ok = c...
[ "0.7716239", "0.746525", "0.6514391", "0.6457357", "0.64152604", "0.6158099", "0.5888997", "0.5701336", "0.56703097", "0.5649593", "0.56475663", "0.56095713", "0.551954", "0.5500617", "0.54689586", "0.5342147", "0.53403157", "0.53308916", "0.53119993", "0.5272928", "0.5260263...
0.8191458
0
ByCode lookup for currency type by code
По коду поисковый запрос по типу валюты по коду
func ByCode(code Code) (c currency, ok bool) { c, ok = currenciesByCode[code.String()] return }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (currencies currencies) CurrencyByCode(code string) (currency, bool) {\n\tfor _, c := range currencies {\n\t\tif string(c.code) == code {\n\t\t\treturn c, true\n\t\t}\n\t}\n\n\treturn currency{}, false\n}", "func ByCodeStr(code string) (c currency, ok bool) {\n\tc, ok = currenciesByCode[code]\n\treturn\n}",...
[ "0.711305", "0.70005816", "0.68633837", "0.64822996", "0.6429585", "0.63299453", "0.62102735", "0.61856073", "0.58091164", "0.58040273", "0.57661283", "0.57386893", "0.5727519", "0.56891936", "0.5676841", "0.56753325", "0.56372035", "0.56358904", "0.5599372", "0.55699724", "0...
0.77860105
0
ByCurrency lookup for currency type by currency
По валютному типу поиска по валюте
func ByCurrency(currency Currency) (c currency, ok bool) { c, ok = currenciesByCurrency[currency.String()] return }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (currencies currencies) CurrencyByCurrency(curr string) (currency, bool) {\n\tfor _, c := range currencies {\n\t\tif string(c.currency) == curr {\n\t\t\treturn c, true\n\t\t}\n\t}\n\n\treturn currency{}, false\n}", "func ByCurrencyStr(currency string) (c currency, ok bool) {\n\tc, ok = currenciesByCurrency[...
[ "0.6820611", "0.65810734", "0.61428577", "0.6023269", "0.60230213", "0.5916888", "0.58960956", "0.58749396", "0.5846241", "0.578117", "0.57568413", "0.5741295", "0.5740566", "0.57186496", "0.567756", "0.55976605", "0.55669355", "0.5535557", "0.55213594", "0.5449528", "0.54434...
0.7225508
0
ByNumber lookup for currency type by number
По номеру поиск типа валюты по номеру
func ByNumber(number Number) (c currency, ok bool) { c, ok = currenciesByNumber[number.String()] return }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func ByNumberStr(number string) (c currency, ok bool) {\n\tc, ok = currenciesByNumber[number]\n\treturn\n}", "func (currencies currencies) CurrencyByNumber(number string) (currency, bool) {\n\tfor _, c := range currencies {\n\t\tif string(c.number) == number {\n\t\t\treturn c, true\n\t\t}\n\t}\n\n\treturn curren...
[ "0.6928493", "0.68912613", "0.6297232", "0.617345", "0.58834743", "0.5832352", "0.58096915", "0.5701448", "0.5588778", "0.5461972", "0.53230804", "0.53069794", "0.5248212", "0.51886237", "0.51393116", "0.50860757", "0.50569624", "0.5041218", "0.5023148", "0.50179917", "0.4962...
0.7456256
0
ByCountry lookup for currency type by country
По стране поиск типа валюты по стране
func ByCountry(country Country) (c currencies, ok bool) { c, ok = currenciesByCountry[country.String()] return }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func ByCountryStr(country string) (c currencies, ok bool) {\n\tc, ok = currenciesByCountry[country]\n\treturn\n}", "func ByCountryErr(country Country) (c currencies, err error) {\n\tvar ok bool\n\tc, ok = currenciesByCountry[country.String()]\n\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"'%s' is not valid ISO-4217...
[ "0.7243346", "0.6430731", "0.5919585", "0.5860527", "0.58262354", "0.5715987", "0.56672966", "0.56334823", "0.5629747", "0.5584398", "0.553167", "0.54191345", "0.5390111", "0.535436", "0.5313098", "0.5309947", "0.53078055", "0.5307197", "0.52507395", "0.52407664", "0.5229729"...
0.76937616
0
ByCodeErr lookup for currency type by code
Поиск типа валюты по коду ByCodeErr
func ByCodeErr(code Code) (c currency, err error) { var ok bool c, ok = currenciesByCode[code.String()] if !ok { return currency{}, fmt.Errorf("'%s' is not valid ISO-4217 code", code) } return }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func ByCodeStrErr(code string) (c currency, err error) {\n\tvar ok bool\n\tc, ok = currenciesByCode[code]\n\n\tif !ok {\n\t\treturn currency{}, fmt.Errorf(\"'%s' is not valid ISO-4217 code\", code)\n\t}\n\n\treturn\n}", "func ByCode(code Code) (c currency, ok bool) {\n\tc, ok = currenciesByCode[code.String()]\n\...
[ "0.72557294", "0.69156337", "0.6348125", "0.6243849", "0.62317413", "0.6062725", "0.6021445", "0.6007123", "0.59874946", "0.59745944", "0.5952912", "0.5939566", "0.59384495", "0.5903402", "0.58690673", "0.58429134", "0.58231896", "0.5818882", "0.5784363", "0.5783797", "0.5762...
0.8068545
0
ByCurrencyErr lookup for currencies type by code
Поиск типа валют по коду
func ByCurrencyErr(currencyStr Currency) (c currency, err error) { var ok bool c, ok = currenciesByCurrency[currencyStr.String()] if !ok { return currency{}, fmt.Errorf("'%s' is not valid ISO-4217 currency", currencyStr) } return }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func ByCodeErr(code Code) (c currency, err error) {\n\tvar ok bool\n\tc, ok = currenciesByCode[code.String()]\n\n\tif !ok {\n\t\treturn currency{}, fmt.Errorf(\"'%s' is not valid ISO-4217 code\", code)\n\t}\n\n\treturn\n}", "func ByCodeStrErr(code string) (c currency, err error) {\n\tvar ok bool\n\tc, ok = curre...
[ "0.73201984", "0.6735376", "0.6608469", "0.65929776", "0.6350844", "0.6255838", "0.6243447", "0.6242924", "0.622392", "0.61914283", "0.5953313", "0.59486204", "0.5942135", "0.59157544", "0.5864772", "0.5721525", "0.57012635", "0.5698221", "0.5652568", "0.5614737", "0.5614035"...
0.7103866
1
ByNumberErr lookup for currencies type by number
Поиск типов валют по номеру
func ByNumberErr(number Number) (c currency, err error) { var ok bool c, ok = currenciesByNumber[number.String()] if !ok { return currency{}, fmt.Errorf("'%s' is not valid ISO-4217 number", number) } return }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func ByNumberStrErr(number string) (c currency, err error) {\n\tvar ok bool\n\tc, ok = currenciesByNumber[number]\n\n\tif !ok {\n\t\treturn currency{}, fmt.Errorf(\"'%s' is not valid ISO-4217 number\", number)\n\t}\n\n\treturn\n}", "func ByNumber(number Number) (c currency, ok bool) {\n\tc, ok = currenciesByNumb...
[ "0.68148583", "0.6639139", "0.6220518", "0.6076349", "0.5943517", "0.5899749", "0.5606017", "0.5513069", "0.5377606", "0.5259354", "0.5212386", "0.51051205", "0.50797594", "0.5073507", "0.5073319", "0.5038484", "0.49862245", "0.49223855", "0.48956224", "0.48798838", "0.486761...
0.7502478
0
ByCountryErr lookup for currencies type by country
Поиск типов валют по стране ByCountryErr
func ByCountryErr(country Country) (c currencies, err error) { var ok bool c, ok = currenciesByCountry[country.String()] if !ok { return nil, fmt.Errorf("'%s' is not valid ISO-4217 country", country) } return }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func ByCountryStrErr(country string) (c currencies, err error) {\n\tvar ok bool\n\tc, ok = currenciesByCountry[country]\n\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"'%s' is not valid ISO-4217 country\", country)\n\t}\n\n\treturn\n}", "func ByCountry(country Country) (c currencies, ok bool) {\n\tc, ok = currencies...
[ "0.7554859", "0.6782914", "0.66101635", "0.6152723", "0.59113085", "0.584685", "0.5671783", "0.5669322", "0.55411214", "0.5414264", "0.5399832", "0.5392362", "0.53908765", "0.5350927", "0.53391033", "0.532064", "0.53134775", "0.5284964", "0.5261415", "0.5257611", "0.5256462",...
0.81207436
0
Name returns a view or table name in SQL database ("actor_info").
Name возвращает имя представления или таблицы в СУБД SQL ("actor_info").
func (v *actorInfoViewType) Name() string { return v.s.SQLName }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (v *pgStatDatabaseViewType) Name() string {\n\treturn v.s.SQLName\n}", "func (*View) Name() string { return \"view\" }", "func (v *pgUserViewType) Name() string {\n\treturn v.s.SQLName\n}", "func (v *View) ViewName() string { return v.viewName }", "func (v *nicerButSlowerFilmListViewType) Name() strin...
[ "0.70319706", "0.7025239", "0.6951003", "0.67236215", "0.6599698", "0.6525693", "0.64955735", "0.64427733", "0.64427733", "0.63724196", "0.61963934", "0.60590583", "0.6024301", "0.6006662", "0.5940104", "0.58838356", "0.58816934", "0.5837826", "0.58248645", "0.57685894", "0.5...
0.78057486
0
GetMarginRates gets margin rates
GetMarginRates получает ставки маржи
func (h *HUOBI) GetMarginRates(ctx context.Context, symbol currency.Pair) (MarginRatesData, error) { var resp MarginRatesData vals := url.Values{} if !symbol.IsEmpty() { symbolValue, err := h.FormatSymbol(symbol, asset.Spot) if err != nil { return resp, err } vals.Set("symbol", symbolValue) } return res...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (ci converterInfo) Rates() *map[string]map[string]float64 {\n\treturn ci.rates\n}", "func (p Provider) getRatesFromResponse(body []byte) (map[string]float64, map[string]float64, time.Time, error) {\n\tvar (\n\t\terr error\n\t\tapiJson model.SuccessApiResponse\n\t\tdirectRat...
[ "0.54712915", "0.52787596", "0.5275388", "0.52186406", "0.51040155", "0.5097", "0.5015672", "0.49543777", "0.4946414", "0.49171793", "0.49167514", "0.48848617", "0.48729435", "0.4844471", "0.48423526", "0.4831846", "0.48296964", "0.48107427", "0.47966403", "0.47797173", "0.47...
0.7426654
0
Get24HrMarketSummary returns 24hr market summary for a given market symbol
Get24HrMarketSummary возвращает 24-часовую сводку по рынку для заданного символа рынка
func (h *HUOBI) Get24HrMarketSummary(ctx context.Context, symbol currency.Pair) (MarketSummary24Hr, error) { var result MarketSummary24Hr params := url.Values{} symbolValue, err := h.FormatSymbol(symbol, asset.Spot) if err != nil { return result, err } params.Set("symbol", symbolValue) return result, h.SendHTT...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (h *HUOBI) GetMarketDetail(ctx context.Context, symbol currency.Pair) (Detail, error) {\n\tvals := url.Values{}\n\tsymbolValue, err := h.FormatSymbol(symbol, asset.Spot)\n\tif err != nil {\n\t\treturn Detail{}, err\n\t}\n\tvals.Set(\"symbol\", symbolValue)\n\n\ttype response struct {\n\t\tResponse\n\t\tTick D...
[ "0.55780244", "0.5537733", "0.5334831", "0.51851654", "0.51605296", "0.4856593", "0.4765028", "0.46983725", "0.46772322", "0.46315122", "0.45058358", "0.4498733", "0.4488088", "0.44808736", "0.4415156", "0.43936917", "0.4388997", "0.436385", "0.43553677", "0.43303472", "0.432...
0.8163198
0
GetMarketDetailMerged returns the ticker for the specified symbol
GetMarketDetailMerged возвращает тикер для указанного символа
func (h *HUOBI) GetMarketDetailMerged(ctx context.Context, symbol currency.Pair) (DetailMerged, error) { vals := url.Values{} symbolValue, err := h.FormatSymbol(symbol, asset.Spot) if err != nil { return DetailMerged{}, err } vals.Set("symbol", symbolValue) type response struct { Response Tick DetailMerged...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (h *HUOBIHADAX) GetMarketDetailMerged(symbol string) (DetailMerged, error) {\n\tvals := url.Values{}\n\tvals.Set(\"symbol\", symbol)\n\n\ttype response struct {\n\t\tResponse\n\t\tTick DetailMerged `json:\"tick\"`\n\t}\n\n\tvar result response\n\turlPath := fmt.Sprintf(\"%s/%s\", h.APIUrl, huobihadaxMarketDet...
[ "0.8255225", "0.65050185", "0.6322203", "0.56942534", "0.5553249", "0.5543869", "0.5449716", "0.54233116", "0.5400529", "0.5382314", "0.5321258", "0.5321083", "0.5201834", "0.51908404", "0.51829964", "0.51211035", "0.5110207", "0.50944126", "0.5091702", "0.5042947", "0.503989...
0.79985017
1
GetTrades returns the trades for the specified symbol
GetTrades возвращает сделки для указанного символа
func (h *HUOBI) GetTrades(ctx context.Context, symbol currency.Pair) ([]Trade, error) { vals := url.Values{} symbolValue, err := h.FormatSymbol(symbol, asset.Spot) if err != nil { return nil, err } vals.Set("symbol", symbolValue) type response struct { Response Tick struct { Data []Trade `json:"data"` ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (h *HUOBIHADAX) GetTrades(symbol string) ([]Trade, error) {\n\tvals := url.Values{}\n\tvals.Set(\"symbol\", symbol)\n\n\ttype response struct {\n\t\tResponse\n\t\tTick struct {\n\t\t\tData []Trade `json:\"data\"`\n\t\t} `json:\"tick\"`\n\t}\n\n\tvar result response\n\turlPath := fmt.Sprintf(\"%s/%s\", h.APIUr...
[ "0.77358645", "0.74462044", "0.72698647", "0.7161789", "0.7063039", "0.6877662", "0.68180925", "0.6814122", "0.66341156", "0.641439", "0.63792527", "0.631567", "0.62600946", "0.62124175", "0.6184803", "0.5992327", "0.59001803", "0.5839547", "0.5820225", "0.57762575", "0.57157...
0.7542442
1
GetLatestSpotPrice returns latest spot price of symbol symbol: string of currency pair
GetLatestSpotPrice возвращает последнюю спот-цену символа symbol: строка пары валют
func (h *HUOBI) GetLatestSpotPrice(ctx context.Context, symbol currency.Pair) (float64, error) { list, err := h.GetTradeHistory(ctx, symbol, 1) if err != nil { return 0, err } if len(list) == 0 { return 0, errors.New("the length of the list is 0") } return list[0].Trades[0].Price, nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (h *HUOBIHADAX) GetLatestSpotPrice(symbol string) (float64, error) {\n\tlist, err := h.GetTradeHistory(symbol, \"1\")\n\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\tif len(list) == 0 {\n\t\treturn 0, errors.New(\"the length of the list is 0\")\n\t}\n\n\treturn list[0].Trades[0].Price, nil\n}", "func getLat...
[ "0.77745754", "0.7193159", "0.666575", "0.6478049", "0.64037836", "0.63810873", "0.6332459", "0.61890215", "0.61658907", "0.615555", "0.6145192", "0.61415225", "0.6090254", "0.60899234", "0.6089614", "0.6075997", "0.6038538", "0.59489167", "0.5942223", "0.58824354", "0.587439...
0.770424
1
GetMarketDetail returns the ticker for the specified symbol
GetMarketDetail возвращает тикер для указанного символа
func (h *HUOBI) GetMarketDetail(ctx context.Context, symbol currency.Pair) (Detail, error) { vals := url.Values{} symbolValue, err := h.FormatSymbol(symbol, asset.Spot) if err != nil { return Detail{}, err } vals.Set("symbol", symbolValue) type response struct { Response Tick Detail `json:"tick"` } var ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (h *HUOBIHADAX) GetMarketDetail(symbol string) (Detail, error) {\n\tvals := url.Values{}\n\tvals.Set(\"symbol\", symbol)\n\n\ttype response struct {\n\t\tResponse\n\t\tTick Detail `json:\"tick\"`\n\t}\n\n\tvar result response\n\turlPath := fmt.Sprintf(\"%s/%s\", h.APIUrl, huobihadaxMarketDetail)\n\n\terr := h...
[ "0.8112884", "0.70698243", "0.66401184", "0.6608597", "0.65049994", "0.63923836", "0.63712066", "0.63195145", "0.6317771", "0.6250894", "0.6222333", "0.6180861", "0.61649966", "0.6137566", "0.61068106", "0.6099787", "0.60953355", "0.60864127", "0.5972353", "0.5950708", "0.590...
0.7900944
1
GetSymbols returns an array of symbols supported by Huobi
GetSymbols возвращает массив символов, поддерживаемых Huobi
func (h *HUOBI) GetSymbols(ctx context.Context) ([]Symbol, error) { type response struct { Response Symbols []Symbol `json:"data"` } var result response err := h.SendHTTPRequest(ctx, exchange.RestSpot, huobiSymbols, &result) if result.ErrorMessage != "" { return nil, errors.New(result.ErrorMessage) } ret...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (h *HUOBIHADAX) GetSymbols() ([]Symbol, error) {\n\ttype response struct {\n\t\tResponse\n\t\tSymbols []Symbol `json:\"data\"`\n\t}\n\n\tvar result response\n\turlPath := fmt.Sprintf(\"%s/v%s/%s/%s\", h.APIUrl, huobihadaxAPIVersion, huobihadaxAPIName, huobihadaxSymbols)\n\n\terr := h.SendHTTPRequest(urlPath, ...
[ "0.75294846", "0.7160797", "0.6886707", "0.68014264", "0.67673326", "0.673544", "0.6693559", "0.64586174", "0.63749856", "0.6354442", "0.6348164", "0.6332441", "0.62591314", "0.6209346", "0.60926986", "0.6064489", "0.60520715", "0.6035134", "0.59386194", "0.5895679", "0.58121...
0.74265635
1
GetCurrencies returns a list of currencies supported by Huobi
GetCurrencies возвращает список валют, поддерживаемых Huobi
func (h *HUOBI) GetCurrencies(ctx context.Context) ([]string, error) { type response struct { Response Currencies []string `json:"data"` } var result response err := h.SendHTTPRequest(ctx, exchange.RestSpot, huobiCurrencies, &result) if result.ErrorMessage != "" { return nil, errors.New(result.ErrorMessage...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (h *HUOBIHADAX) GetCurrencies() ([]string, error) {\n\ttype response struct {\n\t\tResponse\n\t\tCurrencies []string `json:\"data\"`\n\t}\n\n\tvar result response\n\turlPath := fmt.Sprintf(\"%s/v%s/%s/%s\", h.APIUrl, huobihadaxAPIVersion, huobihadaxAPIName, huobihadaxCurrencies)\n\n\terr := h.SendHTTPRequest(...
[ "0.7940655", "0.7914041", "0.7359975", "0.7289902", "0.72533494", "0.72454774", "0.709783", "0.6853516", "0.680497", "0.6703024", "0.66982454", "0.66967124", "0.66059655", "0.64261043", "0.6403865", "0.6106475", "0.6078244", "0.60724616", "0.59978205", "0.59853965", "0.597373...
0.8249069
0
GetCurrenciesIncludingChains returns currency and chain data
GetCurrenciesIncludingChains возвращает данные о валюте и цепях
func (h *HUOBI) GetCurrenciesIncludingChains(ctx context.Context, curr currency.Code) ([]CurrenciesChainData, error) { resp := struct { Data []CurrenciesChainData `json:"data"` }{} vals := url.Values{} if !curr.IsEmpty() { vals.Set("currency", curr.Lower().String()) } path := common.EncodeURLValues(huobiCurr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (p *Poloniex) GetCurrencies(ctx context.Context) (map[string]*Currencies, error) {\n\ttype Response struct {\n\t\tData map[string]*Currencies\n\t}\n\tresp := Response{}\n\treturn resp.Data, p.SendHTTPRequest(ctx,\n\t\texchange.RestSpot,\n\t\t\"/public?command=returnCurrencies&includeMultiChainCurrencies=true\...
[ "0.6466333", "0.6206367", "0.60474086", "0.60303265", "0.60085416", "0.58764243", "0.58675426", "0.57580274", "0.5713741", "0.5682365", "0.5654221", "0.564269", "0.5568197", "0.5563465", "0.5478817", "0.54718465", "0.5429817", "0.53818154", "0.53504306", "0.53450036", "0.5321...
0.79641265
0
GetCurrentServerTime returns the Huobi server time
GetCurrentServerTime возвращает время сервера Huobi
func (h *HUOBI) GetCurrentServerTime(ctx context.Context) (time.Time, error) { var result struct { Response Timestamp int64 `json:"data"` } err := h.SendHTTPRequest(ctx, exchange.RestSpot, "/v"+huobiAPIVersion+"/"+huobiTimestamp, &result) if result.ErrorMessage != "" { return time.Time{}, errors.New(result.Er...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (b *ByBit) GetServerTime() (timeNow int64, err error) {\n\tparams := map[string]interface{}{}\n\tvar ret BaseResult\n\t_, err = b.PublicRequest(http.MethodGet, \"v2/public/time\", params, &ret)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar t float64\n\tt, err = strconv.ParseFloat(ret.TimeNow, 64)\n\tif err != ni...
[ "0.74922496", "0.7441755", "0.73424494", "0.7115304", "0.70538753", "0.6963024", "0.6384371", "0.6375798", "0.628768", "0.626892", "0.6084976", "0.6065404", "0.59435916", "0.5934524", "0.5934524", "0.59177524", "0.5914358", "0.5840831", "0.5821712", "0.5816911", "0.5772398", ...
0.82223976
0
GetAccounts returns the Huobi user accounts
GetAccounts возвращает пользовательские аккаунты Huobi
func (h *HUOBI) GetAccounts(ctx context.Context) ([]Account, error) { result := struct { Accounts []Account `json:"data"` }{} err := h.SendAuthenticatedHTTPRequest(ctx, exchange.RestSpot, http.MethodGet, huobiAccounts, url.Values{}, nil, &result, false) return result.Accounts, err }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (h *HUOBIHADAX) GetAccounts() ([]Account, error) {\n\ttype response struct {\n\t\tResponse\n\t\tAccountData []Account `json:\"data\"`\n\t}\n\n\tvar result response\n\terr := h.SendAuthenticatedHTTPRequest(http.MethodGet, huobihadaxAccounts, url.Values{}, &result)\n\n\tif result.ErrorMessage != \"\" {\n\t\tret...
[ "0.74113905", "0.7391975", "0.7164754", "0.7095255", "0.70190525", "0.6981187", "0.6962625", "0.6887199", "0.67971075", "0.67842317", "0.67434764", "0.66493773", "0.6630689", "0.6626408", "0.6601694", "0.6565802", "0.65299225", "0.6493446", "0.6492428", "0.6472309", "0.644711...
0.7695345
0
GetAggregatedBalance returns the balances of all the subaccount aggregated.
GetAggregatedBalance возвращает балансы всех подсчетов.
func (h *HUOBI) GetAggregatedBalance(ctx context.Context) ([]AggregatedBalance, error) { result := struct { AggregatedBalances []AggregatedBalance `json:"data"` }{} err := h.SendAuthenticatedHTTPRequest(ctx, exchange.RestSpot, http.MethodGet, huobiAggregatedBalance, nil, nil, &result, false, ) return...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (h *HUOBIHADAX) GetAggregatedBalance() ([]AggregatedBalance, error) {\n\ttype response struct {\n\t\tResponse\n\t\tAggregatedBalances []AggregatedBalance `json:\"data\"`\n\t}\n\n\tvar result response\n\n\terr := h.SendAuthenticatedHTTPRequest(\n\t\thttp.MethodGet,\n\t\thuobihadaxAggregatedBalance,\n\t\turl.Va...
[ "0.7904757", "0.6482815", "0.5996011", "0.59091663", "0.590624", "0.5835807", "0.58216393", "0.58101076", "0.5806454", "0.5773293", "0.5766585", "0.5745049", "0.5733462", "0.5720619", "0.5719984", "0.5704534", "0.56838685", "0.5669005", "0.5656682", "0.5616598", "0.5590198", ...
0.78960353
1
CancelExistingOrder cancels an order on Huobi
CancelExistingOrder отменяет заказ на Huobi
func (h *HUOBI) CancelExistingOrder(ctx context.Context, orderID int64) (int64, error) { resp := struct { OrderID int64 `json:"data,string"` }{} endpoint := fmt.Sprintf(huobiOrderCancel, strconv.FormatInt(orderID, 10)) err := h.SendAuthenticatedHTTPRequest(ctx, exchange.RestSpot, http.MethodPost, endpoint, url.Va...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (h *HUOBIHADAX) CancelExistingOrder(orderID int64) (int64, error) {\n\ttype response struct {\n\t\tResponse\n\t\tOrderID int64 `json:\"data,string\"`\n\t}\n\n\tvar result response\n\tendpoint := fmt.Sprintf(huobihadaxOrderCancel, strconv.FormatInt(orderID, 10))\n\terr := h.SendAuthenticatedHTTPRequest(http.Me...
[ "0.7982873", "0.7509303", "0.7477572", "0.74205244", "0.7381548", "0.7376845", "0.73706186", "0.7329423", "0.73204273", "0.7311485", "0.7295048", "0.7218077", "0.72067356", "0.7199981", "0.7152807", "0.712268", "0.7113329", "0.71112394", "0.7083864", "0.7072437", "0.7053852",...
0.80147773
0
CancelOrderBatch cancels a batch of orders
CancelOrderBatch отменяет партию заказов
func (h *HUOBI) CancelOrderBatch(ctx context.Context, orderIDs, clientOrderIDs []string) (*CancelOrderBatch, error) { resp := struct { Response Data *CancelOrderBatch `json:"data"` }{} data := struct { ClientOrderIDs []string `json:"client-order-ids"` OrderIDs []string `json:"order-ids"` }{ ClientOr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (h *HUOBIHADAX) CancelOrderBatch(orderIDs []int64) (CancelOrderBatch, error) {\n\ttype response struct {\n\t\tStatus string `json:\"status\"`\n\t\tData CancelOrderBatch `json:\"data\"`\n\t}\n\n\t// Used to send param formatting\n\ttype postBody struct {\n\t\tList []int64 `json:\"order-ids\"`\n\t}\...
[ "0.822437", "0.8103009", "0.79727215", "0.795652", "0.7638825", "0.7576727", "0.69496006", "0.68547153", "0.6806051", "0.67155564", "0.66445506", "0.65916646", "0.64911425", "0.64472646", "0.6443092", "0.6423299", "0.64134276", "0.6400897", "0.63996583", "0.6347828", "0.63314...
0.83265907
0
CancelOpenOrdersBatch cancels a batch of orders todo
CancelOpenOrdersBatch отменяет пакет заявок todo
func (h *HUOBI) CancelOpenOrdersBatch(ctx context.Context, accountID string, symbol currency.Pair) (CancelOpenOrdersBatch, error) { params := url.Values{} symbolValue, err := h.FormatSymbol(symbol, asset.Spot) if err != nil { return CancelOpenOrdersBatch{}, err } params.Set("account-id", accountID) var result C...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (h *HUOBIHADAX) CancelOpenOrdersBatch(accountID, symbol string) (CancelOpenOrdersBatch, error) {\n\tparams := url.Values{}\n\n\tparams.Set(\"account-id\", accountID)\n\tvar result CancelOpenOrdersBatch\n\n\tdata := struct {\n\t\tAccountID string `json:\"account-id\"`\n\t\tSymbol string `json:\"symbol\"`\n\...
[ "0.7923264", "0.77472794", "0.76979214", "0.75543076", "0.75353384", "0.75210243", "0.6732386", "0.65819687", "0.6324351", "0.614448", "0.6141224", "0.6105609", "0.61001647", "0.60601443", "0.6042365", "0.6029124", "0.6017087", "0.60033786", "0.59321886", "0.5918302", "0.5905...
0.8021356
0
GetOrderMatchResults returns matched order info for the specified order
GetOrderMatchResults возвращает информацию о совпадающем заказе для указанного заказа
func (h *HUOBI) GetOrderMatchResults(ctx context.Context, orderID int64) ([]OrderMatchInfo, error) { resp := struct { Orders []OrderMatchInfo `json:"data"` }{} endpoint := fmt.Sprintf(huobiGetOrderMatch, strconv.FormatInt(orderID, 10)) err := h.SendAuthenticatedHTTPRequest(ctx, exchange.RestSpot, http.MethodGet, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (h *HUOBIHADAX) GetOrderMatchResults(orderID int64) ([]OrderMatchInfo, error) {\n\ttype response struct {\n\t\tResponse\n\t\tOrders []OrderMatchInfo `json:\"data\"`\n\t}\n\n\tvar result response\n\tendpoint := fmt.Sprintf(huobihadaxGetOrderMatch, strconv.FormatInt(orderID, 10))\n\terr := h.SendAuthenticatedHT...
[ "0.7709318", "0.7545658", "0.7274498", "0.58032656", "0.5693317", "0.5657902", "0.5292344", "0.52673906", "0.5212277", "0.5204469", "0.5193957", "0.5185805", "0.5178536", "0.51722807", "0.5125284", "0.51143175", "0.5058944", "0.5037071", "0.50324965", "0.50301117", "0.499497"...
0.8005124
0
GetOrdersMatch returns a list of matched orders
GetOrdersMatch возвращает список совпадающих заказов
func (h *HUOBI) GetOrdersMatch(ctx context.Context, symbol currency.Pair, types, start, end, from, direct, size string) ([]OrderMatchInfo, error) { resp := struct { Orders []OrderMatchInfo `json:"data"` }{} vals := url.Values{} symbolValue, err := h.FormatSymbol(symbol, asset.Spot) if err != nil { return nil,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (h *HUOBIHADAX) GetOrdersMatch(symbol, types, start, end, from, direct, size string) ([]OrderMatchInfo, error) {\n\ttype response struct {\n\t\tResponse\n\t\tOrders []OrderMatchInfo `json:\"data\"`\n\t}\n\n\tvals := url.Values{}\n\tvals.Set(\"symbol\", symbol)\n\n\tif types != \"\" {\n\t\tvals.Set(\"types\", ...
[ "0.7789129", "0.75529885", "0.7296313", "0.63969296", "0.5923573", "0.5799041", "0.5767649", "0.5706189", "0.56900114", "0.5662897", "0.56520593", "0.56440866", "0.56375915", "0.5621133", "0.5600105", "0.55478734", "0.54957914", "0.54358935", "0.54228586", "0.5418654", "0.537...
0.8078988
0
MarginTransfer transfers assets into or out of the margin account
MarginTransfer переводит активы в или из счета с маржой
func (h *HUOBI) MarginTransfer(ctx context.Context, symbol currency.Pair, currency string, amount float64, in bool) (int64, error) { symbolValue, err := h.FormatSymbol(symbol, asset.Spot) if err != nil { return 0, err } data := struct { Symbol string `json:"symbol"` Currency string `json:"currency"` Amoun...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (h *HUOBIHADAX) MarginTransfer(symbol, currency string, amount float64, in bool) (int64, error) {\n\tvals := url.Values{}\n\tvals.Set(\"symbol\", symbol)\n\tvals.Set(\"currency\", currency)\n\tvals.Set(\"amount\", strconv.FormatFloat(amount, 'f', -1, 64))\n\n\tpath := huobihadaxMarginTransferIn\n\tif !in {\n\...
[ "0.6801492", "0.54919773", "0.5167506", "0.5142463", "0.5141134", "0.51354355", "0.51304615", "0.50694734", "0.50644636", "0.50561655", "0.5050912", "0.50429857", "0.5037492", "0.5036882", "0.5034344", "0.50095516", "0.49908176", "0.49833798", "0.49598277", "0.49555779", "0.4...
0.7141913
0
MarginRepayment repays a margin amount for a margin ID
MarginRepayment погашает сумму маржи для идентификатора маржи
func (h *HUOBI) MarginRepayment(ctx context.Context, orderID int64, amount float64) (int64, error) { data := struct { Amount string `json:"amount"` }{ Amount: strconv.FormatFloat(amount, 'f', -1, 64), } resp := struct { MarginOrderID int64 `json:"data"` }{} endpoint := fmt.Sprintf(huobiMarginRepay, strcon...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (h *HUOBIHADAX) MarginRepayment(orderID int64, amount float64) (int64, error) {\n\tvals := url.Values{}\n\tvals.Set(\"order-id\", strconv.FormatInt(orderID, 10))\n\tvals.Set(\"amount\", strconv.FormatFloat(amount, 'f', -1, 64))\n\n\ttype response struct {\n\t\tResponse\n\t\tMarginOrderID int64 `json:\"data\"`...
[ "0.7938476", "0.5493116", "0.5417867", "0.5322645", "0.5245273", "0.5238542", "0.5231548", "0.52093804", "0.5093545", "0.49932605", "0.4940364", "0.49142474", "0.48920882", "0.478867", "0.47885302", "0.47826168", "0.47281605", "0.46928594", "0.46615312", "0.46386105", "0.4626...
0.7981299
0
GetMarginLoanOrders returns the margin loan orders
GetMarginLoanOrders возвращает займы на маржинальный кредит
func (h *HUOBI) GetMarginLoanOrders(ctx context.Context, symbol currency.Pair, currency, start, end, states, from, direct, size string) ([]MarginOrder, error) { vals := url.Values{} symbolValue, err := h.FormatSymbol(symbol, asset.Spot) if err != nil { return nil, err } vals.Set("symbol", symbolValue) vals.Set(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (h *HUOBIHADAX) GetMarginLoanOrders(symbol, currency, start, end, states, from, direct, size string) ([]MarginOrder, error) {\n\tvals := url.Values{}\n\tvals.Set(\"symbol\", symbol)\n\tvals.Set(\"currency\", currency)\n\n\tif start != \"\" {\n\t\tvals.Set(\"start-date\", start)\n\t}\n\n\tif end != \"\" {\n\t\...
[ "0.8213857", "0.66564023", "0.504801", "0.49783853", "0.49183816", "0.48903054", "0.48602033", "0.47295225", "0.46930307", "0.46446615", "0.46144164", "0.46108356", "0.45685264", "0.45621142", "0.4506872", "0.44697723", "0.4463625", "0.4440926", "0.438206", "0.43632683", "0.4...
0.8328072
0
GetMarginAccountBalance returns the margin account balances
GetMarginAccountBalance возвращает балансы счетов с маржой
func (h *HUOBI) GetMarginAccountBalance(ctx context.Context, symbol currency.Pair) ([]MarginAccountBalance, error) { resp := struct { Balances []MarginAccountBalance `json:"data"` }{} vals := url.Values{} if !symbol.IsEmpty() { symbolValue, err := h.FormatSymbol(symbol, asset.Spot) if err != nil { return r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (h *HUOBIHADAX) GetMarginAccountBalance(symbol string) ([]MarginAccountBalance, error) {\n\ttype response struct {\n\t\tResponse\n\t\tBalances []MarginAccountBalance `json:\"data\"`\n\t}\n\n\tvals := url.Values{}\n\tif symbol != \"\" {\n\t\tvals.Set(\"symbol\", symbol)\n\t}\n\n\tvar result response\n\terr := ...
[ "0.80503064", "0.6669102", "0.65312743", "0.6513888", "0.63166493", "0.6298557", "0.6274418", "0.6232896", "0.6197671", "0.615502", "0.6134208", "0.60987025", "0.6091355", "0.607732", "0.6075519", "0.60680085", "0.60352254", "0.6031761", "0.60201985", "0.60090667", "0.6003995...
0.7991697
1
CancelWithdraw cancels a withdraw request
CancelWithdraw отменяет запрос на снятие средств
func (h *HUOBI) CancelWithdraw(ctx context.Context, withdrawID int64) (int64, error) { resp := struct { WithdrawID int64 `json:"data"` }{} vals := url.Values{} vals.Set("withdraw-id", strconv.FormatInt(withdrawID, 10)) endpoint := fmt.Sprintf(huobiWithdrawCancel, strconv.FormatInt(withdrawID, 10)) err := h.Sen...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (h *HUOBIHADAX) CancelWithdraw(withdrawID int64) (int64, error) {\n\ttype response struct {\n\t\tResponse\n\t\tWithdrawID int64 `json:\"data\"`\n\t}\n\n\tvals := url.Values{}\n\tvals.Set(\"withdraw-id\", strconv.FormatInt(withdrawID, 10))\n\n\tvar result response\n\tendpoint := fmt.Sprintf(huobihadaxWithdrawC...
[ "0.8209363", "0.69613934", "0.6717407", "0.6661929", "0.66083544", "0.64474326", "0.64346635", "0.6207621", "0.62070704", "0.6199843", "0.6197736", "0.6195833", "0.6160289", "0.6144072", "0.61151004", "0.6094923", "0.6090664", "0.607637", "0.6073357", "0.60618705", "0.6055893...
0.8331418
0
QueryDepositAddress returns the deposit address for a specified currency
QueryDepositAddress возвращает адрес для депозита указанной валюты
func (h *HUOBI) QueryDepositAddress(ctx context.Context, cryptocurrency currency.Code) ([]DepositAddress, error) { resp := struct { DepositAddress []DepositAddress `json:"data"` }{} vals := url.Values{} vals.Set("currency", cryptocurrency.Lower().String()) err := h.SendAuthenticatedHTTPRequest(ctx, exchange.Re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (e Exchange) DepositAddress(exch string, currencyCode currency.Code) (out string, err error) {\n\tif currencyCode.IsEmpty() {\n\t\terr = errors.New(\"currency code is empty\")\n\t\treturn\n\t}\n\treturn engine.Bot.DepositAddressManager.GetDepositAddressByExchange(exch, currencyCode)\n}", "func (k *Kraken) G...
[ "0.7201584", "0.7159637", "0.7113259", "0.70785964", "0.6856927", "0.6840263", "0.67491704", "0.65610737", "0.655659", "0.64991057", "0.6119848", "0.6076726", "0.60266584", "0.6012706", "0.59784126", "0.5939621", "0.58625615", "0.5805118", "0.5754761", "0.5750813", "0.5715253...
0.8221875
0
QueryWithdrawQuotas returns the users cryptocurrency withdraw quotas
QueryWithdrawQuotas возвращает криптовалютные квоты вывода пользователей
func (h *HUOBI) QueryWithdrawQuotas(ctx context.Context, cryptocurrency string) (WithdrawQuota, error) { resp := struct { WithdrawQuota WithdrawQuota `json:"data"` }{} vals := url.Values{} vals.Set("currency", cryptocurrency) err := h.SendAuthenticatedHTTPRequest(ctx, exchange.RestSpot, http.MethodGet, huobiAc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func QueryWithdraws(rpcAddr string) http.HandlerFunc {\n\treturn func(w http.ResponseWriter, r *http.Request) {\n\t\trequest := common.GetInterxRequest(r)\n\t\tresponse := common.GetResponseFormat(request, rpcAddr)\n\t\tstatusCode := http.StatusOK\n\n\t\tcommon.GetLogger().Info(\"[query-withdraws] Entering withdra...
[ "0.6501903", "0.62330467", "0.5987337", "0.5910363", "0.5897883", "0.5802158", "0.5735387", "0.5701625", "0.56914574", "0.56089395", "0.5605273", "0.559851", "0.5584993", "0.55758", "0.5575501", "0.55489874", "0.5545602", "0.5539576", "0.55338687", "0.5519495", "0.5516642", ...
0.8049243
0
SearchForExistedWithdrawsAndDeposits returns withdrawal and deposit data
SearchForExistedWithdrawsAndDeposits возвращает данные о выводе и депозите
func (h *HUOBI) SearchForExistedWithdrawsAndDeposits(ctx context.Context, c currency.Code, transferType, direction string, fromID, limit int64) (WithdrawalHistory, error) { var resp WithdrawalHistory vals := url.Values{} vals.Set("type", transferType) if !c.IsEmpty() { vals.Set("currency", c.Lower().String()) } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (s *Service) GetWithdraw(c context.Context, dateVersion string, from, limit int) (count int, withdrawVos []*model.WithdrawVo, err error) {\n\tcount, upAccounts, err := s.UpWithdraw(c, dateVersion, from, limit)\n\tif err != nil {\n\t\tlog.Error(\"s.UpWithdraw error(%v)\", err)\n\t\treturn\n\t}\n\n\tmids := mak...
[ "0.63003683", "0.62463695", "0.58435166", "0.5834678", "0.5790308", "0.57658595", "0.5760613", "0.5757181", "0.5652355", "0.56248325", "0.5602636", "0.5565634", "0.5551058", "0.5546448", "0.5528693", "0.55241525", "0.55012304", "0.54893017", "0.5451733", "0.5433997", "0.54177...
0.7214689
0
SendAuthenticatedHTTPRequest sends authenticated requests to the HUOBI API
SendAuthenticatedHTTPRequest отправляет аутентифицированные запросы на API HUOBI
func (h *HUOBI) SendAuthenticatedHTTPRequest(ctx context.Context, ep exchange.URL, method, endpoint string, values url.Values, data, result interface{}, isVersion2API bool) error { var err error creds, err := h.GetCredentials(ctx) if err != nil { return err } ePoint, err := h.API.Endpoints.GetURL(ep) if err != ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (h *HUOBIHADAX) SendAuthenticatedHTTPRequest(method, endpoint string, values url.Values, result interface{}) error {\n\tif !h.AuthenticatedAPISupport {\n\t\treturn fmt.Errorf(exchange.WarningAuthenticatedRequestWithoutCredentialsSet, h.Name)\n\t}\n\n\tvalues.Set(\"AccessKeyId\", h.APIKey)\n\tvalues.Set(\"Sign...
[ "0.7415173", "0.7090839", "0.68118095", "0.67946285", "0.64851695", "0.6237729", "0.6094957", "0.60039806", "0.5994013", "0.5942896", "0.56280935", "0.55854416", "0.556091", "0.5519506", "0.5493864", "0.5493858", "0.546087", "0.54589224", "0.54501", "0.5440818", "0.5440324", ...
0.76494217
0
SetGaugeMetric func(name string, help string, env string, envValue string, version string, versionValue string) (prometheusGauge Gauge)
Функция SetGaugeMetric(name string, help string, env string, envValue string, version string, versionValue string) (prometheusGauge Gauge)
func SetGaugeMetric(name string, help string, env string, envValue string, version string, versionValue string) (prometheusGauge prometheus.Gauge) { var ( gaugeMetric = prometheus.NewGauge(prometheus.GaugeOpts{ Name: name, Help: help, ConstLabels: prometheus.Labels{env: envValue, version: vers...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (cm *customMetrics) SetGauge(gauge string, value float64) {\n\n\tcm.gauges[gauge].Set(value)\n}", "func (r *Reporter) Gauge(name string, value float64, tags metrics.Tags) (err error) {\n\tdefer func() {\n\t\tif r := recover(); r != nil {\n\t\t\terr = ErrPrometheusPanic\n\t\t}\n\t}()\n\n\tgauge := r.metrics....
[ "0.6838521", "0.6675083", "0.66375196", "0.6615935", "0.65820676", "0.6513595", "0.65016466", "0.64129496", "0.63703287", "0.63678575", "0.6307274", "0.62895155", "0.6248275", "0.6245103", "0.623869", "0.6179788", "0.61300707", "0.6121112", "0.61141324", "0.60184526", "0.5996...
0.8258457
0
Resume rehydrates a AdaptiveNetworkHardeningsEnforcePollerResponse from the provided client and resume token.
Resume восстанавливает AdaptiveNetworkHardeningsEnforcePollerResponse из предоставленного клиента и токена возобновления.
func (l *AdaptiveNetworkHardeningsEnforcePollerResponse) Resume(ctx context.Context, client *AdaptiveNetworkHardeningsClient, token string) error { pt, err := armruntime.NewPollerFromResumeToken("AdaptiveNetworkHardeningsClient.Enforce", token, client.pl, client.enforceHandleError) if err != nil { return err } po...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (l *WorkspaceManagedSQLServerEncryptionProtectorClientRevalidatePollerResponse) Resume(ctx context.Context, client *WorkspaceManagedSQLServerEncryptionProtectorClient, token string) error {\n\tpt, err := armruntime.NewPollerFromResumeToken(\"WorkspaceManagedSQLServerEncryptionProtectorClient.Revalidate\", tok...
[ "0.7977291", "0.78237575", "0.772744", "0.7726858", "0.7710988", "0.7694588", "0.7675609", "0.75921535", "0.7566447", "0.75447327", "0.75436836", "0.75272745", "0.7527257", "0.75233424", "0.75203735", "0.7513311", "0.7507816", "0.75030106", "0.74958706", "0.749215", "0.747994...
0.8376427
0
Resume rehydrates a AlertsSimulatePollerResponse from the provided client and resume token.
Resume восстанавливает AlertsSimulatePollerResponse из предоставленного клиента и токена возобновления.
func (l *AlertsSimulatePollerResponse) Resume(ctx context.Context, client *AlertsClient, token string) error { pt, err := armruntime.NewPollerFromResumeToken("AlertsClient.Simulate", token, client.pl, client.simulateHandleError) if err != nil { return err } poller := &AlertsSimulatePoller{ pt: pt, } resp, err...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (l *ApplicationGatewaysClientStartPollerResponse) Resume(ctx context.Context, client *ApplicationGatewaysClient, token string) error {\n\tpt, err := armruntime.NewPollerFromResumeToken(\"ApplicationGatewaysClient.Start\", token, client.pl)\n\tif err != nil {\n\t\treturn err\n\t}\n\tpoller := &ApplicationGatew...
[ "0.7727089", "0.7702642", "0.7667797", "0.76061624", "0.7586481", "0.7535351", "0.75290906", "0.750984", "0.74973065", "0.7481278", "0.74666893", "0.7465214", "0.7454607", "0.74507034", "0.74507034", "0.7420852", "0.7406041", "0.7398732", "0.7377792", "0.73760927", "0.7366950...
0.7973928
0
Resume rehydrates a ServerVulnerabilityAssessmentDeletePollerResponse from the provided client and resume token.
Resume восстанавливает ServerVulnerabilityAssessmentDeletePollerResponse из предоставленного клиента и токена возобновления.
func (l *ServerVulnerabilityAssessmentDeletePollerResponse) Resume(ctx context.Context, client *ServerVulnerabilityAssessmentClient, token string) error { pt, err := armruntime.NewPollerFromResumeToken("ServerVulnerabilityAssessmentClient.Delete", token, client.pl, client.deleteHandleError) if err != nil { return e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (l *VPNGatewaysClientDeletePollerResponse) Resume(ctx context.Context, client *VPNGatewaysClient, token string) error {\n\tpt, err := armruntime.NewPollerFromResumeToken(\"VPNGatewaysClient.Delete\", token, client.pl)\n\tif err != nil {\n\t\treturn err\n\t}\n\tpoller := &VPNGatewaysClientDeletePoller{\n\t\tpt...
[ "0.81951827", "0.81379056", "0.80936027", "0.8085295", "0.8065316", "0.8061482", "0.8058655", "0.8053732", "0.8043651", "0.8019985", "0.8019461", "0.8018657", "0.8012718", "0.8009122", "0.80089366", "0.80024755", "0.7994542", "0.7992985", "0.7992747", "0.79916984", "0.7982053...
0.8414383
0
UnmarshalJSON implements the json.Unmarshaller interface for type SettingsGetResult.
UnmarshalJSON реализует интерфейс json.Unmarshaller для типа SettingsGetResult.
func (s *SettingsGetResult) UnmarshalJSON(data []byte) error { res, err := unmarshalSettingClassification(data) if err != nil { return err } s.SettingClassification = res return nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (p *ProductSettingsClientGetResult) UnmarshalJSON(data []byte) error {\n\tres, err := unmarshalSettingsClassification(data)\n\tif err != nil {\n\t\treturn err\n\t}\n\tp.SettingsClassification = res\n\treturn nil\n}", "func (s *SettingsUpdateResult) UnmarshalJSON(data []byte) error {\n\tres, err := unmarshal...
[ "0.6875413", "0.6686578", "0.62999934", "0.5880715", "0.58680254", "0.5806092", "0.57214934", "0.5703393", "0.5693801", "0.5664528", "0.5656249", "0.5615088", "0.5578815", "0.5578258", "0.55728483", "0.55662054", "0.55587554", "0.55584365", "0.55446297", "0.554454", "0.552927...
0.7434199
0
UnmarshalJSON implements the json.Unmarshaller interface for type SettingsUpdateResult.
UnmarshalJSON реализует интерфейс json.Unmarshaller для типа SettingsUpdateResult.
func (s *SettingsUpdateResult) UnmarshalJSON(data []byte) error { res, err := unmarshalSettingClassification(data) if err != nil { return err } s.SettingClassification = res return nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (p *ProductSettingsClientUpdateResult) UnmarshalJSON(data []byte) error {\n\tres, err := unmarshalSettingsClassification(data)\n\tif err != nil {\n\t\treturn err\n\t}\n\tp.SettingsClassification = res\n\treturn nil\n}", "func (s *SettingsGetResult) UnmarshalJSON(data []byte) error {\n\tres, err := unmarshal...
[ "0.7052551", "0.66646963", "0.6281283", "0.627407", "0.61887354", "0.61412156", "0.6101325", "0.6062967", "0.60167694", "0.60028285", "0.59863514", "0.5935965", "0.58691716", "0.58244735", "0.58145964", "0.5798269", "0.579495", "0.5794271", "0.57862407", "0.578138", "0.576284...
0.74987465
0
Test that an initially expired promo may not be displayed
Тестирование того, что промокод, изначально истекший, не может быть отображен
func TestPreExpired(t *testing.T) { var tm time.Time // initial value is in the past reset() p, _ := New("Promo1", tm, tm) if res := p.AllowDisplay(ip); res != false { t.Errorf("Bad Promo status, got: %v want %v", res, false) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func TestExpiration(t *testing.T) {\n\tmockclock := clock.NewMock()\n\tsetClock(mockclock) // replace clock with mock for speedy testing\n\n\tnow := mockclock.Now()\n\treset()\n\tp, _ := New(\"Promo1\", now, now.Add(1*time.Hour))\n\n\truntime.Gosched()\n\n\tif res := p.AllowDisplay(ip); res != true {\n\t\tt.Errorf...
[ "0.7152463", "0.61216784", "0.5975197", "0.59364676", "0.59358203", "0.59336835", "0.5894708", "0.58882517", "0.57942945", "0.57901603", "0.57711214", "0.57444674", "0.5736263", "0.5717031", "0.5687377", "0.5684727", "0.56167704", "0.5595198", "0.55641276", "0.55085486", "0.5...
0.7433115
0
Add indexes into MongoDB
Добавить индексы в MongoDB
func addIndexes() { var err error ufIndex1 := mgo.Index{ Key: []string{"codigo"}, Unique: true, Background: true, Sparse: true, } municipioIndex1 := mgo.Index{ Key: []string{"codigo"}, Unique: true, Background: true, Sparse: true, } // Add indexes into MongoDB sessi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func addIndexes() {\n\tvar err error\n\tuserIndex := mgo.Index{\n\t\tKey: []string{\"email\"},\n\t\tUnique: true,\n\t\tBackground: true,\n\t\tSparse: true,\n\t}\n\n\tauthIndex := mgo.Index{\n\t\tKey: []string{\"sender_id\"},\n\t\tUnique: true,\n\t\tBackground: true,\n\t\tSparse: true,...
[ "0.804923", "0.78490174", "0.7118752", "0.70991796", "0.7068827", "0.69319904", "0.6840407", "0.6802941", "0.6791201", "0.6669298", "0.66180503", "0.6590874", "0.6555461", "0.6504994", "0.6485711", "0.64855134", "0.6479472", "0.63830847", "0.63748515", "0.63636535", "0.632665...
0.7907395
1
NewAccessTokenHandlerFactory return new fake access token handler factory
NewAccessTokenHandlerFactory возвращает новый фейковый access token handler factory
func NewAccessTokenHandlerFactory(userIDFactory UserIDFactory) middleware.AccessTokenHandlerFactory { return &accessTokenHandlerFactory{ userIDFactory: userIDFactory, } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewHandler(service services.Service) AccessTokenHandler {\n\treturn &accessTokenhandler{\n\t\tservice: service,\n\t}\n\n}", "func accessTokenHandlerConfig(oasvr *osin.Server) func(w http.ResponseWriter, r *http.Request) {\n\treturn func(w http.ResponseWriter, r *http.Request) {\n\t\tdbg.Println(\"Token star...
[ "0.6828804", "0.6349177", "0.63403344", "0.60474855", "0.6034249", "0.5923264", "0.59155315", "0.5915281", "0.58693445", "0.5771537", "0.5720014", "0.570903", "0.56361717", "0.5632971", "0.5632587", "0.5615423", "0.56022596", "0.55027896", "0.54784465", "0.54771185", "0.54516...
0.7244731
0
GitCommonDir returns commondir where contains "config" file
GitCommonDir возвращает commondir, в котором находится файл "config"
func (v Repository) GitCommonDir() string { return v.gitCommonDir }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (v Repository) CommonDir() string {\n\tdir := v.RepoDir()\n\tcommonDir := dir\n\tif path.IsFile(filepath.Join(dir, \"commondir\")) {\n\t\tf, err := os.Open(filepath.Join(dir, \"commondir\"))\n\t\tif err == nil {\n\t\t\ts := bufio.NewScanner(f)\n\t\t\tif s.Scan() {\n\t\t\t\tcommonDir = s.Text()\n\t\t\t\tif !fi...
[ "0.7268661", "0.698559", "0.67048705", "0.6670058", "0.64420474", "0.6358523", "0.6318514", "0.6305134", "0.629191", "0.6254382", "0.6215227", "0.6206227", "0.6198722", "0.6184039", "0.6167576", "0.61568576", "0.61452913", "0.6124343", "0.6116592", "0.6085793", "0.6062132", ...
0.7390736
0
IsBare indicates a repository is a bare repository.
IsBare указывает, что репозиторий является барным репозиторием.
func (v Repository) IsBare() bool { return v.workDir == "" }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func IsBareRepository(path string) bool {\n\n\tcmd := exec.Command(\"git\", fmt.Sprintf(\"--git-dir=%s\", path), \"rev-parse\", \"--is-bare-repository\")\n\tbody, err := cmd.Output()\n\n\tif err != nil {\n\t\treturn false\n\t}\n\n\tstatus := strings.Trim(string(body), \"\\n \")\n\treturn status == \"true\"\n}", ...
[ "0.80748403", "0.65109813", "0.6356934", "0.6285676", "0.6277902", "0.6159446", "0.58196324", "0.5621973", "0.5499171", "0.5424167", "0.5416235", "0.5323672", "0.51931185", "0.5172835", "0.5115312", "0.50820893", "0.5052068", "0.50374174", "0.49954063", "0.49940842", "0.49926...
0.8010365
1
Config returns git config object
Config возвращает объект git config
func (v Repository) Config() GitConfig { return v.gitConfig }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (v Repository) Config() goconfig.GitConfig {\n\tcfg, err := goconfig.Load(v.configFile())\n\tif err != nil && err != goconfig.ErrNotExist {\n\t\tlog.Fatalf(\"fail to load config: %s: %s\", v.configFile(), err)\n\t}\n\tif cfg == nil {\n\t\tcfg = goconfig.NewGitConfig()\n\t}\n\treturn cfg\n}", "func (opt *Opt...
[ "0.7744009", "0.7410123", "0.670251", "0.661456", "0.6592749", "0.65113205", "0.6497694", "0.64752066", "0.6394821", "0.63012666", "0.62980485", "0.6286497", "0.6229654", "0.6194471", "0.61894053", "0.61824733", "0.61724776", "0.61576897", "0.61292005", "0.6120914", "0.612033...
0.7850194
0
FindRepository locates repository object search from the given dir.
FindRepository ищет объект репозитория в заданной директории.
func FindRepository(dir string) (*Repository, error) { var ( gitDir string commonDir string workDir string gitConfig GitConfig err error ) gitDir, err = findGitDir(dir) if err != nil { return nil, err } commonDir, err = getGitCommonDir(gitDir) if err != nil { return nil, err } gitConf...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func FindRepository(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*Repository, error) {\n\trepositoryObj := &Repository{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := ...
[ "0.67655885", "0.6583548", "0.5961574", "0.5914727", "0.58771306", "0.582271", "0.5820217", "0.5819151", "0.55795795", "0.5564507", "0.5556771", "0.55446625", "0.5502477", "0.5489713", "0.54813373", "0.5453073", "0.5391034", "0.536849", "0.5359692", "0.534294", "0.5341294", ...
0.7402806
0
CheckSemanticTitle checks if the given PR contains semantic title
CheckSemanticTitle проверяет, содержит ли заданный PR семантическое название
func CheckSemanticTitle(pr *gogh.PullRequest, config PluginConfiguration, logger log.Logger) string { change := ghservice.NewRepositoryChangeForPR(pr) prefixes := GetValidTitlePrefixes(config) isTitleWithValidType := HasTitleWithValidType(prefixes, *pr.Title) if !isTitleWithValidType { if prefix, ok := wip.GetWo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func testFrontMatterTitle(mdBytes []byte) error {\n\tfm, _, err := frontparser.ParseFrontmatterAndContent(mdBytes)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif _, exists := fm[\"title\"]; exists == false {\n\t\treturn errors.New(\"can't find title in frontmatter\")\n\t}\n\treturn nil\n}", "func IsTitle(r rune) ...
[ "0.63894886", "0.61719227", "0.6123725", "0.60611886", "0.60287726", "0.6002876", "0.5939993", "0.5821647", "0.5766424", "0.57502794", "0.57399386", "0.5739377", "0.57328135", "0.572084", "0.5645825", "0.56444085", "0.56426454", "0.55887145", "0.55743915", "0.55185646", "0.55...
0.85127145
0
CheckDescriptionLength checks if the given PR's description contains enough number of arguments
CheckDescriptionLength проверяет, содержит ли заданный PR достаточно количество аргументов в описании
func CheckDescriptionLength(pr *gogh.PullRequest, config PluginConfiguration, logger log.Logger) string { actualLength := len(strings.TrimSpace(issueLinkRegexp.ReplaceAllString(pr.GetBody(), ""))) if actualLength < config.DescriptionContentLength { return fmt.Sprintf(DescriptionLengthShortMessage, config.Descriptio...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func CheckArgsLength(args []string, expectedLength int) error {\r\n\tif len(args) != expectedLength {\r\n\t\treturn fmt.Errorf(\"invalid number of arguments. Expected %v, got %v\", expectedLength, len(args))\r\n\t}\r\n\treturn nil\r\n}", "func IsValidArgsLength(args []string, n int) bool {\n\tif args == nil && n...
[ "0.66327566", "0.6183819", "0.61530507", "0.5897223", "0.58695334", "0.5821858", "0.5798817", "0.5707416", "0.5667413", "0.5666727", "0.5630328", "0.5620006", "0.55985975", "0.55719393", "0.553691", "0.55122423", "0.5494682", "0.5478022", "0.54566044", "0.5453439", "0.5440699...
0.7995943
0
CheckIssueLinkPresence checks if the given PR's description contains an issue link
CheckIssueLinkPresence проверяет, содержит ли описание заданного PR ссылку на проблему
func CheckIssueLinkPresence(pr *gogh.PullRequest, config PluginConfiguration, logger log.Logger) string { if !issueLinkRegexp.MatchString(pr.GetBody()) { return IssueLinkMissingMessage } return "" }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func CheckDescriptionLength(pr *gogh.PullRequest, config PluginConfiguration, logger log.Logger) string {\n\tactualLength := len(strings.TrimSpace(issueLinkRegexp.ReplaceAllString(pr.GetBody(), \"\")))\n\tif actualLength < config.DescriptionContentLength {\n\t\treturn fmt.Sprintf(DescriptionLengthShortMessage, con...
[ "0.5827231", "0.52759945", "0.52670836", "0.52358055", "0.5205674", "0.50942165", "0.50830615", "0.50109303", "0.5003048", "0.4981114", "0.49796918", "0.4905218", "0.48997667", "0.4889865", "0.4878953", "0.48716253", "0.48570353", "0.48182932", "0.4803739", "0.47971547", "0.4...
0.7922563
0
GetValidTitlePrefixes returns list of valid prefixes
GetValidTitlePrefixes возвращает список допустимых префиксов
func GetValidTitlePrefixes(config PluginConfiguration) []string { prefixes := defaultTypes if len(config.TypePrefix) != 0 { if config.Combine { prefixes = append(prefixes, config.TypePrefix...) } else { prefixes = config.TypePrefix } } return prefixes }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o GoogleCloudRetailV2alphaSearchRequestFacetSpecFacetKeyPtrOutput) Prefixes() pulumi.StringArrayOutput {\n\treturn o.ApplyT(func(v *GoogleCloudRetailV2alphaSearchRequestFacetSpecFacetKey) []string {\n\t\tif v == nil {\n\t\t\treturn nil\n\t\t}\n\t\treturn v.Prefixes\n\t}).(pulumi.StringArrayOutput)\n}", "fu...
[ "0.6098155", "0.6092304", "0.602812", "0.58553684", "0.5671215", "0.5661387", "0.5588173", "0.5572023", "0.54787356", "0.54342926", "0.54087603", "0.5395631", "0.53830993", "0.5359162", "0.5359162", "0.5341388", "0.5303424", "0.5253235", "0.5222545", "0.52096283", "0.51101464...
0.8025123
0
HasTitleWithValidType checks if title prefix conforms with semantic message style.
HasTitleWithValidType проверяет, соответствует ли префикс заголовка стилю семантического сообщения.
func HasTitleWithValidType(prefixes []string, title string) bool { pureTitle := strings.TrimSpace(title) for _, prefix := range prefixes { prefixRegexp := regexp.MustCompile(`(?i)^` + prefix + `(:| |\()+`) if prefixRegexp.MatchString(pureTitle) { return true } } return false }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func CheckSemanticTitle(pr *gogh.PullRequest, config PluginConfiguration, logger log.Logger) string {\n\tchange := ghservice.NewRepositoryChangeForPR(pr)\n\tprefixes := GetValidTitlePrefixes(config)\n\tisTitleWithValidType := HasTitleWithValidType(prefixes, *pr.Title)\n\n\tif !isTitleWithValidType {\n\t\tif prefix...
[ "0.6505668", "0.63963515", "0.63822585", "0.60263205", "0.58802074", "0.5860582", "0.58390754", "0.57830197", "0.57806534", "0.57744485", "0.57152456", "0.5694083", "0.56921774", "0.5678252", "0.56778", "0.56730336", "0.5671352", "0.56649643", "0.5638103", "0.5576951", "0.556...
0.80496615
0
CountCSVRowsGo returns a count of the number of rows in the give csv file
CountCSVRowsGo возвращает количество строк в указанном файле CSV
func CountCSVRowsGo(source string) (int, error) { defer un(trace("CountCSVRowsGo")) err := assertValidFilename(source) if err != nil { return 0, err } f, _ := os.Open(source) r := csv.NewReader(bufio.NewReader(f)) rowCount := 0 for { _, err := r.Re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func CSVFileInfo(f0 string) (size int64, nRec int64) {\n\tfd0, err := os.Open(f0)\n\tdefer fd0.Close()\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfi0, err := fd0.Stat()\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tbuf0 := bufio.NewReader(fd0)\n\tl0, _, err := buf0.ReadLine()\n\tif err != nil {\n\t\tlog.Fatal...
[ "0.6375762", "0.6306837", "0.61106974", "0.60449296", "0.60007024", "0.59904045", "0.58921826", "0.5806305", "0.57993895", "0.57476985", "0.56987125", "0.56797904", "0.56628454", "0.56590277", "0.5635066", "0.5588222", "0.55808735", "0.55445486", "0.5538845", "0.5538845", "0....
0.8511326
0
Test that the service returns the correct protocol version
Тестирование того, что служба возвращает правильную версию протокола
func TestServiceProtocolVersion(t *testing.T) { s := res.NewService("test") restest.AssertEqualJSON(t, "ProtocolVersion()", s.ProtocolVersion(), "1.2.2") }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func TestPeersService_Version(t *testing.T) {\n\tclient, mux, _, teardown := setupTest()\n\tdefer teardown()\n\n\tmux.HandleFunc(\"/peers/version\", func(writer http.ResponseWriter, request *http.Request) {\n\t\ttestMethod(t, request, \"GET\")\n\t\tfmt.Fprint(writer,\n\t\t\t`{\n\t\t\t \"version\": \"2.0.0\",\n\t\...
[ "0.6705135", "0.6438302", "0.6386366", "0.63707674", "0.6304543", "0.6262574", "0.617563", "0.6168916", "0.6146892", "0.6113688", "0.60996807", "0.6088013", "0.6075797", "0.6062475", "0.60598236", "0.60437936", "0.6016582", "0.599666", "0.59772485", "0.5974628", "0.5953988", ...
0.7818675
0
Test that service can be served without logger
Тестирование возможности предоставления службы без логгера
func TestServiceWithoutLogger(t *testing.T) { s := res.NewService("test") s.SetLogger(nil) s.Handle("model", res.GetResource(func(r res.GetRequest) { r.NotFound() })) session := restest.NewSession(t, s, restest.WithKeepLogger) defer session.Close() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func Test_NotFound(t *testing.T) {\n\tvar (\n\t\tnotFoundMsg ErrorMessage\n\t\tresp *http.Response\n\t)\n\n\tsvc := NewService()\n\tts := httptest.NewServer(svc.NewRouter(\"*\"))\n\tdefer ts.Close()\n\n\treq, _ := http.NewRequest(\"GET\", ts.URL+\"/not_found\", nil)\n\n\toutputLog := helpers.CaptureOutput(f...
[ "0.6161699", "0.59672475", "0.5942423", "0.57929426", "0.578552", "0.57729983", "0.5761654", "0.5737634", "0.57193595", "0.5637695", "0.56319416", "0.56254923", "0.56139284", "0.55134445", "0.55043334", "0.54994684", "0.54989934", "0.54716086", "0.54499424", "0.54347134", "0....
0.72680014
0
Test that Logger returns the logger set with SetLogger
Тестирование того, что Logger возвращает логгер, установленный с помощью SetLogger
func TestServiceSetLogger(t *testing.T) { s := res.NewService("test") l := logger.NewMemLogger() s.SetLogger(l) if s.Logger() != l { t.Errorf("expected Logger to return the logger passed to SetLogger, but it didn't") } s.Handle("model", res.GetResource(func(r res.GetRequest) { r.NotFound() })) session := rest...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func Logger() spidomtr.RunnerHandler {\n\treturn &TestLogger{}\n}", "func GetLogger() *log.Logger { return std.GetLogger() }", "func SetLogger(l utils.Logger) {\n\tlog = l\n}", "func SetLogger(l Logger) {\n\tlog = l\n}", "func SetLogger(l logger.Logger) {\n\tlog = l\n}", "func SetLogger(logger logger) {\...
[ "0.73071015", "0.7217698", "0.71225667", "0.7067874", "0.70242816", "0.7004462", "0.6998388", "0.69833803", "0.6974619", "0.69734454", "0.6970742", "0.69570327", "0.6933845", "0.69240355", "0.6911089", "0.69096345", "0.69042265", "0.6903018", "0.6900997", "0.6900997", "0.6900...
0.75092244
0
Test that SetOwnedResources sets which resources are reset when calling Reset.
Тестирование того, что SetOwnedResources устанавливает, какие ресурсы сбрасываются при вызове Reset.
func TestServiceSetOwnedResources(t *testing.T) { resources := []string{"test.foo.>", "test.bar.>"} access := []string{"test.zoo.>", "test.baz.>"} runTest(t, func(s *res.Service) { s.SetOwnedResources(resources, access) }, nil, restest.WithReset(resources, access)) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (m *User) SetOwnedObjects(value []DirectoryObjectable)() {\n m.ownedObjects = value\n}", "func TestReset(t *testing.T) {\n\ttestCancel(t, false)\n}", "func TestApplyOwnershipDiff(t *testing.T) {\n\tusers := []*user.User{\n\t\tfakeUser(\"1\", \"1\", \"user-1\"),\n\t\tfakeUser(\"2\", \"2\", \"user-2\"),\...
[ "0.5632101", "0.54997927", "0.54261786", "0.5346862", "0.5218427", "0.51643884", "0.5162271", "0.51167315", "0.5096469", "0.5093228", "0.50793904", "0.5075024", "0.5042418", "0.5026725", "0.50028026", "0.49832165", "0.49498773", "0.4921987", "0.4913988", "0.4884722", "0.48834...
0.76563233
0
Test that TokenEvent sends a connection token event.
Тестирование отправки события подключения с токеном TokenEvent.
func TestServiceTokenEvent_WithObjectToken_SendsToken(t *testing.T) { runTest(t, func(s *res.Service) { s.Handle("model", res.GetResource(func(r res.GetRequest) { r.NotFound() })) }, func(s *restest.Session) { s.Service().TokenEvent(mock.CID, mock.Token) s.GetMsg().AssertTokenEvent(mock.CID, mock.Token) }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func TestAuthRequestTokenEvent(t *testing.T) {\n\trunTest(t, func(s *res.Service) {\n\t\ts.Handle(\"model\", res.Auth(\"method\", func(r res.AuthRequest) {\n\t\t\tr.TokenEvent(mock.Token)\n\t\t\tr.OK(nil)\n\t\t}))\n\t}, func(s *restest.Session) {\n\t\treq := s.Auth(\"test.model\", \"method\", nil)\n\t\ts.GetMsg()....
[ "0.7312468", "0.66278255", "0.63569856", "0.6182798", "0.60594577", "0.59883547", "0.5914056", "0.58681816", "0.5785276", "0.56461126", "0.5483135", "0.54372364", "0.5330973", "0.52957696", "0.5283241", "0.52675366", "0.5232106", "0.52223915", "0.52166265", "0.52122736", "0.5...
0.7044898
1
Test that TokenEvent with nil sends a connection token event with a nil token.
Тестирование события TokenEvent с nil, отправляющего событие подключения с nil токеном.
func TestServiceTokenEvent_WithNilToken_SendsNilToken(t *testing.T) { runTest(t, func(s *res.Service) { s.Handle("model", res.GetResource(func(r res.GetRequest) { r.NotFound() })) }, func(s *restest.Session) { s.Service().TokenEvent(mock.CID, nil) s.GetMsg().AssertTokenEvent(mock.CID, nil) }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func TestServiceTokenEventWithID_WithNilToken_SendsNilToken(t *testing.T) {\n\trunTest(t, func(s *res.Service) {\n\t\ts.Handle(\"model\", res.GetResource(func(r res.GetRequest) { r.NotFound() }))\n\t}, func(s *restest.Session) {\n\t\ts.Service().TokenEventWithID(mock.CID, \"foo\", nil)\n\t\ts.GetMsg().AssertTokenE...
[ "0.77936465", "0.7668459", "0.6160332", "0.6125415", "0.5994007", "0.5927848", "0.5891091", "0.56836843", "0.56730366", "0.56381816", "0.5634394", "0.55937874", "0.5510154", "0.54910815", "0.54667795", "0.5448074", "0.5422616", "0.5422521", "0.5380838", "0.535725", "0.5315453...
0.8175172
0
Test that TokenEvent with an invalid cid causes panic.
Тест, который проверяет, вызывает ли событие TokenEvent с недопустимым cid панику.
func TestServiceTokenEventWithID_WithInvalidCID_CausesPanic(t *testing.T) { runTest(t, func(s *res.Service) { s.Handle("model", res.GetResource(func(r res.GetRequest) { r.NotFound() })) }, func(s *restest.Session) { restest.AssertPanic(t, func() { s.Service().TokenEventWithID("invalid.*.cid", "foo", nil) }) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func TestServiceTokenEvent_WithInvalidCID_CausesPanic(t *testing.T) {\n\trunTest(t, func(s *res.Service) {\n\t\ts.Handle(\"model\", res.GetResource(func(r res.GetRequest) { r.NotFound() }))\n\t}, func(s *restest.Session) {\n\t\trestest.AssertPanic(t, func() {\n\t\t\ts.Service().TokenEvent(\"invalid.*.cid\", nil)\n...
[ "0.8047649", "0.57519215", "0.5298864", "0.5272522", "0.52437335", "0.52140474", "0.5171461", "0.5149031", "0.5140155", "0.5113895", "0.507982", "0.5015881", "0.5013838", "0.50101703", "0.5003114", "0.49705926", "0.49312204", "0.49038598", "0.48926267", "0.48593882", "0.48174...
0.78260386
1
Test that TokenEvent with nil sends a connection token event with a nil token.
Тест, проверяющий, что TokenEvent с nil отправляет событие подключения с nil токеном.
func TestServiceTokenEventWithID_WithNilToken_SendsNilToken(t *testing.T) { runTest(t, func(s *res.Service) { s.Handle("model", res.GetResource(func(r res.GetRequest) { r.NotFound() })) }, func(s *restest.Session) { s.Service().TokenEventWithID(mock.CID, "foo", nil) s.GetMsg().AssertTokenEventWithID(mock.CID, "...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func TestServiceTokenEvent_WithNilToken_SendsNilToken(t *testing.T) {\n\trunTest(t, func(s *res.Service) {\n\t\ts.Handle(\"model\", res.GetResource(func(r res.GetRequest) { r.NotFound() }))\n\t}, func(s *restest.Session) {\n\t\ts.Service().TokenEvent(mock.CID, nil)\n\t\ts.GetMsg().AssertTokenEvent(mock.CID, nil)\n...
[ "0.8175133", "0.7667413", "0.61625266", "0.61268103", "0.59948516", "0.5929725", "0.58923304", "0.56820005", "0.5672691", "0.5638859", "0.5632581", "0.5596265", "0.5511962", "0.5491512", "0.5467685", "0.54452044", "0.5420265", "0.54192835", "0.53779507", "0.5359243", "0.53143...
0.7793353
1
Test that TokenEvent with an invalid cid causes panic.
Тест, который проверяет, что событие TokenEvent с недопустимым cid вызывает панику.
func TestServiceTokenEvent_WithInvalidCID_CausesPanic(t *testing.T) { runTest(t, func(s *res.Service) { s.Handle("model", res.GetResource(func(r res.GetRequest) { r.NotFound() })) }, func(s *restest.Session) { restest.AssertPanic(t, func() { s.Service().TokenEvent("invalid.*.cid", nil) }) }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func TestServiceTokenEventWithID_WithInvalidCID_CausesPanic(t *testing.T) {\n\trunTest(t, func(s *res.Service) {\n\t\ts.Handle(\"model\", res.GetResource(func(r res.GetRequest) { r.NotFound() }))\n\t}, func(s *restest.Session) {\n\t\trestest.AssertPanic(t, func() {\n\t\t\ts.Service().TokenEventWithID(\"invalid.*.c...
[ "0.78261864", "0.5751174", "0.52965206", "0.5272917", "0.5241354", "0.5213487", "0.5169806", "0.5148139", "0.5139948", "0.51134753", "0.5077146", "0.50146776", "0.50133395", "0.5010127", "0.500105", "0.49700215", "0.49307236", "0.4902067", "0.489147", "0.48595318", "0.4818535...
0.80473816
0
Test that Reset sends a system.reset event.
Тестирование того, что Reset отправляет событие system.reset.
func TestServiceReset(t *testing.T) { tbl := []struct { Resources []string Access []string Expected interface{} }{ {nil, nil, nil}, {[]string{}, nil, nil}, {nil, []string{}, nil}, {[]string{}, []string{}, nil}, {[]string{"test.foo.>"}, nil, json.RawMessage(`{"resources":["test.foo.>"]}`)}, {nil...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func TestReset(t *testing.T) {\n\ttestCancel(t, false)\n}", "func (m *Machine) Reset() error {\n\tm.State = driver.Running\n\tfmt.Printf(\"Reset %s: %s\\n\", m.Name, m.State)\n\treturn nil\n}", "func MockOnResetSystem(ctx context.Context, mockAPI *redfishMocks.RedfishAPI,\n\tsystemID string, requestBody *redfi...
[ "0.7429841", "0.67033285", "0.66388756", "0.65228575", "0.64425254", "0.6361065", "0.6352461", "0.63204896", "0.6292608", "0.6255345", "0.6237539", "0.6236271", "0.61987543", "0.61972404", "0.6187439", "0.61694217", "0.6162422", "0.6148909", "0.61209315", "0.61076725", "0.608...
0.7183463
1
Test that TokenReset sends a system.tokenReset event.
Тестирование отправки события system.tokenReset при вызове TokenReset.
func TestServiceTokenReset(t *testing.T) { tbl := []struct { Subject string TIDs []string Expected interface{} }{ {"auth", nil, nil}, {"auth", []string{}, nil}, {"auth", []string{"foo"}, json.RawMessage(`{"tids":["foo"],"subject":"auth"}`)}, {"auth", []string{"foo", "bar"}, json.RawMessage(`{"tids"...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func TestServiceReset(t *testing.T) {\n\ttbl := []struct {\n\t\tResources []string\n\t\tAccess []string\n\t\tExpected interface{}\n\t}{\n\t\t{nil, nil, nil},\n\t\t{[]string{}, nil, nil},\n\t\t{nil, []string{}, nil},\n\t\t{[]string{}, []string{}, nil},\n\n\t\t{[]string{\"test.foo.>\"}, nil, json.RawMessage(`{\"...
[ "0.6782514", "0.67578304", "0.63564855", "0.63515836", "0.626506", "0.616196", "0.6093224", "0.60746515", "0.602785", "0.58969015", "0.581825", "0.57836133", "0.5652502", "0.55837214", "0.5583631", "0.55784583", "0.5575923", "0.5546597", "0.55264384", "0.5520162", "0.54814744...
0.76338595
0
IsAMPCustomElement returns true if the node is an AMP custom element.
IsAMPCustomElement возвращает true, если узел является AMP-элементом пользовательского типа.
func IsAMPCustomElement(n *html.Node) bool { return n.Type == html.ElementNode && strings.HasPrefix(n.Data, "amp-") }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (decl SomeDecl) IsCustom() bool {\n\t_, is := decl.Properties.(CustomProperties)\n\treturn is\n}", "func IsScriptAMPExtension(n *html.Node) bool {\n\t_, ok := AMPExtensionName(n)\n\treturn ok\n}", "func (t *Type) IsCustom() bool {\n\treturn !t.IsPrimitive() && !t.IsContainer()\n}", "func IsScriptAMPRunt...
[ "0.61564237", "0.6037972", "0.57607794", "0.5394972", "0.5383893", "0.5306295", "0.5250998", "0.4929128", "0.49054834", "0.4893038", "0.48832464", "0.47255784", "0.4680999", "0.4679311", "0.46730384", "0.46495634", "0.4607126", "0.45523682", "0.4546803", "0.4519753", "0.44830...
0.90020335
0
AMPExtensionScriptDefinition returns a unique script definition that takes into account the extension name, version and if it is module/nomodule. Example (ampad): ampad0.1.js (regular/nomodule), ampad0.1.mjs (module). The AMP Validator prevents a mix of regular and nomodule extensions. If the pattern is not found then ...
AMPExtensionScriptDefinition возвращает уникальное определение скрипта, учитывая имя расширения, версию и то, является ли оно модулем или нет. Пример (ampad): ampad0.1.js (обычный/номодуль), ampad0.1.mjs (модуль). AMP Validator запрещает смешивание обычных и номодульных расширений. Если шаблон не найден, используется з...
func AMPExtensionScriptDefinition(n *html.Node) (string, bool) { if n.DataAtom != atom.Script { return "", false } src, hasSrc := htmlnode.GetAttributeVal(n, "", "src") if hasSrc { m := srcURLRE.FindStringSubmatch(src) if len(m) < 2 { return src, true } return m[1], true } return "", false }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func IsScriptAMPExtension(n *html.Node) bool {\n\t_, ok := AMPExtensionName(n)\n\treturn ok\n}", "func AMPExtensionName(n *html.Node) (string, bool) {\n\tif n.DataAtom != atom.Script {\n\t\treturn \"\", false\n\t}\n\tfor _, attr := range n.Attr {\n\t\tfor _, k := range []string{AMPCustomElement, AMPCustomTemplat...
[ "0.5773764", "0.53484195", "0.4909956", "0.4629277", "0.45030597", "0.44573566", "0.4399511", "0.43457377", "0.4294057", "0.42767256", "0.4269526", "0.4240586", "0.41823775", "0.41584232", "0.4150533", "0.41313267", "0.40750483", "0.40618613", "0.40592343", "0.40531242", "0.4...
0.7917034
0
AMPExtensionName returns the name of the extension this node represents. For most extensions this is the value of the "customelement" attribute. Returns ok=false if this isn't an extension.
AMPExtensionName возвращает имя расширения, которое представляет этот узел. Для большинства расширений это значение атрибута "customelement". Возвращает ok=false, если это не расширение.
func AMPExtensionName(n *html.Node) (string, bool) { if n.DataAtom != atom.Script { return "", false } for _, attr := range n.Attr { for _, k := range []string{AMPCustomElement, AMPCustomTemplate, AMPHostService} { if attr.Key == k { return attr.Val, true } } } return "", false }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func IsScriptAMPExtension(n *html.Node) bool {\n\t_, ok := AMPExtensionName(n)\n\treturn ok\n}", "func (me TxsdImpactSimpleContentExtensionType) IsExtValue() bool { return me.String() == \"ext-value\" }", "func (me TxsdCounterSimpleContentExtensionType) IsExtValue() bool { return me.String() == \"ext-value\" }...
[ "0.5660772", "0.5495332", "0.53589237", "0.52444386", "0.52043265", "0.51868117", "0.51730925", "0.5127122", "0.512419", "0.5119247", "0.5100169", "0.50610256", "0.50594693", "0.50342685", "0.49987003", "0.49817717", "0.49522945", "0.49516153", "0.4924233", "0.49242046", "0.4...
0.74925065
0
IsScriptAMPExtension returns true if the node is a script tag representing an extension.
IsScriptAMPExtension возвращает true, если узел является тегом скрипта, представляющим расширение.
func IsScriptAMPExtension(n *html.Node) bool { _, ok := AMPExtensionName(n) return ok }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func IsScriptAMPRuntime(n *html.Node) bool {\n\tif n.DataAtom != atom.Script {\n\t\treturn false\n\t}\n\tif v, ok := htmlnode.GetAttributeVal(n, \"\", \"src\"); ok {\n\t\treturn htmlnode.HasAttribute(n, \"\", \"async\") &&\n\t\t\t!IsScriptAMPExtension(n) &&\n\t\t\tstrings.HasPrefix(v, AMPCacheRootURL) &&\n\t\t\t(s...
[ "0.6694262", "0.6552518", "0.6336672", "0.61952287", "0.61614895", "0.5731267", "0.5551006", "0.5041479", "0.5015922", "0.5001815", "0.4956", "0.49291924", "0.48919377", "0.48352566", "0.482244", "0.47968212", "0.47773254", "0.47717315", "0.47310606", "0.47221884", "0.4642533...
0.89359015
0
IsScriptAMPRuntime returns true if the node is of the form <script async src=
IsScriptAMPRuntime возвращает true, если узел имеет вид <script async src=
func IsScriptAMPRuntime(n *html.Node) bool { if n.DataAtom != atom.Script { return false } if v, ok := htmlnode.GetAttributeVal(n, "", "src"); ok { return htmlnode.HasAttribute(n, "", "async") && !IsScriptAMPExtension(n) && strings.HasPrefix(v, AMPCacheRootURL) && (strings.HasSuffix(v, "/v0.js") || ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func IsScriptAMPViewer(n *html.Node) bool {\n\tif n.DataAtom != atom.Script {\n\t\treturn false\n\t}\n\ta, ok := htmlnode.FindAttribute(n, \"\", \"src\")\n\treturn ok &&\n\t\t!IsScriptAMPExtension(n) &&\n\t\tstrings.HasPrefix(a.Val,\n\t\t\tAMPCacheSchemeAndHost+\"/v0/amp-viewer-integration-\") &&\n\t\tstrings.HasS...
[ "0.71983045", "0.6859008", "0.6489399", "0.6116429", "0.59569806", "0.50658715", "0.48501772", "0.476661", "0.47604835", "0.4714461", "0.46902317", "0.4659031", "0.45383734", "0.44345397", "0.4392329", "0.4341767", "0.43279102", "0.4326666", "0.42890763", "0.42832336", "0.425...
0.85922056
0
IsScriptAMPViewer returns true if the node is of the form <script async src=
IsScriptAMPViewer возвращает true, если узел имеет вид <script async src=
func IsScriptAMPViewer(n *html.Node) bool { if n.DataAtom != atom.Script { return false } a, ok := htmlnode.FindAttribute(n, "", "src") return ok && !IsScriptAMPExtension(n) && strings.HasPrefix(a.Val, AMPCacheSchemeAndHost+"/v0/amp-viewer-integration-") && strings.HasSuffix(a.Val, ".js") && htmlnode.H...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func IsScriptAMPRuntime(n *html.Node) bool {\n\tif n.DataAtom != atom.Script {\n\t\treturn false\n\t}\n\tif v, ok := htmlnode.GetAttributeVal(n, \"\", \"src\"); ok {\n\t\treturn htmlnode.HasAttribute(n, \"\", \"async\") &&\n\t\t\t!IsScriptAMPExtension(n) &&\n\t\t\tstrings.HasPrefix(v, AMPCacheRootURL) &&\n\t\t\t(s...
[ "0.7577506", "0.6722259", "0.65249646", "0.6250946", "0.6023484", "0.5208977", "0.49847195", "0.4919317", "0.48820964", "0.47879615", "0.47224522", "0.4716671", "0.46345818", "0.44537893", "0.4429202", "0.42752665", "0.42705268", "0.42685997", "0.42263883", "0.42169845", "0.4...
0.8310235
0
IsScriptRenderDelaying returns true if the node has one of these values for attribute 'customelement': ampdynamiccssclasses, ampexperiment, ampstory.
IsScriptRenderDelaying возвращает true, если у узла одно из этих значений для атрибута 'customelement': ampdynamiccssclasses, ampexperiment, ampstory.
func IsScriptRenderDelaying(n *html.Node) bool { if n.DataAtom != atom.Script { return false } if IsScriptAMPViewer(n) { return true } if v, ok := htmlnode.GetAttributeVal(n, "", AMPCustomElement); ok { // TODO(b/77581738): Remove amp-story from this list. return (v == AMPDynamicCSSClasses || v == AMPEx...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func IsScriptAMPRuntime(n *html.Node) bool {\n\tif n.DataAtom != atom.Script {\n\t\treturn false\n\t}\n\tif v, ok := htmlnode.GetAttributeVal(n, \"\", \"src\"); ok {\n\t\treturn htmlnode.HasAttribute(n, \"\", \"async\") &&\n\t\t\t!IsScriptAMPExtension(n) &&\n\t\t\tstrings.HasPrefix(v, AMPCacheRootURL) &&\n\t\t\t(s...
[ "0.54627293", "0.5384497", "0.52935505", "0.52349025", "0.5183518", "0.51164085", "0.5027169", "0.49183807", "0.48826963", "0.48015487", "0.47464487", "0.47278962", "0.4711677", "0.4694349", "0.46618658", "0.46478906", "0.46302602", "0.460766", "0.45946616", "0.45566878", "0....
0.8075554
0
InitStudentsSubscriptionsHandler initialize studentsSubscriptions router
InitStudentsSubscriptionsHandler инициализирует маршрутизатор studentsSubscriptions
func InitStudentsSubscriptionsHandler(r *atreugo.Router, s *service.Service) { r.GET("/", getAllStudentsSubscriptions(s)) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (s *StanServer) initSubscriptions() error {\n\n\t// Do not create internal subscriptions in clustered mode,\n\t// the leader will when it gets elected.\n\tif !s.isClustered {\n\t\tcreateSubOnClientPublish := true\n\n\t\tif s.partitions != nil {\n\t\t\t// Receive published messages from clients, but only on th...
[ "0.6481434", "0.59553516", "0.54364514", "0.5402741", "0.53732777", "0.5366589", "0.53303486", "0.53290343", "0.5289545", "0.5288495", "0.52735746", "0.5230477", "0.5226967", "0.5205135", "0.5198127", "0.5193747", "0.5155629", "0.5143773", "0.5122913", "0.5113694", "0.5110221...
0.8779293
0
Compile will compile solution if not yet compiled. The compilation prosess will execute compile script of the language. It will use debugcompile script when debug parameter is true. When debug is true, but the language is not debuggable (doesn't contain debugcompile script), an ErrLanguageNotDebuggable error will retur...
Compile будет компилировать решение, если оно еще не было скомпилировано. Процесс компиляции выполнит скрипт компиляции языка. Он будет использовать скрипт debugcompile, когда параметр debug истинен. Если debug истинен, но язык не поддерживает отладку (не содержит скрипта debugcompile), будет возвращена ошибка ErrLangu...
func (cptool *CPTool) Compile(ctx context.Context, solution Solution, debug bool) (CompilationResult, error) { language := solution.Language if debug && !language.Debuggable { return CompilationResult{}, ErrLanguageNotDebuggable } targetDir := cptool.getCompiledDirectory(solution, debug) cptool.fs.MkdirAll(targ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func Compile(ctx context.Context, targets []string) error {\n\tlog := logger.NewDefault(\"compile\")\n\tlog.SetLogLevel(logger.LevelInfo)\n\tif consts.IsDebugMode(ctx) {\n\t\tlog.SetLogLevel(logger.LevelDebug)\n\t}\n\n\tconfigManager, err := configmanager.NewConfigManager(log)\n\tif err != nil {\n\t\treturn err\n\...
[ "0.5822461", "0.5743868", "0.53007513", "0.5181535", "0.51645374", "0.5097689", "0.500081", "0.47883692", "0.47864297", "0.47329405", "0.46677637", "0.4661549", "0.4639248", "0.4619214", "0.45559263", "0.454181", "0.45335022", "0.44954574", "0.44724452", "0.444016", "0.440288...
0.77606845
0
CompileByName will compile solution if not yet compiled. This method will search the language and solution by its name and then call Compile method. This method will return an error if the language or solution with it's name doesn't exist.
CompileByName будет компилировать решение, если оно еще не скомпилировано. Этот метод будет искать язык и решение по их названию, а затем вызывать метод Compile. Этот метод вернет ошибку, если язык или решение с таким именем не существует.
func (cptool *CPTool) CompileByName(ctx context.Context, languageName string, solutionName string, debug bool) (CompilationResult, error) { start := time.Now() language, err := cptool.GetLanguageByName(languageName) if err != nil { return CompilationResult{}, err } if cptool.logger != nil { cptool.logger.Prin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (cptool *CPTool) Compile(ctx context.Context, solution Solution, debug bool) (CompilationResult, error) {\n\tlanguage := solution.Language\n\tif debug && !language.Debuggable {\n\t\treturn CompilationResult{}, ErrLanguageNotDebuggable\n\t}\n\n\ttargetDir := cptool.getCompiledDirectory(solution, debug)\n\tcpto...
[ "0.5584038", "0.50285786", "0.50141174", "0.49621782", "0.4875996", "0.48572075", "0.4854768", "0.4850871", "0.4748288", "0.46886098", "0.46881205", "0.4676761", "0.46507636", "0.4649425", "0.4638744", "0.4593714", "0.4560371", "0.45371085", "0.45201123", "0.4494501", "0.4493...
0.8204627
0
GetCompilationRootDir returns directory of all compiled solutions.
GetCompilationRootDir возвращает директорию всех скомпилированных решений.
func (cptool *CPTool) GetCompilationRootDir() string { return path.Join(cptool.workingDirectory, ".cptool/solutions") }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func GetRootProjectDir() (string, error) {\n\twd, err := os.Getwd()\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tfor !strings.HasSuffix(wd, \"git2consul-go\") {\n\t\tif wd == \"/\" {\n\t\t\treturn \"\", errors.New(`cannot find project directory, \"/\" reached`)\n\t\t}\n\t\twd = filepath.Dir(wd)\n\t}\n\treturn ...
[ "0.6979527", "0.61517763", "0.6130268", "0.61221904", "0.60577995", "0.601363", "0.60060436", "0.59370095", "0.59113044", "0.58437407", "0.5744886", "0.5708629", "0.5654415", "0.5567339", "0.55459046", "0.55438185", "0.5506007", "0.54859716", "0.5441813", "0.5428665", "0.5411...
0.8156449
0
returns true if two query terms are equal
возвращает true, если два терма запроса равны
func (qt *queryTerm) equals(qt2 *queryTerm) bool { return qt.Subject == qt2.Subject && qt.Object == qt2.Object && reflect.DeepEqual(qt.Predicates, qt2.Predicates) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (term *Term) Equal(other *Term) bool {\n\tif term == nil && other != nil {\n\t\treturn false\n\t}\n\tif term != nil && other == nil {\n\t\treturn false\n\t}\n\tif term == other {\n\t\treturn true\n\t}\n\n\t// TODO(tsandall): This early-exit avoids allocations for types that have\n\t// Equal() functions that j...
[ "0.6278379", "0.6265848", "0.6265848", "0.58121437", "0.57692087", "0.57653165", "0.56731814", "0.56653947", "0.56645983", "0.5595077", "0.5544077", "0.5541766", "0.55375445", "0.5516763", "0.5507575", "0.54917985", "0.5487973", "0.54676956", "0.5441852", "0.54316646", "0.538...
0.71522367
0
EditRelease edit a release object within the GitHub API
EditRelease редактирует объект выпуска внутри API GitHub
func (c *Client) EditRelease(ctx context.Context, releaseID int64, req *github.RepositoryRelease) (*github.RepositoryRelease, error) { var release *github.RepositoryRelease err := retry.Retry(3, 3*time.Second, func() error { var ( res *github.Response err error ) release, res, err = c.Repositories.EditRe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func EditRelease(ctx *context.APIContext) {\n\t// swagger:operation PATCH /repos/{owner}/{repo}/releases/{id} repository repoEditRelease\n\t// ---\n\t// summary: Update a release\n\t// consumes:\n\t// - application/json\n\t// produces:\n\t// - application/json\n\t// parameters:\n\t// - name: owner\n\t// in: path...
[ "0.797417", "0.63441503", "0.6101559", "0.60008246", "0.5971021", "0.5868578", "0.583974", "0.57195973", "0.57152265", "0.5610921", "0.5536156", "0.55010283", "0.5471195", "0.5419356", "0.54037344", "0.5372626", "0.5371148", "0.5351311", "0.5314843", "0.5248477", "0.52337307"...
0.758511
1
ListAssets lists assets associated with a given release
ListAssets перечисляет активы, связанные с заданным выпуском
func (c *Client) ListAssets(ctx context.Context, releaseID int64) ([]*github.ReleaseAsset, error) { result := []*github.ReleaseAsset{} page := 1 for { assets, res, err := c.Repositories.ListReleaseAssets(context.TODO(), c.Owner, c.Repo, releaseID, &github.ListOptions{Page: page}) if err != nil { return nil, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func ListReleases(ctx *context.APIContext) {\n\t// swagger:operation GET /repos/{owner}/{repo}/releases repository repoListReleases\n\t// ---\n\t// summary: List a repo's releases\n\t// produces:\n\t// - application/json\n\t// parameters:\n\t// - name: owner\n\t// in: path\n\t// description: owner of the repo\...
[ "0.6093649", "0.6046222", "0.59944326", "0.59482193", "0.59288824", "0.58725035", "0.5847745", "0.5836617", "0.5797065", "0.5786176", "0.56488395", "0.5619454", "0.5564959", "0.55334187", "0.55060554", "0.55030614", "0.5474657", "0.5451275", "0.5429421", "0.5429421", "0.54062...
0.77932364
0
TrustAnchorString convert a TrustAnchor to a string encoded as XML.
TrustAnchorString преобразует TrustAnchor в строку, закодированную как XML.
func TrustAnchorString(t []*TrustAnchor) string { xta := new(XMLTrustAnchor) xta.KeyDigest = make([]*XMLKeyDigest, 0) for _, ta := range t { xta.Id = ta.Id // Sets the everytime, but that is OK. xta.Source = ta.Source xta.Zone = ta.Anchor.Hdr.Name xkd := new(XMLKeyDigest) xkd.Id = ta.AnchorId xkd.ValidFr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (me TxsdPresentationAttributesTextContentElementsTextAnchor) ToXsdtString() xsdt.String {\n\treturn xsdt.String(me)\n}", "func (me TxsdPresentationAttributesTextContentElementsTextAnchor) String() string {\n\treturn xsdt.String(me).String()\n}", "func (s TlsValidationContextAcmTrust) String() string {\n\t...
[ "0.57817805", "0.5648022", "0.5617549", "0.54700416", "0.5343101", "0.52947736", "0.52883303", "0.51470983", "0.5059527", "0.5048072", "0.49670568", "0.4913151", "0.4862687", "0.4851099", "0.4848319", "0.48402482", "0.4776784", "0.47474617", "0.47324777", "0.47219345", "0.472...
0.7828417
0