id int32 0 167k | repo stringlengths 5 54 | path stringlengths 4 155 | func_name stringlengths 1 118 | original_string stringlengths 52 85.5k | language stringclasses 1
value | code stringlengths 52 85.5k | code_tokens list | docstring stringlengths 6 2.61k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 85 252 |
|---|---|---|---|---|---|---|---|---|---|---|---|
153,600 | edeckers/auroradnsclient | records.go | GetRecords | func (client *AuroraDNSClient) GetRecords(zoneID string) ([]records.GetRecordsResponse, error) {
logrus.Debugf("GetRecords(%s)", zoneID)
relativeURL := fmt.Sprintf("zones/%s/records", zoneID)
response, err := client.requestor.Request(relativeURL, "GET", []byte(""))
if err != nil {
logrus.Errorf("Failed to receive records: %s", err)
return nil, err
}
var respData []records.GetRecordsResponse
err = json.Unmarshal(response, &respData)
if err != nil {
logrus.Errorf("Failed to unmarshall response: %s", err)
return nil, err
}
return respData, nil
} | go | func (client *AuroraDNSClient) GetRecords(zoneID string) ([]records.GetRecordsResponse, error) {
logrus.Debugf("GetRecords(%s)", zoneID)
relativeURL := fmt.Sprintf("zones/%s/records", zoneID)
response, err := client.requestor.Request(relativeURL, "GET", []byte(""))
if err != nil {
logrus.Errorf("Failed to receive records: %s", err)
return nil, err
}
var respData []records.GetRecordsResponse
err = json.Unmarshal(response, &respData)
if err != nil {
logrus.Errorf("Failed to unmarshall response: %s", err)
return nil, err
}
return respData, nil
} | [
"func",
"(",
"client",
"*",
"AuroraDNSClient",
")",
"GetRecords",
"(",
"zoneID",
"string",
")",
"(",
"[",
"]",
"records",
".",
"GetRecordsResponse",
",",
"error",
")",
"{",
"logrus",
".",
"Debugf",
"(",
"\"",
"\"",
",",
"zoneID",
")",
"\n",
"relativeURL"... | // GetRecords returns a list of all records in given zone | [
"GetRecords",
"returns",
"a",
"list",
"of",
"all",
"records",
"in",
"given",
"zone"
] | 1563e622aaca0a8bb895a448f31d4a430ab97586 | https://github.com/edeckers/auroradnsclient/blob/1563e622aaca0a8bb895a448f31d4a430ab97586/records.go#L12-L30 |
153,601 | edeckers/auroradnsclient | records.go | CreateRecord | func (client *AuroraDNSClient) CreateRecord(zoneID string, data records.CreateRecordRequest) (*records.CreateRecordResponse, error) {
logrus.Debugf("CreateRecord(%s, %+v)", zoneID, data)
body, err := json.Marshal(data)
if err != nil {
logrus.Errorf("Failed to marshall request body: %s", err)
return nil, err
}
relativeURL := fmt.Sprintf("zones/%s/records", zoneID)
response, err := client.requestor.Request(relativeURL, "POST", body)
if err != nil {
logrus.Errorf("Failed to create record: %s", err)
return nil, err
}
var respData *records.CreateRecordResponse
err = json.Unmarshal(response, &respData)
if err != nil {
logrus.Errorf("Failed to unmarshall response: %s", err)
return nil, err
}
return respData, nil
} | go | func (client *AuroraDNSClient) CreateRecord(zoneID string, data records.CreateRecordRequest) (*records.CreateRecordResponse, error) {
logrus.Debugf("CreateRecord(%s, %+v)", zoneID, data)
body, err := json.Marshal(data)
if err != nil {
logrus.Errorf("Failed to marshall request body: %s", err)
return nil, err
}
relativeURL := fmt.Sprintf("zones/%s/records", zoneID)
response, err := client.requestor.Request(relativeURL, "POST", body)
if err != nil {
logrus.Errorf("Failed to create record: %s", err)
return nil, err
}
var respData *records.CreateRecordResponse
err = json.Unmarshal(response, &respData)
if err != nil {
logrus.Errorf("Failed to unmarshall response: %s", err)
return nil, err
}
return respData, nil
} | [
"func",
"(",
"client",
"*",
"AuroraDNSClient",
")",
"CreateRecord",
"(",
"zoneID",
"string",
",",
"data",
"records",
".",
"CreateRecordRequest",
")",
"(",
"*",
"records",
".",
"CreateRecordResponse",
",",
"error",
")",
"{",
"logrus",
".",
"Debugf",
"(",
"\""... | // CreateRecord creates a new record in given zone | [
"CreateRecord",
"creates",
"a",
"new",
"record",
"in",
"given",
"zone"
] | 1563e622aaca0a8bb895a448f31d4a430ab97586 | https://github.com/edeckers/auroradnsclient/blob/1563e622aaca0a8bb895a448f31d4a430ab97586/records.go#L33-L60 |
153,602 | edeckers/auroradnsclient | records.go | RemoveRecord | func (client *AuroraDNSClient) RemoveRecord(zoneID string, recordID string) (*records.RemoveRecordResponse, error) {
logrus.Debugf("RemoveRecord(%s, %s)", zoneID, recordID)
relativeURL := fmt.Sprintf("zones/%s/records/%s", zoneID, recordID)
_, err := client.requestor.Request(relativeURL, "DELETE", nil)
if err != nil {
logrus.Errorf("Failed to remove record: %s", err)
return nil, err
}
return &records.RemoveRecordResponse{}, nil
} | go | func (client *AuroraDNSClient) RemoveRecord(zoneID string, recordID string) (*records.RemoveRecordResponse, error) {
logrus.Debugf("RemoveRecord(%s, %s)", zoneID, recordID)
relativeURL := fmt.Sprintf("zones/%s/records/%s", zoneID, recordID)
_, err := client.requestor.Request(relativeURL, "DELETE", nil)
if err != nil {
logrus.Errorf("Failed to remove record: %s", err)
return nil, err
}
return &records.RemoveRecordResponse{}, nil
} | [
"func",
"(",
"client",
"*",
"AuroraDNSClient",
")",
"RemoveRecord",
"(",
"zoneID",
"string",
",",
"recordID",
"string",
")",
"(",
"*",
"records",
".",
"RemoveRecordResponse",
",",
"error",
")",
"{",
"logrus",
".",
"Debugf",
"(",
"\"",
"\"",
",",
"zoneID",
... | // RemoveRecord removes a record corresponding to a particular id in a given zone | [
"RemoveRecord",
"removes",
"a",
"record",
"corresponding",
"to",
"a",
"particular",
"id",
"in",
"a",
"given",
"zone"
] | 1563e622aaca0a8bb895a448f31d4a430ab97586 | https://github.com/edeckers/auroradnsclient/blob/1563e622aaca0a8bb895a448f31d4a430ab97586/records.go#L63-L75 |
153,603 | zaccone/spf | resolver_miekg.go | NewMiekgDNSResolver | func NewMiekgDNSResolver(addr string) (Resolver, error) {
if _, _, e := net.SplitHostPort(addr); e != nil {
return nil, e
}
return &MiekgDNSResolver{
client: new(dns.Client),
serverAddr: addr,
}, nil
} | go | func NewMiekgDNSResolver(addr string) (Resolver, error) {
if _, _, e := net.SplitHostPort(addr); e != nil {
return nil, e
}
return &MiekgDNSResolver{
client: new(dns.Client),
serverAddr: addr,
}, nil
} | [
"func",
"NewMiekgDNSResolver",
"(",
"addr",
"string",
")",
"(",
"Resolver",
",",
"error",
")",
"{",
"if",
"_",
",",
"_",
",",
"e",
":=",
"net",
".",
"SplitHostPort",
"(",
"addr",
")",
";",
"e",
"!=",
"nil",
"{",
"return",
"nil",
",",
"e",
"\n",
"... | // NewMiekgDNSResolver returns new instance of Resolver | [
"NewMiekgDNSResolver",
"returns",
"new",
"instance",
"of",
"Resolver"
] | 76747b8658d9b8686ce812a0e3a2d3be904c980e | https://github.com/zaccone/spf/blob/76747b8658d9b8686ce812a0e3a2d3be904c980e/resolver_miekg.go#L12-L20 |
153,604 | drone/go-bitbucket | bitbucket/keys.go | List | func (r *KeyResource) List(account string) ([]*Key, error) {
keys := []*Key{}
path := fmt.Sprintf("/users/%s/ssh-keys", account)
if err := r.client.do("GET", path, nil, nil, &keys); err != nil {
return nil, err
}
return keys, nil
} | go | func (r *KeyResource) List(account string) ([]*Key, error) {
keys := []*Key{}
path := fmt.Sprintf("/users/%s/ssh-keys", account)
if err := r.client.do("GET", path, nil, nil, &keys); err != nil {
return nil, err
}
return keys, nil
} | [
"func",
"(",
"r",
"*",
"KeyResource",
")",
"List",
"(",
"account",
"string",
")",
"(",
"[",
"]",
"*",
"Key",
",",
"error",
")",
"{",
"keys",
":=",
"[",
"]",
"*",
"Key",
"{",
"}",
"\n",
"path",
":=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
","... | // Gets a list of the keys associated with an account.
// This call requires authentication. | [
"Gets",
"a",
"list",
"of",
"the",
"keys",
"associated",
"with",
"an",
"account",
".",
"This",
"call",
"requires",
"authentication",
"."
] | ba761238e76830e4d552e84bc526d08b12af05cd | https://github.com/drone/go-bitbucket/blob/ba761238e76830e4d552e84bc526d08b12af05cd/bitbucket/keys.go#L24-L33 |
153,605 | drone/go-bitbucket | bitbucket/keys.go | Delete | func (r *KeyResource) Delete(account string, id int) error {
path := fmt.Sprintf("/users/%s/ssh-keys/%v", account, id)
return r.client.do("DELETE", path, nil, nil, nil)
} | go | func (r *KeyResource) Delete(account string, id int) error {
path := fmt.Sprintf("/users/%s/ssh-keys/%v", account, id)
return r.client.do("DELETE", path, nil, nil, nil)
} | [
"func",
"(",
"r",
"*",
"KeyResource",
")",
"Delete",
"(",
"account",
"string",
",",
"id",
"int",
")",
"error",
"{",
"path",
":=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"account",
",",
"id",
")",
"\n",
"return",
"r",
".",
"client",
".",
"do... | // Deletes the key specified by the key_id value.
// This call requires authentication | [
"Deletes",
"the",
"key",
"specified",
"by",
"the",
"key_id",
"value",
".",
"This",
"call",
"requires",
"authentication"
] | ba761238e76830e4d552e84bc526d08b12af05cd | https://github.com/drone/go-bitbucket/blob/ba761238e76830e4d552e84bc526d08b12af05cd/bitbucket/keys.go#L115-L118 |
153,606 | drone/go-bitbucket | bitbucket/repo_keys.go | List | func (r *RepoKeyResource) List(owner, slug string) ([]*Key, error) {
keys := []*Key{}
path := fmt.Sprintf("/repositories/%s/%s/deploy-keys", owner, slug)
if err := r.client.do("GET", path, nil, nil, &keys); err != nil {
return nil, err
}
return keys, nil
} | go | func (r *RepoKeyResource) List(owner, slug string) ([]*Key, error) {
keys := []*Key{}
path := fmt.Sprintf("/repositories/%s/%s/deploy-keys", owner, slug)
if err := r.client.do("GET", path, nil, nil, &keys); err != nil {
return nil, err
}
return keys, nil
} | [
"func",
"(",
"r",
"*",
"RepoKeyResource",
")",
"List",
"(",
"owner",
",",
"slug",
"string",
")",
"(",
"[",
"]",
"*",
"Key",
",",
"error",
")",
"{",
"keys",
":=",
"[",
"]",
"*",
"Key",
"{",
"}",
"\n",
"path",
":=",
"fmt",
".",
"Sprintf",
"(",
... | // Gets a list of the keys associated with a repository. | [
"Gets",
"a",
"list",
"of",
"the",
"keys",
"associated",
"with",
"a",
"repository",
"."
] | ba761238e76830e4d552e84bc526d08b12af05cd | https://github.com/drone/go-bitbucket/blob/ba761238e76830e4d552e84bc526d08b12af05cd/bitbucket/repo_keys.go#L18-L27 |
153,607 | drone/go-bitbucket | bitbucket/repo_keys.go | Find | func (r *RepoKeyResource) Find(owner, slug string, id int) (*Key, error) {
key := Key{}
path := fmt.Sprintf("/repositories/%s/%s/deploy-keys/%v", owner, slug, id)
if err := r.client.do("GET", path, nil, nil, &key); err != nil {
return nil, err
}
return &key, nil
} | go | func (r *RepoKeyResource) Find(owner, slug string, id int) (*Key, error) {
key := Key{}
path := fmt.Sprintf("/repositories/%s/%s/deploy-keys/%v", owner, slug, id)
if err := r.client.do("GET", path, nil, nil, &key); err != nil {
return nil, err
}
return &key, nil
} | [
"func",
"(",
"r",
"*",
"RepoKeyResource",
")",
"Find",
"(",
"owner",
",",
"slug",
"string",
",",
"id",
"int",
")",
"(",
"*",
"Key",
",",
"error",
")",
"{",
"key",
":=",
"Key",
"{",
"}",
"\n",
"path",
":=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\""... | // Gets the content of the specified key_id.
// This call requires authentication. | [
"Gets",
"the",
"content",
"of",
"the",
"specified",
"key_id",
".",
"This",
"call",
"requires",
"authentication",
"."
] | ba761238e76830e4d552e84bc526d08b12af05cd | https://github.com/drone/go-bitbucket/blob/ba761238e76830e4d552e84bc526d08b12af05cd/bitbucket/repo_keys.go#L31-L39 |
153,608 | drone/go-bitbucket | bitbucket/repo_keys.go | Create | func (r *RepoKeyResource) Create(owner, slug, key, label string) (*Key, error) {
values := url.Values{}
values.Add("key", key)
values.Add("label", label)
k := Key{}
path := fmt.Sprintf("/repositories/%s/%s/deploy-keys", owner, slug)
if err := r.client.do("POST", path, nil, values, &k); err != nil {
return nil, err
}
return &k, nil
} | go | func (r *RepoKeyResource) Create(owner, slug, key, label string) (*Key, error) {
values := url.Values{}
values.Add("key", key)
values.Add("label", label)
k := Key{}
path := fmt.Sprintf("/repositories/%s/%s/deploy-keys", owner, slug)
if err := r.client.do("POST", path, nil, values, &k); err != nil {
return nil, err
}
return &k, nil
} | [
"func",
"(",
"r",
"*",
"RepoKeyResource",
")",
"Create",
"(",
"owner",
",",
"slug",
",",
"key",
",",
"label",
"string",
")",
"(",
"*",
"Key",
",",
"error",
")",
"{",
"values",
":=",
"url",
".",
"Values",
"{",
"}",
"\n",
"values",
".",
"Add",
"(",... | // Creates a key on the specified repo. You must supply a valid key
// that is unique across the Bitbucket service. | [
"Creates",
"a",
"key",
"on",
"the",
"specified",
"repo",
".",
"You",
"must",
"supply",
"a",
"valid",
"key",
"that",
"is",
"unique",
"across",
"the",
"Bitbucket",
"service",
"."
] | ba761238e76830e4d552e84bc526d08b12af05cd | https://github.com/drone/go-bitbucket/blob/ba761238e76830e4d552e84bc526d08b12af05cd/bitbucket/repo_keys.go#L60-L73 |
153,609 | drone/go-bitbucket | bitbucket/emails.go | List | func (r *EmailResource) List(account string) ([]*Email, error) {
emails := []*Email{}
path := fmt.Sprintf("/users/%s/emails", account)
if err := r.client.do("GET", path, nil, nil, &emails); err != nil {
return nil, err
}
return emails, nil
} | go | func (r *EmailResource) List(account string) ([]*Email, error) {
emails := []*Email{}
path := fmt.Sprintf("/users/%s/emails", account)
if err := r.client.do("GET", path, nil, nil, &emails); err != nil {
return nil, err
}
return emails, nil
} | [
"func",
"(",
"r",
"*",
"EmailResource",
")",
"List",
"(",
"account",
"string",
")",
"(",
"[",
"]",
"*",
"Email",
",",
"error",
")",
"{",
"emails",
":=",
"[",
"]",
"*",
"Email",
"{",
"}",
"\n",
"path",
":=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"... | // Gets the email addresses associated with the account. This call requires
// authentication. | [
"Gets",
"the",
"email",
"addresses",
"associated",
"with",
"the",
"account",
".",
"This",
"call",
"requires",
"authentication",
"."
] | ba761238e76830e4d552e84bc526d08b12af05cd | https://github.com/drone/go-bitbucket/blob/ba761238e76830e4d552e84bc526d08b12af05cd/bitbucket/emails.go#L29-L38 |
153,610 | drone/go-bitbucket | bitbucket/emails.go | Find | func (r *EmailResource) Find(account, address string) (*Email, error) {
email := Email{}
path := fmt.Sprintf("/users/%s/emails/%s", account, address)
if err := r.client.do("GET", path, nil, nil, &email); err != nil {
return nil, err
}
return &email, nil
} | go | func (r *EmailResource) Find(account, address string) (*Email, error) {
email := Email{}
path := fmt.Sprintf("/users/%s/emails/%s", account, address)
if err := r.client.do("GET", path, nil, nil, &email); err != nil {
return nil, err
}
return &email, nil
} | [
"func",
"(",
"r",
"*",
"EmailResource",
")",
"Find",
"(",
"account",
",",
"address",
"string",
")",
"(",
"*",
"Email",
",",
"error",
")",
"{",
"email",
":=",
"Email",
"{",
"}",
"\n",
"path",
":=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"acc... | // Gets an individual email address associated with an account.
// This call requires authentication. | [
"Gets",
"an",
"individual",
"email",
"address",
"associated",
"with",
"an",
"account",
".",
"This",
"call",
"requires",
"authentication",
"."
] | ba761238e76830e4d552e84bc526d08b12af05cd | https://github.com/drone/go-bitbucket/blob/ba761238e76830e4d552e84bc526d08b12af05cd/bitbucket/emails.go#L42-L51 |
153,611 | drone/go-bitbucket | bitbucket/emails.go | FindPrimary | func (r *EmailResource) FindPrimary(account string) (*Email, error) {
emails, err := r.List(account)
if err != nil {
return nil, err
}
for _, email := range emails {
if email.Primary {
return email, nil
}
}
return nil, ErrNotFound
} | go | func (r *EmailResource) FindPrimary(account string) (*Email, error) {
emails, err := r.List(account)
if err != nil {
return nil, err
}
for _, email := range emails {
if email.Primary {
return email, nil
}
}
return nil, ErrNotFound
} | [
"func",
"(",
"r",
"*",
"EmailResource",
")",
"FindPrimary",
"(",
"account",
"string",
")",
"(",
"*",
"Email",
",",
"error",
")",
"{",
"emails",
",",
"err",
":=",
"r",
".",
"List",
"(",
"account",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
... | // Gets an individual's primary email address. | [
"Gets",
"an",
"individual",
"s",
"primary",
"email",
"address",
"."
] | ba761238e76830e4d552e84bc526d08b12af05cd | https://github.com/drone/go-bitbucket/blob/ba761238e76830e4d552e84bc526d08b12af05cd/bitbucket/emails.go#L54-L67 |
153,612 | drone/go-bitbucket | bitbucket/emails.go | Create | func (r *EmailResource) Create(account, address string) (*Email, error) {
values := url.Values{}
values.Add("email", address)
e := Email{}
path := fmt.Sprintf("/users/%s/emails/%s", account, address)
if err := r.client.do("POST", path, nil, values, &e); err != nil {
return nil, err
}
return &e, nil
} | go | func (r *EmailResource) Create(account, address string) (*Email, error) {
values := url.Values{}
values.Add("email", address)
e := Email{}
path := fmt.Sprintf("/users/%s/emails/%s", account, address)
if err := r.client.do("POST", path, nil, values, &e); err != nil {
return nil, err
}
return &e, nil
} | [
"func",
"(",
"r",
"*",
"EmailResource",
")",
"Create",
"(",
"account",
",",
"address",
"string",
")",
"(",
"*",
"Email",
",",
"error",
")",
"{",
"values",
":=",
"url",
".",
"Values",
"{",
"}",
"\n",
"values",
".",
"Add",
"(",
"\"",
"\"",
",",
"ad... | // Adds additional email addresses to an account. This call requires
// authentication. | [
"Adds",
"additional",
"email",
"addresses",
"to",
"an",
"account",
".",
"This",
"call",
"requires",
"authentication",
"."
] | ba761238e76830e4d552e84bc526d08b12af05cd | https://github.com/drone/go-bitbucket/blob/ba761238e76830e4d552e84bc526d08b12af05cd/bitbucket/emails.go#L71-L83 |
153,613 | tallstoat/pbparser | parser.go | Parse | func Parse(r io.Reader, p ImportModuleProvider) (ProtoFile, error) {
if r == nil {
return ProtoFile{}, errors.New("Reader for protobuf content is mandatory")
}
pf := ProtoFile{}
// parse the main proto file...
if err := parse(r, &pf); err != nil {
return pf, err
}
// verify via extra checks...
if err := verify(&pf, p); err != nil {
return pf, err
}
return pf, nil
} | go | func Parse(r io.Reader, p ImportModuleProvider) (ProtoFile, error) {
if r == nil {
return ProtoFile{}, errors.New("Reader for protobuf content is mandatory")
}
pf := ProtoFile{}
// parse the main proto file...
if err := parse(r, &pf); err != nil {
return pf, err
}
// verify via extra checks...
if err := verify(&pf, p); err != nil {
return pf, err
}
return pf, nil
} | [
"func",
"Parse",
"(",
"r",
"io",
".",
"Reader",
",",
"p",
"ImportModuleProvider",
")",
"(",
"ProtoFile",
",",
"error",
")",
"{",
"if",
"r",
"==",
"nil",
"{",
"return",
"ProtoFile",
"{",
"}",
",",
"errors",
".",
"New",
"(",
"\"",
"\"",
")",
"\n",
... | // Parse function parses the protobuf content passed to it by the the client code via
// the reader. It also uses the passed-in ImportModuleProvider to callback the client
// code for any imports in the protobuf content. If there are no imports, the client
// can choose to pass this as nil.
//
// This function returns populated ProtoFile struct if parsing is successful.
// If the parsing or validation fails, it returns an Error. | [
"Parse",
"function",
"parses",
"the",
"protobuf",
"content",
"passed",
"to",
"it",
"by",
"the",
"the",
"client",
"code",
"via",
"the",
"reader",
".",
"It",
"also",
"uses",
"the",
"passed",
"-",
"in",
"ImportModuleProvider",
"to",
"callback",
"the",
"client",... | 1e04894cea0468f041dbb96476d81b3d49b4a0f1 | https://github.com/tallstoat/pbparser/blob/1e04894cea0468f041dbb96476d81b3d49b4a0f1/parser.go#L23-L41 |
153,614 | tallstoat/pbparser | parser.go | ParseFile | func ParseFile(file string) (ProtoFile, error) {
if file == "" {
return ProtoFile{}, errors.New("File is mandatory")
}
// read the proto file contents & create a reader...
raw, err := ioutil.ReadFile(file)
if err != nil {
return ProtoFile{}, err
}
r := strings.NewReader(string(raw[:]))
// create default import module provider...
dir := filepath.Dir(file)
impr := defaultImportModuleProviderImpl{dir: dir}
return Parse(r, &impr)
} | go | func ParseFile(file string) (ProtoFile, error) {
if file == "" {
return ProtoFile{}, errors.New("File is mandatory")
}
// read the proto file contents & create a reader...
raw, err := ioutil.ReadFile(file)
if err != nil {
return ProtoFile{}, err
}
r := strings.NewReader(string(raw[:]))
// create default import module provider...
dir := filepath.Dir(file)
impr := defaultImportModuleProviderImpl{dir: dir}
return Parse(r, &impr)
} | [
"func",
"ParseFile",
"(",
"file",
"string",
")",
"(",
"ProtoFile",
",",
"error",
")",
"{",
"if",
"file",
"==",
"\"",
"\"",
"{",
"return",
"ProtoFile",
"{",
"}",
",",
"errors",
".",
"New",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"// read the proto fi... | // ParseFile function reads and parses the content of the protobuf file whose
// path is provided as sole argument to the function. If there are any imports
// in the protobuf file, the parser will look for them in the same directory
// where the protobuf file resides.
//
// This function returns populated ProtoFile struct if parsing is successful.
// If the parsing or validation fails, it returns an Error. | [
"ParseFile",
"function",
"reads",
"and",
"parses",
"the",
"content",
"of",
"the",
"protobuf",
"file",
"whose",
"path",
"is",
"provided",
"as",
"sole",
"argument",
"to",
"the",
"function",
".",
"If",
"there",
"are",
"any",
"imports",
"in",
"the",
"protobuf",
... | 1e04894cea0468f041dbb96476d81b3d49b4a0f1 | https://github.com/tallstoat/pbparser/blob/1e04894cea0468f041dbb96476d81b3d49b4a0f1/parser.go#L50-L67 |
153,615 | tallstoat/pbparser | parser.go | parse | func parse(r io.Reader, pf *ProtoFile) error {
br := bufio.NewReader(r)
// initialize parser...
loc := location{line: 1, column: 0}
parser := parser{br: br, loc: &loc}
// parse the file contents...
return parser.parse(pf)
} | go | func parse(r io.Reader, pf *ProtoFile) error {
br := bufio.NewReader(r)
// initialize parser...
loc := location{line: 1, column: 0}
parser := parser{br: br, loc: &loc}
// parse the file contents...
return parser.parse(pf)
} | [
"func",
"parse",
"(",
"r",
"io",
".",
"Reader",
",",
"pf",
"*",
"ProtoFile",
")",
"error",
"{",
"br",
":=",
"bufio",
".",
"NewReader",
"(",
"r",
")",
"\n\n",
"// initialize parser...",
"loc",
":=",
"location",
"{",
"line",
":",
"1",
",",
"column",
":... | // parse is an internal function which is invoked with the reader for the main proto file
// & a pointer to the ProtoFile struct to be populated post parsing & verification. | [
"parse",
"is",
"an",
"internal",
"function",
"which",
"is",
"invoked",
"with",
"the",
"reader",
"for",
"the",
"main",
"proto",
"file",
"&",
"a",
"pointer",
"to",
"the",
"ProtoFile",
"struct",
"to",
"be",
"populated",
"post",
"parsing",
"&",
"verification",
... | 1e04894cea0468f041dbb96476d81b3d49b4a0f1 | https://github.com/tallstoat/pbparser/blob/1e04894cea0468f041dbb96476d81b3d49b4a0f1/parser.go#L71-L80 |
153,616 | tallstoat/pbparser | parser.go | parse | func (p *parser) parse(pf *ProtoFile) error {
for {
// read any documentation if found...
documentation, err := p.readDocumentationIfFound()
if err != nil {
return err
}
if p.eofReached {
break
}
// skip any intervening whitespace if present...
p.skipWhitespace()
if p.eofReached {
break
}
// read any declaration...
err = p.readDeclaration(pf, documentation, parseCtx{ctxType: fileCtx})
if err != nil {
return err
}
if p.eofReached {
break
}
}
return nil
} | go | func (p *parser) parse(pf *ProtoFile) error {
for {
// read any documentation if found...
documentation, err := p.readDocumentationIfFound()
if err != nil {
return err
}
if p.eofReached {
break
}
// skip any intervening whitespace if present...
p.skipWhitespace()
if p.eofReached {
break
}
// read any declaration...
err = p.readDeclaration(pf, documentation, parseCtx{ctxType: fileCtx})
if err != nil {
return err
}
if p.eofReached {
break
}
}
return nil
} | [
"func",
"(",
"p",
"*",
"parser",
")",
"parse",
"(",
"pf",
"*",
"ProtoFile",
")",
"error",
"{",
"for",
"{",
"// read any documentation if found...",
"documentation",
",",
"err",
":=",
"p",
".",
"readDocumentationIfFound",
"(",
")",
"\n",
"if",
"err",
"!=",
... | // This function just looks for documentation and
// then declaration in a loop till EOF is reached | [
"This",
"function",
"just",
"looks",
"for",
"documentation",
"and",
"then",
"declaration",
"in",
"a",
"loop",
"till",
"EOF",
"is",
"reached"
] | 1e04894cea0468f041dbb96476d81b3d49b4a0f1 | https://github.com/tallstoat/pbparser/blob/1e04894cea0468f041dbb96476d81b3d49b4a0f1/parser.go#L101-L128 |
153,617 | tallstoat/pbparser | parser.go | readSingleLineComment | func (p *parser) readSingleLineComment() string {
str := strings.TrimSpace(p.readUntilNewline())
for {
p.skipWhitespace()
if c := p.read(); c != '/' {
p.unread()
break
}
if c := p.read(); c != '/' {
p.unread()
break
}
str += " " + strings.TrimSpace(p.readUntilNewline())
}
return str
} | go | func (p *parser) readSingleLineComment() string {
str := strings.TrimSpace(p.readUntilNewline())
for {
p.skipWhitespace()
if c := p.read(); c != '/' {
p.unread()
break
}
if c := p.read(); c != '/' {
p.unread()
break
}
str += " " + strings.TrimSpace(p.readUntilNewline())
}
return str
} | [
"func",
"(",
"p",
"*",
"parser",
")",
"readSingleLineComment",
"(",
")",
"string",
"{",
"str",
":=",
"strings",
".",
"TrimSpace",
"(",
"p",
".",
"readUntilNewline",
"(",
")",
")",
"\n",
"for",
"{",
"p",
".",
"skipWhitespace",
"(",
")",
"\n",
"if",
"c... | // Reads one or multiple single line comments | [
"Reads",
"one",
"or",
"multiple",
"single",
"line",
"comments"
] | 1e04894cea0468f041dbb96476d81b3d49b4a0f1 | https://github.com/tallstoat/pbparser/blob/1e04894cea0468f041dbb96476d81b3d49b4a0f1/parser.go#L1045-L1060 |
153,618 | thecodeteam/gorackhd | client/get/get_files_fileidentifier_parameters.go | WithFileidentifier | func (o *GetFilesFileidentifierParams) WithFileidentifier(fileidentifier string) *GetFilesFileidentifierParams {
o.Fileidentifier = fileidentifier
return o
} | go | func (o *GetFilesFileidentifierParams) WithFileidentifier(fileidentifier string) *GetFilesFileidentifierParams {
o.Fileidentifier = fileidentifier
return o
} | [
"func",
"(",
"o",
"*",
"GetFilesFileidentifierParams",
")",
"WithFileidentifier",
"(",
"fileidentifier",
"string",
")",
"*",
"GetFilesFileidentifierParams",
"{",
"o",
".",
"Fileidentifier",
"=",
"fileidentifier",
"\n",
"return",
"o",
"\n",
"}"
] | // WithFileidentifier adds the fileidentifier to the get files fileidentifier params | [
"WithFileidentifier",
"adds",
"the",
"fileidentifier",
"to",
"the",
"get",
"files",
"fileidentifier",
"params"
] | 66bd88ab29593b880ba59b35db2c17a4b4bab1f1 | https://github.com/thecodeteam/gorackhd/blob/66bd88ab29593b880ba59b35db2c17a4b4bab1f1/client/get/get_files_fileidentifier_parameters.go#L51-L54 |
153,619 | thecodeteam/gorackhd | client/obms/get_obms_library_identifier_parameters.go | WithIdentifier | func (o *GetObmsLibraryIdentifierParams) WithIdentifier(identifier string) *GetObmsLibraryIdentifierParams {
o.Identifier = identifier
return o
} | go | func (o *GetObmsLibraryIdentifierParams) WithIdentifier(identifier string) *GetObmsLibraryIdentifierParams {
o.Identifier = identifier
return o
} | [
"func",
"(",
"o",
"*",
"GetObmsLibraryIdentifierParams",
")",
"WithIdentifier",
"(",
"identifier",
"string",
")",
"*",
"GetObmsLibraryIdentifierParams",
"{",
"o",
".",
"Identifier",
"=",
"identifier",
"\n",
"return",
"o",
"\n",
"}"
] | // WithIdentifier adds the identifier to the get obms library identifier params | [
"WithIdentifier",
"adds",
"the",
"identifier",
"to",
"the",
"get",
"obms",
"library",
"identifier",
"params"
] | 66bd88ab29593b880ba59b35db2c17a4b4bab1f1 | https://github.com/thecodeteam/gorackhd/blob/66bd88ab29593b880ba59b35db2c17a4b4bab1f1/client/obms/get_obms_library_identifier_parameters.go#L52-L55 |
153,620 | bearded-web/bearded | pkg/config/flags/converter.go | FlagToCamel | func FlagToCamel(s string) string {
var result string
words := strings.Split(s, flagDivider)
for _, word := range words {
w := []rune(word)
w[0] = unicode.ToUpper(w[0])
result += string(w)
}
return result
} | go | func FlagToCamel(s string) string {
var result string
words := strings.Split(s, flagDivider)
for _, word := range words {
w := []rune(word)
w[0] = unicode.ToUpper(w[0])
result += string(w)
}
return result
} | [
"func",
"FlagToCamel",
"(",
"s",
"string",
")",
"string",
"{",
"var",
"result",
"string",
"\n",
"words",
":=",
"strings",
".",
"Split",
"(",
"s",
",",
"flagDivider",
")",
"\n",
"for",
"_",
",",
"word",
":=",
"range",
"words",
"{",
"w",
":=",
"[",
"... | // transform s from camel-case to CamelCase | [
"transform",
"s",
"from",
"camel",
"-",
"case",
"to",
"CamelCase"
] | c937b9e05d299400e95143a433836214a6ffa649 | https://github.com/bearded-web/bearded/blob/c937b9e05d299400e95143a433836214a6ffa649/pkg/config/flags/converter.go#L15-L24 |
153,621 | bearded-web/bearded | pkg/config/flags/converter.go | CamelToFlag | func CamelToFlag(s string) string {
rs := []rune(s)
buf := bytes.NewBuffer(make([]byte, 0, len(rs)+5))
for i := 0; i < len(rs); i++ {
if unicode.IsUpper(rs[i]) && i > 0 {
buf.WriteString(flagDivider)
}
buf.WriteRune(unicode.ToLower(rs[i]))
}
return strings.ToLower(buf.String())
} | go | func CamelToFlag(s string) string {
rs := []rune(s)
buf := bytes.NewBuffer(make([]byte, 0, len(rs)+5))
for i := 0; i < len(rs); i++ {
if unicode.IsUpper(rs[i]) && i > 0 {
buf.WriteString(flagDivider)
}
buf.WriteRune(unicode.ToLower(rs[i]))
}
return strings.ToLower(buf.String())
} | [
"func",
"CamelToFlag",
"(",
"s",
"string",
")",
"string",
"{",
"rs",
":=",
"[",
"]",
"rune",
"(",
"s",
")",
"\n",
"buf",
":=",
"bytes",
".",
"NewBuffer",
"(",
"make",
"(",
"[",
"]",
"byte",
",",
"0",
",",
"len",
"(",
"rs",
")",
"+",
"5",
")",... | // transform s from CamelCase to camel-case | [
"transform",
"s",
"from",
"CamelCase",
"to",
"camel",
"-",
"case"
] | c937b9e05d299400e95143a433836214a6ffa649 | https://github.com/bearded-web/bearded/blob/c937b9e05d299400e95143a433836214a6ffa649/pkg/config/flags/converter.go#L27-L37 |
153,622 | bearded-web/bearded | pkg/config/flags/converter.go | FlagToEnv | func FlagToEnv(s string) string {
return strings.ToUpper(strings.Join(strings.Split(s, flagDivider), envDivider))
} | go | func FlagToEnv(s string) string {
return strings.ToUpper(strings.Join(strings.Split(s, flagDivider), envDivider))
} | [
"func",
"FlagToEnv",
"(",
"s",
"string",
")",
"string",
"{",
"return",
"strings",
".",
"ToUpper",
"(",
"strings",
".",
"Join",
"(",
"strings",
".",
"Split",
"(",
"s",
",",
"flagDivider",
")",
",",
"envDivider",
")",
")",
"\n",
"}"
] | // transform s from camel-case to CAMEL_CASE | [
"transform",
"s",
"from",
"camel",
"-",
"case",
"to",
"CAMEL_CASE"
] | c937b9e05d299400e95143a433836214a6ffa649 | https://github.com/bearded-web/bearded/blob/c937b9e05d299400e95143a433836214a6ffa649/pkg/config/flags/converter.go#L40-L42 |
153,623 | thecodeteam/gorackhd | client/get/get_dhcp_lease_mac_parameters.go | WithMac | func (o *GetDhcpLeaseMacParams) WithMac(mac string) *GetDhcpLeaseMacParams {
o.Mac = mac
return o
} | go | func (o *GetDhcpLeaseMacParams) WithMac(mac string) *GetDhcpLeaseMacParams {
o.Mac = mac
return o
} | [
"func",
"(",
"o",
"*",
"GetDhcpLeaseMacParams",
")",
"WithMac",
"(",
"mac",
"string",
")",
"*",
"GetDhcpLeaseMacParams",
"{",
"o",
".",
"Mac",
"=",
"mac",
"\n",
"return",
"o",
"\n",
"}"
] | // WithMac adds the mac to the get dhcp lease mac params | [
"WithMac",
"adds",
"the",
"mac",
"to",
"the",
"get",
"dhcp",
"lease",
"mac",
"params"
] | 66bd88ab29593b880ba59b35db2c17a4b4bab1f1 | https://github.com/thecodeteam/gorackhd/blob/66bd88ab29593b880ba59b35db2c17a4b4bab1f1/client/get/get_dhcp_lease_mac_parameters.go#L51-L54 |
153,624 | thecodeteam/gorackhd | client/get/get_catalogs_identifier_parameters.go | WithIdentifier | func (o *GetCatalogsIdentifierParams) WithIdentifier(identifier string) *GetCatalogsIdentifierParams {
o.Identifier = identifier
return o
} | go | func (o *GetCatalogsIdentifierParams) WithIdentifier(identifier string) *GetCatalogsIdentifierParams {
o.Identifier = identifier
return o
} | [
"func",
"(",
"o",
"*",
"GetCatalogsIdentifierParams",
")",
"WithIdentifier",
"(",
"identifier",
"string",
")",
"*",
"GetCatalogsIdentifierParams",
"{",
"o",
".",
"Identifier",
"=",
"identifier",
"\n",
"return",
"o",
"\n",
"}"
] | // WithIdentifier adds the identifier to the get catalogs identifier params | [
"WithIdentifier",
"adds",
"the",
"identifier",
"to",
"the",
"get",
"catalogs",
"identifier",
"params"
] | 66bd88ab29593b880ba59b35db2c17a4b4bab1f1 | https://github.com/thecodeteam/gorackhd/blob/66bd88ab29593b880ba59b35db2c17a4b4bab1f1/client/get/get_catalogs_identifier_parameters.go#L51-L54 |
153,625 | bearded-web/bearded | pkg/utils/load/load.go | FromFile | func (l *Loader) FromFile(filename string, dst interface{}, opts ...Opts) error {
// take format from filename extension
format := UnknownFormat
for _, opt := range opts {
format = opt.Format
}
if format == UnknownFormat {
ext := path.Ext(filename)
if f, ok := l.ExtToFormat[ext]; !ok {
return fmt.Errorf("Cant't recognize format from extension %s", ext)
} else {
format = f
}
}
f, err := os.Open(filename)
if err != nil {
return err
}
return l.FromReader(f, dst, format)
} | go | func (l *Loader) FromFile(filename string, dst interface{}, opts ...Opts) error {
// take format from filename extension
format := UnknownFormat
for _, opt := range opts {
format = opt.Format
}
if format == UnknownFormat {
ext := path.Ext(filename)
if f, ok := l.ExtToFormat[ext]; !ok {
return fmt.Errorf("Cant't recognize format from extension %s", ext)
} else {
format = f
}
}
f, err := os.Open(filename)
if err != nil {
return err
}
return l.FromReader(f, dst, format)
} | [
"func",
"(",
"l",
"*",
"Loader",
")",
"FromFile",
"(",
"filename",
"string",
",",
"dst",
"interface",
"{",
"}",
",",
"opts",
"...",
"Opts",
")",
"error",
"{",
"// take format from filename extension",
"format",
":=",
"UnknownFormat",
"\n",
"for",
"_",
",",
... | // load data to dst struct from file according to format | [
"load",
"data",
"to",
"dst",
"struct",
"from",
"file",
"according",
"to",
"format"
] | c937b9e05d299400e95143a433836214a6ffa649 | https://github.com/bearded-web/bearded/blob/c937b9e05d299400e95143a433836214a6ffa649/pkg/utils/load/load.go#L35-L54 |
153,626 | bearded-web/bearded | pkg/utils/load/load.go | FromReader | func (l *Loader) FromReader(r io.Reader, dst interface{}, format Format) error {
var err error
if loaderFunc, ok := l.Loaders[format]; !ok {
err = fmt.Errorf("Unknown format %s", format)
} else {
err = loaderFunc(r, dst)
}
return err
} | go | func (l *Loader) FromReader(r io.Reader, dst interface{}, format Format) error {
var err error
if loaderFunc, ok := l.Loaders[format]; !ok {
err = fmt.Errorf("Unknown format %s", format)
} else {
err = loaderFunc(r, dst)
}
return err
} | [
"func",
"(",
"l",
"*",
"Loader",
")",
"FromReader",
"(",
"r",
"io",
".",
"Reader",
",",
"dst",
"interface",
"{",
"}",
",",
"format",
"Format",
")",
"error",
"{",
"var",
"err",
"error",
"\n",
"if",
"loaderFunc",
",",
"ok",
":=",
"l",
".",
"Loaders",... | // load data to dst struct from f according to format | [
"load",
"data",
"to",
"dst",
"struct",
"from",
"f",
"according",
"to",
"format"
] | c937b9e05d299400e95143a433836214a6ffa649 | https://github.com/bearded-web/bearded/blob/c937b9e05d299400e95143a433836214a6ffa649/pkg/utils/load/load.go#L57-L65 |
153,627 | bearded-web/bearded | pkg/utils/load/load.go | FromFile | func FromFile(filename string, dst interface{}, opts ...Opts) error {
return DefaultLoader.FromFile(filename, dst, opts...)
} | go | func FromFile(filename string, dst interface{}, opts ...Opts) error {
return DefaultLoader.FromFile(filename, dst, opts...)
} | [
"func",
"FromFile",
"(",
"filename",
"string",
",",
"dst",
"interface",
"{",
"}",
",",
"opts",
"...",
"Opts",
")",
"error",
"{",
"return",
"DefaultLoader",
".",
"FromFile",
"(",
"filename",
",",
"dst",
",",
"opts",
"...",
")",
"\n",
"}"
] | // load data to dst struct from file according to format with default loader | [
"load",
"data",
"to",
"dst",
"struct",
"from",
"file",
"according",
"to",
"format",
"with",
"default",
"loader"
] | c937b9e05d299400e95143a433836214a6ffa649 | https://github.com/bearded-web/bearded/blob/c937b9e05d299400e95143a433836214a6ffa649/pkg/utils/load/load.go#L83-L85 |
153,628 | bearded-web/bearded | pkg/utils/load/load.go | FromReader | func FromReader(r io.Reader, dst interface{}, format Format) error {
return DefaultLoader.FromReader(r, dst, format)
} | go | func FromReader(r io.Reader, dst interface{}, format Format) error {
return DefaultLoader.FromReader(r, dst, format)
} | [
"func",
"FromReader",
"(",
"r",
"io",
".",
"Reader",
",",
"dst",
"interface",
"{",
"}",
",",
"format",
"Format",
")",
"error",
"{",
"return",
"DefaultLoader",
".",
"FromReader",
"(",
"r",
",",
"dst",
",",
"format",
")",
"\n\n",
"}"
] | // load data to dst struct from f according to format with default loader | [
"load",
"data",
"to",
"dst",
"struct",
"from",
"f",
"according",
"to",
"format",
"with",
"default",
"loader"
] | c937b9e05d299400e95143a433836214a6ffa649 | https://github.com/bearded-web/bearded/blob/c937b9e05d299400e95143a433836214a6ffa649/pkg/utils/load/load.go#L88-L91 |
153,629 | thecodeteam/gorackhd | client/nodes/delete_nodes_identifier_parameters.go | WithIdentifier | func (o *DeleteNodesIdentifierParams) WithIdentifier(identifier string) *DeleteNodesIdentifierParams {
o.Identifier = identifier
return o
} | go | func (o *DeleteNodesIdentifierParams) WithIdentifier(identifier string) *DeleteNodesIdentifierParams {
o.Identifier = identifier
return o
} | [
"func",
"(",
"o",
"*",
"DeleteNodesIdentifierParams",
")",
"WithIdentifier",
"(",
"identifier",
"string",
")",
"*",
"DeleteNodesIdentifierParams",
"{",
"o",
".",
"Identifier",
"=",
"identifier",
"\n",
"return",
"o",
"\n",
"}"
] | // WithIdentifier adds the identifier to the delete nodes identifier params | [
"WithIdentifier",
"adds",
"the",
"identifier",
"to",
"the",
"delete",
"nodes",
"identifier",
"params"
] | 66bd88ab29593b880ba59b35db2c17a4b4bab1f1 | https://github.com/thecodeteam/gorackhd/blob/66bd88ab29593b880ba59b35db2c17a4b4bab1f1/client/nodes/delete_nodes_identifier_parameters.go#L53-L56 |
153,630 | thecodeteam/gorackhd | client/get/get_skus_identifier_nodes_parameters.go | WithIdentifier | func (o *GetSkusIdentifierNodesParams) WithIdentifier(identifier string) *GetSkusIdentifierNodesParams {
o.Identifier = identifier
return o
} | go | func (o *GetSkusIdentifierNodesParams) WithIdentifier(identifier string) *GetSkusIdentifierNodesParams {
o.Identifier = identifier
return o
} | [
"func",
"(",
"o",
"*",
"GetSkusIdentifierNodesParams",
")",
"WithIdentifier",
"(",
"identifier",
"string",
")",
"*",
"GetSkusIdentifierNodesParams",
"{",
"o",
".",
"Identifier",
"=",
"identifier",
"\n",
"return",
"o",
"\n",
"}"
] | // WithIdentifier adds the identifier to the get skus identifier nodes params | [
"WithIdentifier",
"adds",
"the",
"identifier",
"to",
"the",
"get",
"skus",
"identifier",
"nodes",
"params"
] | 66bd88ab29593b880ba59b35db2c17a4b4bab1f1 | https://github.com/thecodeteam/gorackhd/blob/66bd88ab29593b880ba59b35db2c17a4b4bab1f1/client/get/get_skus_identifier_nodes_parameters.go#L52-L55 |
153,631 | thecodeteam/gorackhd | client/get/get_nodes_identifier_tags_parameters.go | WithIdentifier | func (o *GetNodesIdentifierTagsParams) WithIdentifier(identifier string) *GetNodesIdentifierTagsParams {
o.Identifier = identifier
return o
} | go | func (o *GetNodesIdentifierTagsParams) WithIdentifier(identifier string) *GetNodesIdentifierTagsParams {
o.Identifier = identifier
return o
} | [
"func",
"(",
"o",
"*",
"GetNodesIdentifierTagsParams",
")",
"WithIdentifier",
"(",
"identifier",
"string",
")",
"*",
"GetNodesIdentifierTagsParams",
"{",
"o",
".",
"Identifier",
"=",
"identifier",
"\n",
"return",
"o",
"\n",
"}"
] | // WithIdentifier adds the identifier to the get nodes identifier tags params | [
"WithIdentifier",
"adds",
"the",
"identifier",
"to",
"the",
"get",
"nodes",
"identifier",
"tags",
"params"
] | 66bd88ab29593b880ba59b35db2c17a4b4bab1f1 | https://github.com/thecodeteam/gorackhd/blob/66bd88ab29593b880ba59b35db2c17a4b4bab1f1/client/get/get_nodes_identifier_tags_parameters.go#L52-L55 |
153,632 | thecodeteam/gorackhd | client/profiles/put_profiles_library_identifier_parameters.go | WithIdentifier | func (o *PutProfilesLibraryIdentifierParams) WithIdentifier(identifier string) *PutProfilesLibraryIdentifierParams {
o.Identifier = identifier
return o
} | go | func (o *PutProfilesLibraryIdentifierParams) WithIdentifier(identifier string) *PutProfilesLibraryIdentifierParams {
o.Identifier = identifier
return o
} | [
"func",
"(",
"o",
"*",
"PutProfilesLibraryIdentifierParams",
")",
"WithIdentifier",
"(",
"identifier",
"string",
")",
"*",
"PutProfilesLibraryIdentifierParams",
"{",
"o",
".",
"Identifier",
"=",
"identifier",
"\n",
"return",
"o",
"\n",
"}"
] | // WithIdentifier adds the identifier to the put profiles library identifier params | [
"WithIdentifier",
"adds",
"the",
"identifier",
"to",
"the",
"put",
"profiles",
"library",
"identifier",
"params"
] | 66bd88ab29593b880ba59b35db2c17a4b4bab1f1 | https://github.com/thecodeteam/gorackhd/blob/66bd88ab29593b880ba59b35db2c17a4b4bab1f1/client/profiles/put_profiles_library_identifier_parameters.go#L52-L55 |
153,633 | bearded-web/bearded | services/tech/entity.go | updateTargetTech | func updateTargetTech(raw *TargetTechEntity, dst *tech.TargetTech) {
if raw.Name != nil {
dst.Name = *raw.Name
}
if raw.Url != nil {
dst.Url = *raw.Url
}
if raw.Version != nil {
dst.Version = *raw.Version
}
if raw.Confidence != nil {
dst.Confidence = *raw.Confidence
}
if raw.Categories != nil {
dst.Categories = []tech.Category{}
for _, cat := range *raw.Categories {
dst.Categories = append(dst.Categories, tech.Category(cat))
}
}
if raw.Status != "" && (raw.Status == tech.StatusCorrect ||
raw.Status == tech.StatusIncorrect ||
raw.Status == tech.StatusUnknown) {
dst.Status = raw.Status
}
} | go | func updateTargetTech(raw *TargetTechEntity, dst *tech.TargetTech) {
if raw.Name != nil {
dst.Name = *raw.Name
}
if raw.Url != nil {
dst.Url = *raw.Url
}
if raw.Version != nil {
dst.Version = *raw.Version
}
if raw.Confidence != nil {
dst.Confidence = *raw.Confidence
}
if raw.Categories != nil {
dst.Categories = []tech.Category{}
for _, cat := range *raw.Categories {
dst.Categories = append(dst.Categories, tech.Category(cat))
}
}
if raw.Status != "" && (raw.Status == tech.StatusCorrect ||
raw.Status == tech.StatusIncorrect ||
raw.Status == tech.StatusUnknown) {
dst.Status = raw.Status
}
} | [
"func",
"updateTargetTech",
"(",
"raw",
"*",
"TargetTechEntity",
",",
"dst",
"*",
"tech",
".",
"TargetTech",
")",
"{",
"if",
"raw",
".",
"Name",
"!=",
"nil",
"{",
"dst",
".",
"Name",
"=",
"*",
"raw",
".",
"Name",
"\n",
"}",
"\n",
"if",
"raw",
".",
... | // Update all fields for dst with entity data if they present | [
"Update",
"all",
"fields",
"for",
"dst",
"with",
"entity",
"data",
"if",
"they",
"present"
] | c937b9e05d299400e95143a433836214a6ffa649 | https://github.com/bearded-web/bearded/blob/c937b9e05d299400e95143a433836214a6ffa649/services/tech/entity.go#L23-L48 |
153,634 | thecodeteam/gorackhd | client/lookups/get_lookups_id_parameters.go | WithID | func (o *GetLookupsIDParams) WithID(id string) *GetLookupsIDParams {
o.ID = id
return o
} | go | func (o *GetLookupsIDParams) WithID(id string) *GetLookupsIDParams {
o.ID = id
return o
} | [
"func",
"(",
"o",
"*",
"GetLookupsIDParams",
")",
"WithID",
"(",
"id",
"string",
")",
"*",
"GetLookupsIDParams",
"{",
"o",
".",
"ID",
"=",
"id",
"\n",
"return",
"o",
"\n",
"}"
] | // WithID adds the id to the get lookups ID params | [
"WithID",
"adds",
"the",
"id",
"to",
"the",
"get",
"lookups",
"ID",
"params"
] | 66bd88ab29593b880ba59b35db2c17a4b4bab1f1 | https://github.com/thecodeteam/gorackhd/blob/66bd88ab29593b880ba59b35db2c17a4b4bab1f1/client/lookups/get_lookups_id_parameters.go#L51-L54 |
153,635 | bearded-web/bearded | services/issue/entity.go | updateTargetIssue | func updateTargetIssue(raw *TargetIssueEntity, dst *issue.TargetIssue) bool {
rebuildSummary := false
if raw.Summary != nil {
dst.Summary = *raw.Summary
}
if raw.Desc != nil {
dst.Desc = *raw.Desc
}
if raw.References != nil {
dst.References = raw.References
}
if raw.VulnType != nil {
dst.VulnType = *raw.VulnType
}
if raw.Vector != nil {
dst.Vector = raw.Vector.Transform()
}
if raw.Confirmed != nil {
dst.Confirmed = *raw.Confirmed
}
if raw.False != nil {
rebuildSummary = true
dst.False = *raw.False
}
if raw.Resolved != nil {
rebuildSummary = true
dst.Resolved = *raw.Resolved
if *raw.Resolved {
dst.ResolvedAt = time.Now()
} else {
dst.ResolvedAt = time.Time{}
}
}
if raw.Muted != nil {
rebuildSummary = true
dst.Muted = *raw.Muted
}
if raw.Severity != nil {
if isValidSeverity(*raw.Severity) {
rebuildSummary = true
dst.Severity = *raw.Severity
}
}
return rebuildSummary
} | go | func updateTargetIssue(raw *TargetIssueEntity, dst *issue.TargetIssue) bool {
rebuildSummary := false
if raw.Summary != nil {
dst.Summary = *raw.Summary
}
if raw.Desc != nil {
dst.Desc = *raw.Desc
}
if raw.References != nil {
dst.References = raw.References
}
if raw.VulnType != nil {
dst.VulnType = *raw.VulnType
}
if raw.Vector != nil {
dst.Vector = raw.Vector.Transform()
}
if raw.Confirmed != nil {
dst.Confirmed = *raw.Confirmed
}
if raw.False != nil {
rebuildSummary = true
dst.False = *raw.False
}
if raw.Resolved != nil {
rebuildSummary = true
dst.Resolved = *raw.Resolved
if *raw.Resolved {
dst.ResolvedAt = time.Now()
} else {
dst.ResolvedAt = time.Time{}
}
}
if raw.Muted != nil {
rebuildSummary = true
dst.Muted = *raw.Muted
}
if raw.Severity != nil {
if isValidSeverity(*raw.Severity) {
rebuildSummary = true
dst.Severity = *raw.Severity
}
}
return rebuildSummary
} | [
"func",
"updateTargetIssue",
"(",
"raw",
"*",
"TargetIssueEntity",
",",
"dst",
"*",
"issue",
".",
"TargetIssue",
")",
"bool",
"{",
"rebuildSummary",
":=",
"false",
"\n",
"if",
"raw",
".",
"Summary",
"!=",
"nil",
"{",
"dst",
".",
"Summary",
"=",
"*",
"raw... | // Update all fields for dst with entity data if they present
// Return true if target should rebuild summary for issues | [
"Update",
"all",
"fields",
"for",
"dst",
"with",
"entity",
"data",
"if",
"they",
"present",
"Return",
"true",
"if",
"target",
"should",
"rebuild",
"summary",
"for",
"issues"
] | c937b9e05d299400e95143a433836214a6ffa649 | https://github.com/bearded-web/bearded/blob/c937b9e05d299400e95143a433836214a6ffa649/services/issue/entity.go#L121-L165 |
153,636 | bearded-web/bearded | pkg/filters/auth.go | GetUser | func GetUser(req *restful.Request) *user.User {
raw := req.Attribute(AttrUserKey)
if raw == nil {
panic("GetUser attribute is nil")
}
u, ok := raw.(*user.User)
if !ok {
panic(fmt.Sprintf("GetUser attribute isn't a user type, but %#v", raw))
}
return u
} | go | func GetUser(req *restful.Request) *user.User {
raw := req.Attribute(AttrUserKey)
if raw == nil {
panic("GetUser attribute is nil")
}
u, ok := raw.(*user.User)
if !ok {
panic(fmt.Sprintf("GetUser attribute isn't a user type, but %#v", raw))
}
return u
} | [
"func",
"GetUser",
"(",
"req",
"*",
"restful",
".",
"Request",
")",
"*",
"user",
".",
"User",
"{",
"raw",
":=",
"req",
".",
"Attribute",
"(",
"AttrUserKey",
")",
"\n",
"if",
"raw",
"==",
"nil",
"{",
"panic",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n",... | // Get user from restful.Request attribute or panic | [
"Get",
"user",
"from",
"restful",
".",
"Request",
"attribute",
"or",
"panic"
] | c937b9e05d299400e95143a433836214a6ffa649 | https://github.com/bearded-web/bearded/blob/c937b9e05d299400e95143a433836214a6ffa649/pkg/filters/auth.go#L58-L68 |
153,637 | bearded-web/bearded | Godeps/_workspace/src/golang.org/x/crypto/bcrypt/bcrypt.go | GenerateFromPassword | func GenerateFromPassword(password []byte, cost int) ([]byte, error) {
p, err := newFromPassword(password, cost)
if err != nil {
return nil, err
}
return p.Hash(), nil
} | go | func GenerateFromPassword(password []byte, cost int) ([]byte, error) {
p, err := newFromPassword(password, cost)
if err != nil {
return nil, err
}
return p.Hash(), nil
} | [
"func",
"GenerateFromPassword",
"(",
"password",
"[",
"]",
"byte",
",",
"cost",
"int",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"p",
",",
"err",
":=",
"newFromPassword",
"(",
"password",
",",
"cost",
")",
"\n",
"if",
"err",
"!=",
"nil",
... | // GenerateFromPassword returns the bcrypt hash of the password at the given
// cost. If the cost given is less than MinCost, the cost will be set to
// DefaultCost, instead. Use CompareHashAndPassword, as defined in this package,
// to compare the returned hashed password with its cleartext version. | [
"GenerateFromPassword",
"returns",
"the",
"bcrypt",
"hash",
"of",
"the",
"password",
"at",
"the",
"given",
"cost",
".",
"If",
"the",
"cost",
"given",
"is",
"less",
"than",
"MinCost",
"the",
"cost",
"will",
"be",
"set",
"to",
"DefaultCost",
"instead",
".",
... | c937b9e05d299400e95143a433836214a6ffa649 | https://github.com/bearded-web/bearded/blob/c937b9e05d299400e95143a433836214a6ffa649/Godeps/_workspace/src/golang.org/x/crypto/bcrypt/bcrypt.go#L88-L94 |
153,638 | thecodeteam/gorackhd | client/files/put_files_fileidentifier_parameters.go | WithFileidentifier | func (o *PutFilesFileidentifierParams) WithFileidentifier(fileidentifier string) *PutFilesFileidentifierParams {
o.Fileidentifier = fileidentifier
return o
} | go | func (o *PutFilesFileidentifierParams) WithFileidentifier(fileidentifier string) *PutFilesFileidentifierParams {
o.Fileidentifier = fileidentifier
return o
} | [
"func",
"(",
"o",
"*",
"PutFilesFileidentifierParams",
")",
"WithFileidentifier",
"(",
"fileidentifier",
"string",
")",
"*",
"PutFilesFileidentifierParams",
"{",
"o",
".",
"Fileidentifier",
"=",
"fileidentifier",
"\n",
"return",
"o",
"\n",
"}"
] | // WithFileidentifier adds the fileidentifier to the put files fileidentifier params | [
"WithFileidentifier",
"adds",
"the",
"fileidentifier",
"to",
"the",
"put",
"files",
"fileidentifier",
"params"
] | 66bd88ab29593b880ba59b35db2c17a4b4bab1f1 | https://github.com/thecodeteam/gorackhd/blob/66bd88ab29593b880ba59b35db2c17a4b4bab1f1/client/files/put_files_fileidentifier_parameters.go#L51-L54 |
153,639 | bearded-web/bearded | Godeps/_workspace/src/golang.org/x/crypto/blowfish/cipher.go | Decrypt | func (c *Cipher) Decrypt(dst, src []byte) {
l := uint32(src[0])<<24 | uint32(src[1])<<16 | uint32(src[2])<<8 | uint32(src[3])
r := uint32(src[4])<<24 | uint32(src[5])<<16 | uint32(src[6])<<8 | uint32(src[7])
l, r = decryptBlock(l, r, c)
dst[0], dst[1], dst[2], dst[3] = byte(l>>24), byte(l>>16), byte(l>>8), byte(l)
dst[4], dst[5], dst[6], dst[7] = byte(r>>24), byte(r>>16), byte(r>>8), byte(r)
} | go | func (c *Cipher) Decrypt(dst, src []byte) {
l := uint32(src[0])<<24 | uint32(src[1])<<16 | uint32(src[2])<<8 | uint32(src[3])
r := uint32(src[4])<<24 | uint32(src[5])<<16 | uint32(src[6])<<8 | uint32(src[7])
l, r = decryptBlock(l, r, c)
dst[0], dst[1], dst[2], dst[3] = byte(l>>24), byte(l>>16), byte(l>>8), byte(l)
dst[4], dst[5], dst[6], dst[7] = byte(r>>24), byte(r>>16), byte(r>>8), byte(r)
} | [
"func",
"(",
"c",
"*",
"Cipher",
")",
"Decrypt",
"(",
"dst",
",",
"src",
"[",
"]",
"byte",
")",
"{",
"l",
":=",
"uint32",
"(",
"src",
"[",
"0",
"]",
")",
"<<",
"24",
"|",
"uint32",
"(",
"src",
"[",
"1",
"]",
")",
"<<",
"16",
"|",
"uint32",
... | // Decrypt decrypts the 8-byte buffer src using the key k
// and stores the result in dst. | [
"Decrypt",
"decrypts",
"the",
"8",
"-",
"byte",
"buffer",
"src",
"using",
"the",
"key",
"k",
"and",
"stores",
"the",
"result",
"in",
"dst",
"."
] | c937b9e05d299400e95143a433836214a6ffa649 | https://github.com/bearded-web/bearded/blob/c937b9e05d299400e95143a433836214a6ffa649/Godeps/_workspace/src/golang.org/x/crypto/blowfish/cipher.go#L77-L83 |
153,640 | thecodeteam/gorackhd | client/get/get_templates_library_identifier_parameters.go | WithIdentifier | func (o *GetTemplatesLibraryIdentifierParams) WithIdentifier(identifier string) *GetTemplatesLibraryIdentifierParams {
o.Identifier = identifier
return o
} | go | func (o *GetTemplatesLibraryIdentifierParams) WithIdentifier(identifier string) *GetTemplatesLibraryIdentifierParams {
o.Identifier = identifier
return o
} | [
"func",
"(",
"o",
"*",
"GetTemplatesLibraryIdentifierParams",
")",
"WithIdentifier",
"(",
"identifier",
"string",
")",
"*",
"GetTemplatesLibraryIdentifierParams",
"{",
"o",
".",
"Identifier",
"=",
"identifier",
"\n",
"return",
"o",
"\n",
"}"
] | // WithIdentifier adds the identifier to the get templates library identifier params | [
"WithIdentifier",
"adds",
"the",
"identifier",
"to",
"the",
"get",
"templates",
"library",
"identifier",
"params"
] | 66bd88ab29593b880ba59b35db2c17a4b4bab1f1 | https://github.com/thecodeteam/gorackhd/blob/66bd88ab29593b880ba59b35db2c17a4b4bab1f1/client/get/get_templates_library_identifier_parameters.go#L52-L55 |
153,641 | thecodeteam/gorackhd | client/delete/delete_dhcp_lease_mac_parameters.go | WithMac | func (o *DeleteDhcpLeaseMacParams) WithMac(mac string) *DeleteDhcpLeaseMacParams {
o.Mac = mac
return o
} | go | func (o *DeleteDhcpLeaseMacParams) WithMac(mac string) *DeleteDhcpLeaseMacParams {
o.Mac = mac
return o
} | [
"func",
"(",
"o",
"*",
"DeleteDhcpLeaseMacParams",
")",
"WithMac",
"(",
"mac",
"string",
")",
"*",
"DeleteDhcpLeaseMacParams",
"{",
"o",
".",
"Mac",
"=",
"mac",
"\n",
"return",
"o",
"\n",
"}"
] | // WithMac adds the mac to the delete dhcp lease mac params | [
"WithMac",
"adds",
"the",
"mac",
"to",
"the",
"delete",
"dhcp",
"lease",
"mac",
"params"
] | 66bd88ab29593b880ba59b35db2c17a4b4bab1f1 | https://github.com/thecodeteam/gorackhd/blob/66bd88ab29593b880ba59b35db2c17a4b4bab1f1/client/delete/delete_dhcp_lease_mac_parameters.go#L51-L54 |
153,642 | bearded-web/bearded | pkg/script/remote_client.go | NewRemoteClient | func NewRemoteClient(transport transport.Transport) (*RemoteClient, error) {
return &RemoteClient{
transp: transport,
connected: make(chan struct{}, 1),
}, nil
} | go | func NewRemoteClient(transport transport.Transport) (*RemoteClient, error) {
return &RemoteClient{
transp: transport,
connected: make(chan struct{}, 1),
}, nil
} | [
"func",
"NewRemoteClient",
"(",
"transport",
"transport",
".",
"Transport",
")",
"(",
"*",
"RemoteClient",
",",
"error",
")",
"{",
"return",
"&",
"RemoteClient",
"{",
"transp",
":",
"transport",
",",
"connected",
":",
"make",
"(",
"chan",
"struct",
"{",
"}... | // Remote client helps communicate plugins with agent through transport | [
"Remote",
"client",
"helps",
"communicate",
"plugins",
"with",
"agent",
"through",
"transport"
] | c937b9e05d299400e95143a433836214a6ffa649 | https://github.com/bearded-web/bearded/blob/c937b9e05d299400e95143a433836214a6ffa649/pkg/script/remote_client.go#L24-L29 |
153,643 | thecodeteam/gorackhd | client/get/get_nodes_identifier_parameters.go | WithIdentifier | func (o *GetNodesIdentifierParams) WithIdentifier(identifier string) *GetNodesIdentifierParams {
o.Identifier = identifier
return o
} | go | func (o *GetNodesIdentifierParams) WithIdentifier(identifier string) *GetNodesIdentifierParams {
o.Identifier = identifier
return o
} | [
"func",
"(",
"o",
"*",
"GetNodesIdentifierParams",
")",
"WithIdentifier",
"(",
"identifier",
"string",
")",
"*",
"GetNodesIdentifierParams",
"{",
"o",
".",
"Identifier",
"=",
"identifier",
"\n",
"return",
"o",
"\n",
"}"
] | // WithIdentifier adds the identifier to the get nodes identifier params | [
"WithIdentifier",
"adds",
"the",
"identifier",
"to",
"the",
"get",
"nodes",
"identifier",
"params"
] | 66bd88ab29593b880ba59b35db2c17a4b4bab1f1 | https://github.com/thecodeteam/gorackhd/blob/66bd88ab29593b880ba59b35db2c17a4b4bab1f1/client/get/get_nodes_identifier_parameters.go#L53-L56 |
153,644 | thecodeteam/gorackhd | client/patch/patch_pollers_identifier_parameters.go | WithIdentifier | func (o *PatchPollersIdentifierParams) WithIdentifier(identifier string) *PatchPollersIdentifierParams {
o.Identifier = identifier
return o
} | go | func (o *PatchPollersIdentifierParams) WithIdentifier(identifier string) *PatchPollersIdentifierParams {
o.Identifier = identifier
return o
} | [
"func",
"(",
"o",
"*",
"PatchPollersIdentifierParams",
")",
"WithIdentifier",
"(",
"identifier",
"string",
")",
"*",
"PatchPollersIdentifierParams",
"{",
"o",
".",
"Identifier",
"=",
"identifier",
"\n",
"return",
"o",
"\n",
"}"
] | // WithIdentifier adds the identifier to the patch pollers identifier params | [
"WithIdentifier",
"adds",
"the",
"identifier",
"to",
"the",
"patch",
"pollers",
"identifier",
"params"
] | 66bd88ab29593b880ba59b35db2c17a4b4bab1f1 | https://github.com/thecodeteam/gorackhd/blob/66bd88ab29593b880ba59b35db2c17a4b4bab1f1/client/patch/patch_pollers_identifier_parameters.go#L52-L55 |
153,645 | thecodeteam/gorackhd | client/nodes/delete_nodes_macaddress_dhcp_whitelist_parameters.go | WithMacaddress | func (o *DeleteNodesMacaddressDhcpWhitelistParams) WithMacaddress(macaddress string) *DeleteNodesMacaddressDhcpWhitelistParams {
o.Macaddress = macaddress
return o
} | go | func (o *DeleteNodesMacaddressDhcpWhitelistParams) WithMacaddress(macaddress string) *DeleteNodesMacaddressDhcpWhitelistParams {
o.Macaddress = macaddress
return o
} | [
"func",
"(",
"o",
"*",
"DeleteNodesMacaddressDhcpWhitelistParams",
")",
"WithMacaddress",
"(",
"macaddress",
"string",
")",
"*",
"DeleteNodesMacaddressDhcpWhitelistParams",
"{",
"o",
".",
"Macaddress",
"=",
"macaddress",
"\n",
"return",
"o",
"\n",
"}"
] | // WithMacaddress adds the macaddress to the delete nodes macaddress dhcp whitelist params | [
"WithMacaddress",
"adds",
"the",
"macaddress",
"to",
"the",
"delete",
"nodes",
"macaddress",
"dhcp",
"whitelist",
"params"
] | 66bd88ab29593b880ba59b35db2c17a4b4bab1f1 | https://github.com/thecodeteam/gorackhd/blob/66bd88ab29593b880ba59b35db2c17a4b4bab1f1/client/nodes/delete_nodes_macaddress_dhcp_whitelist_parameters.go#L53-L56 |
153,646 | thecodeteam/gorackhd | client/obm/get_nodes_identifier_obm_identify_parameters.go | WithIdentifier | func (o *GetNodesIdentifierObmIdentifyParams) WithIdentifier(identifier string) *GetNodesIdentifierObmIdentifyParams {
o.Identifier = identifier
return o
} | go | func (o *GetNodesIdentifierObmIdentifyParams) WithIdentifier(identifier string) *GetNodesIdentifierObmIdentifyParams {
o.Identifier = identifier
return o
} | [
"func",
"(",
"o",
"*",
"GetNodesIdentifierObmIdentifyParams",
")",
"WithIdentifier",
"(",
"identifier",
"string",
")",
"*",
"GetNodesIdentifierObmIdentifyParams",
"{",
"o",
".",
"Identifier",
"=",
"identifier",
"\n",
"return",
"o",
"\n",
"}"
] | // WithIdentifier adds the identifier to the get nodes identifier obm identify params | [
"WithIdentifier",
"adds",
"the",
"identifier",
"to",
"the",
"get",
"nodes",
"identifier",
"obm",
"identify",
"params"
] | 66bd88ab29593b880ba59b35db2c17a4b4bab1f1 | https://github.com/thecodeteam/gorackhd/blob/66bd88ab29593b880ba59b35db2c17a4b4bab1f1/client/obm/get_nodes_identifier_obm_identify_parameters.go#L53-L56 |
153,647 | thecodeteam/gorackhd | client/profiles/get_profiles_library_identifier_parameters.go | WithIdentifier | func (o *GetProfilesLibraryIdentifierParams) WithIdentifier(identifier string) *GetProfilesLibraryIdentifierParams {
o.Identifier = identifier
return o
} | go | func (o *GetProfilesLibraryIdentifierParams) WithIdentifier(identifier string) *GetProfilesLibraryIdentifierParams {
o.Identifier = identifier
return o
} | [
"func",
"(",
"o",
"*",
"GetProfilesLibraryIdentifierParams",
")",
"WithIdentifier",
"(",
"identifier",
"string",
")",
"*",
"GetProfilesLibraryIdentifierParams",
"{",
"o",
".",
"Identifier",
"=",
"identifier",
"\n",
"return",
"o",
"\n",
"}"
] | // WithIdentifier adds the identifier to the get profiles library identifier params | [
"WithIdentifier",
"adds",
"the",
"identifier",
"to",
"the",
"get",
"profiles",
"library",
"identifier",
"params"
] | 66bd88ab29593b880ba59b35db2c17a4b4bab1f1 | https://github.com/thecodeteam/gorackhd/blob/66bd88ab29593b880ba59b35db2c17a4b4bab1f1/client/profiles/get_profiles_library_identifier_parameters.go#L52-L55 |
153,648 | thecodeteam/gorackhd | models/lease.go | Validate | func (m *Lease) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateIPAddress(formats); err != nil {
// prop
res = append(res, err)
}
if err := m.validateMac(formats); err != nil {
// prop
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
} | go | func (m *Lease) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateIPAddress(formats); err != nil {
// prop
res = append(res, err)
}
if err := m.validateMac(formats); err != nil {
// prop
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
} | [
"func",
"(",
"m",
"*",
"Lease",
")",
"Validate",
"(",
"formats",
"strfmt",
".",
"Registry",
")",
"error",
"{",
"var",
"res",
"[",
"]",
"error",
"\n\n",
"if",
"err",
":=",
"m",
".",
"validateIPAddress",
"(",
"formats",
")",
";",
"err",
"!=",
"nil",
... | // Validate validates this lease | [
"Validate",
"validates",
"this",
"lease"
] | 66bd88ab29593b880ba59b35db2c17a4b4bab1f1 | https://github.com/thecodeteam/gorackhd/blob/66bd88ab29593b880ba59b35db2c17a4b4bab1f1/models/lease.go#L77-L94 |
153,649 | bearded-web/bearded | pkg/client/plans.go | List | func (s *PlansService) List(ctx context.Context, opt *PlansListOpts) (*plan.PlanList, error) {
planList := &plan.PlanList{}
return planList, s.client.List(ctx, plansUrl, opt, planList)
} | go | func (s *PlansService) List(ctx context.Context, opt *PlansListOpts) (*plan.PlanList, error) {
planList := &plan.PlanList{}
return planList, s.client.List(ctx, plansUrl, opt, planList)
} | [
"func",
"(",
"s",
"*",
"PlansService",
")",
"List",
"(",
"ctx",
"context",
".",
"Context",
",",
"opt",
"*",
"PlansListOpts",
")",
"(",
"*",
"plan",
".",
"PlanList",
",",
"error",
")",
"{",
"planList",
":=",
"&",
"plan",
".",
"PlanList",
"{",
"}",
"... | // List plans.
//
// | [
"List",
"plans",
"."
] | c937b9e05d299400e95143a433836214a6ffa649 | https://github.com/bearded-web/bearded/blob/c937b9e05d299400e95143a433836214a6ffa649/pkg/client/plans.go#L27-L30 |
153,650 | thecodeteam/gorackhd | client/get/get_workflows_library_injectable_name_parameters.go | WithInjectableName | func (o *GetWorkflowsLibraryInjectableNameParams) WithInjectableName(injectableName string) *GetWorkflowsLibraryInjectableNameParams {
o.InjectableName = injectableName
return o
} | go | func (o *GetWorkflowsLibraryInjectableNameParams) WithInjectableName(injectableName string) *GetWorkflowsLibraryInjectableNameParams {
o.InjectableName = injectableName
return o
} | [
"func",
"(",
"o",
"*",
"GetWorkflowsLibraryInjectableNameParams",
")",
"WithInjectableName",
"(",
"injectableName",
"string",
")",
"*",
"GetWorkflowsLibraryInjectableNameParams",
"{",
"o",
".",
"InjectableName",
"=",
"injectableName",
"\n",
"return",
"o",
"\n",
"}"
] | // WithInjectableName adds the injectableName to the get workflows library injectable name params | [
"WithInjectableName",
"adds",
"the",
"injectableName",
"to",
"the",
"get",
"workflows",
"library",
"injectable",
"name",
"params"
] | 66bd88ab29593b880ba59b35db2c17a4b4bab1f1 | https://github.com/thecodeteam/gorackhd/blob/66bd88ab29593b880ba59b35db2c17a4b4bab1f1/client/get/get_workflows_library_injectable_name_parameters.go#L48-L51 |
153,651 | thecodeteam/gorackhd | client/lookups/get_lookups_parameters.go | WithQ | func (o *GetLookupsParams) WithQ(q *string) *GetLookupsParams {
o.Q = q
return o
} | go | func (o *GetLookupsParams) WithQ(q *string) *GetLookupsParams {
o.Q = q
return o
} | [
"func",
"(",
"o",
"*",
"GetLookupsParams",
")",
"WithQ",
"(",
"q",
"*",
"string",
")",
"*",
"GetLookupsParams",
"{",
"o",
".",
"Q",
"=",
"q",
"\n",
"return",
"o",
"\n",
"}"
] | // WithQ adds the q to the get lookups params | [
"WithQ",
"adds",
"the",
"q",
"to",
"the",
"get",
"lookups",
"params"
] | 66bd88ab29593b880ba59b35db2c17a4b4bab1f1 | https://github.com/thecodeteam/gorackhd/blob/66bd88ab29593b880ba59b35db2c17a4b4bab1f1/client/lookups/get_lookups_parameters.go#L51-L54 |
153,652 | thecodeteam/gorackhd | client/patch/patch_skus_identifier_parameters.go | WithIdentifier | func (o *PatchSkusIdentifierParams) WithIdentifier(identifier string) *PatchSkusIdentifierParams {
o.Identifier = identifier
return o
} | go | func (o *PatchSkusIdentifierParams) WithIdentifier(identifier string) *PatchSkusIdentifierParams {
o.Identifier = identifier
return o
} | [
"func",
"(",
"o",
"*",
"PatchSkusIdentifierParams",
")",
"WithIdentifier",
"(",
"identifier",
"string",
")",
"*",
"PatchSkusIdentifierParams",
"{",
"o",
".",
"Identifier",
"=",
"identifier",
"\n",
"return",
"o",
"\n",
"}"
] | // WithIdentifier adds the identifier to the patch skus identifier params | [
"WithIdentifier",
"adds",
"the",
"identifier",
"to",
"the",
"patch",
"skus",
"identifier",
"params"
] | 66bd88ab29593b880ba59b35db2c17a4b4bab1f1 | https://github.com/thecodeteam/gorackhd/blob/66bd88ab29593b880ba59b35db2c17a4b4bab1f1/client/patch/patch_skus_identifier_parameters.go#L52-L55 |
153,653 | thecodeteam/gorackhd | client/get/get_skus_identifier_parameters.go | WithIdentifier | func (o *GetSkusIdentifierParams) WithIdentifier(identifier string) *GetSkusIdentifierParams {
o.Identifier = identifier
return o
} | go | func (o *GetSkusIdentifierParams) WithIdentifier(identifier string) *GetSkusIdentifierParams {
o.Identifier = identifier
return o
} | [
"func",
"(",
"o",
"*",
"GetSkusIdentifierParams",
")",
"WithIdentifier",
"(",
"identifier",
"string",
")",
"*",
"GetSkusIdentifierParams",
"{",
"o",
".",
"Identifier",
"=",
"identifier",
"\n",
"return",
"o",
"\n",
"}"
] | // WithIdentifier adds the identifier to the get skus identifier params | [
"WithIdentifier",
"adds",
"the",
"identifier",
"to",
"the",
"get",
"skus",
"identifier",
"params"
] | 66bd88ab29593b880ba59b35db2c17a4b4bab1f1 | https://github.com/thecodeteam/gorackhd/blob/66bd88ab29593b880ba59b35db2c17a4b4bab1f1/client/get/get_skus_identifier_parameters.go#L52-L55 |
153,654 | thecodeteam/gorackhd | client/get/get_nodes_identifier_workflows_active_parameters.go | WithIdentifier | func (o *GetNodesIdentifierWorkflowsActiveParams) WithIdentifier(identifier string) *GetNodesIdentifierWorkflowsActiveParams {
o.Identifier = identifier
return o
} | go | func (o *GetNodesIdentifierWorkflowsActiveParams) WithIdentifier(identifier string) *GetNodesIdentifierWorkflowsActiveParams {
o.Identifier = identifier
return o
} | [
"func",
"(",
"o",
"*",
"GetNodesIdentifierWorkflowsActiveParams",
")",
"WithIdentifier",
"(",
"identifier",
"string",
")",
"*",
"GetNodesIdentifierWorkflowsActiveParams",
"{",
"o",
".",
"Identifier",
"=",
"identifier",
"\n",
"return",
"o",
"\n",
"}"
] | // WithIdentifier adds the identifier to the get nodes identifier workflows active params | [
"WithIdentifier",
"adds",
"the",
"identifier",
"to",
"the",
"get",
"nodes",
"identifier",
"workflows",
"active",
"params"
] | 66bd88ab29593b880ba59b35db2c17a4b4bab1f1 | https://github.com/thecodeteam/gorackhd/blob/66bd88ab29593b880ba59b35db2c17a4b4bab1f1/client/get/get_nodes_identifier_workflows_active_parameters.go#L53-L56 |
153,655 | bearded-web/bearded | Godeps/_workspace/src/golang.org/x/crypto/blowfish/block.go | getNextWord | func getNextWord(b []byte, pos *int) uint32 {
var w uint32
j := *pos
for i := 0; i < 4; i++ {
w = w<<8 | uint32(b[j])
j++
if j >= len(b) {
j = 0
}
}
*pos = j
return w
} | go | func getNextWord(b []byte, pos *int) uint32 {
var w uint32
j := *pos
for i := 0; i < 4; i++ {
w = w<<8 | uint32(b[j])
j++
if j >= len(b) {
j = 0
}
}
*pos = j
return w
} | [
"func",
"getNextWord",
"(",
"b",
"[",
"]",
"byte",
",",
"pos",
"*",
"int",
")",
"uint32",
"{",
"var",
"w",
"uint32",
"\n",
"j",
":=",
"*",
"pos",
"\n",
"for",
"i",
":=",
"0",
";",
"i",
"<",
"4",
";",
"i",
"++",
"{",
"w",
"=",
"w",
"<<",
"... | // getNextWord returns the next big-endian uint32 value from the byte slice
// at the given position in a circular manner, updating the position. | [
"getNextWord",
"returns",
"the",
"next",
"big",
"-",
"endian",
"uint32",
"value",
"from",
"the",
"byte",
"slice",
"at",
"the",
"given",
"position",
"in",
"a",
"circular",
"manner",
"updating",
"the",
"position",
"."
] | c937b9e05d299400e95143a433836214a6ffa649 | https://github.com/bearded-web/bearded/blob/c937b9e05d299400e95143a433836214a6ffa649/Godeps/_workspace/src/golang.org/x/crypto/blowfish/block.go#L9-L21 |
153,656 | bearded-web/bearded | pkg/client/client.go | List | func (c *Client) List(ctx context.Context, url string, opts interface{}, payload interface{}) error {
u, err := addOptions(url, opts)
if err != nil {
return err
}
req, err := c.NewRequest("GET", u, nil)
if err != nil {
return err
}
_, err = c.Do(ctx, req, payload)
return err
} | go | func (c *Client) List(ctx context.Context, url string, opts interface{}, payload interface{}) error {
u, err := addOptions(url, opts)
if err != nil {
return err
}
req, err := c.NewRequest("GET", u, nil)
if err != nil {
return err
}
_, err = c.Do(ctx, req, payload)
return err
} | [
"func",
"(",
"c",
"*",
"Client",
")",
"List",
"(",
"ctx",
"context",
".",
"Context",
",",
"url",
"string",
",",
"opts",
"interface",
"{",
"}",
",",
"payload",
"interface",
"{",
"}",
")",
"error",
"{",
"u",
",",
"err",
":=",
"addOptions",
"(",
"url"... | // Helper method to get a list of payload objects | [
"Helper",
"method",
"to",
"get",
"a",
"list",
"of",
"payload",
"objects"
] | c937b9e05d299400e95143a433836214a6ffa649 | https://github.com/bearded-web/bearded/blob/c937b9e05d299400e95143a433836214a6ffa649/pkg/client/client.go#L228-L241 |
153,657 | bearded-web/bearded | pkg/client/client.go | Get | func (c *Client) Get(ctx context.Context, url string, id string, payload interface{}) error {
url = fmt.Sprintf("%s/%s", url, id)
req, err := c.NewRequest("GET", url, nil)
if err != nil {
return err
}
_, err = c.Do(ctx, req, payload)
return err
} | go | func (c *Client) Get(ctx context.Context, url string, id string, payload interface{}) error {
url = fmt.Sprintf("%s/%s", url, id)
req, err := c.NewRequest("GET", url, nil)
if err != nil {
return err
}
_, err = c.Do(ctx, req, payload)
return err
} | [
"func",
"(",
"c",
"*",
"Client",
")",
"Get",
"(",
"ctx",
"context",
".",
"Context",
",",
"url",
"string",
",",
"id",
"string",
",",
"payload",
"interface",
"{",
"}",
")",
"error",
"{",
"url",
"=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"url... | // Helper method to get a resource by id | [
"Helper",
"method",
"to",
"get",
"a",
"resource",
"by",
"id"
] | c937b9e05d299400e95143a433836214a6ffa649 | https://github.com/bearded-web/bearded/blob/c937b9e05d299400e95143a433836214a6ffa649/pkg/client/client.go#L244-L253 |
153,658 | bearded-web/bearded | pkg/client/client.go | NewError | func NewError(code int, message string) ServiceError {
return ServiceError{Code: code, Message: message}
} | go | func NewError(code int, message string) ServiceError {
return ServiceError{Code: code, Message: message}
} | [
"func",
"NewError",
"(",
"code",
"int",
",",
"message",
"string",
")",
"ServiceError",
"{",
"return",
"ServiceError",
"{",
"Code",
":",
"code",
",",
"Message",
":",
"message",
"}",
"\n",
"}"
] | // NewError returns a ServiceError using the code and reason | [
"NewError",
"returns",
"a",
"ServiceError",
"using",
"the",
"code",
"and",
"reason"
] | c937b9e05d299400e95143a433836214a6ffa649 | https://github.com/bearded-web/bearded/blob/c937b9e05d299400e95143a433836214a6ffa649/pkg/client/client.go#L364-L366 |
153,659 | bearded-web/bearded | pkg/client/client.go | Error | func (s ServiceError) Error() string {
return fmt.Sprintf("[ServiceError:%v] %v", s.Code, s.Message)
} | go | func (s ServiceError) Error() string {
return fmt.Sprintf("[ServiceError:%v] %v", s.Code, s.Message)
} | [
"func",
"(",
"s",
"ServiceError",
")",
"Error",
"(",
")",
"string",
"{",
"return",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"s",
".",
"Code",
",",
"s",
".",
"Message",
")",
"\n",
"}"
] | // Error returns a text representation of the service error | [
"Error",
"returns",
"a",
"text",
"representation",
"of",
"the",
"service",
"error"
] | c937b9e05d299400e95143a433836214a6ffa649 | https://github.com/bearded-web/bearded/blob/c937b9e05d299400e95143a433836214a6ffa649/pkg/client/client.go#L369-L371 |
153,660 | thecodeteam/gorackhd | client/get/get_nodes_identifier_catalogs_source_parameters.go | WithIdentifier | func (o *GetNodesIdentifierCatalogsSourceParams) WithIdentifier(identifier string) *GetNodesIdentifierCatalogsSourceParams {
o.Identifier = identifier
return o
} | go | func (o *GetNodesIdentifierCatalogsSourceParams) WithIdentifier(identifier string) *GetNodesIdentifierCatalogsSourceParams {
o.Identifier = identifier
return o
} | [
"func",
"(",
"o",
"*",
"GetNodesIdentifierCatalogsSourceParams",
")",
"WithIdentifier",
"(",
"identifier",
"string",
")",
"*",
"GetNodesIdentifierCatalogsSourceParams",
"{",
"o",
".",
"Identifier",
"=",
"identifier",
"\n",
"return",
"o",
"\n",
"}"
] | // WithIdentifier adds the identifier to the get nodes identifier catalogs source params | [
"WithIdentifier",
"adds",
"the",
"identifier",
"to",
"the",
"get",
"nodes",
"identifier",
"catalogs",
"source",
"params"
] | 66bd88ab29593b880ba59b35db2c17a4b4bab1f1 | https://github.com/thecodeteam/gorackhd/blob/66bd88ab29593b880ba59b35db2c17a4b4bab1f1/client/get/get_nodes_identifier_catalogs_source_parameters.go#L59-L62 |
153,661 | thecodeteam/gorackhd | client/get/get_nodes_identifier_catalogs_source_parameters.go | WithSource | func (o *GetNodesIdentifierCatalogsSourceParams) WithSource(source string) *GetNodesIdentifierCatalogsSourceParams {
o.Source = source
return o
} | go | func (o *GetNodesIdentifierCatalogsSourceParams) WithSource(source string) *GetNodesIdentifierCatalogsSourceParams {
o.Source = source
return o
} | [
"func",
"(",
"o",
"*",
"GetNodesIdentifierCatalogsSourceParams",
")",
"WithSource",
"(",
"source",
"string",
")",
"*",
"GetNodesIdentifierCatalogsSourceParams",
"{",
"o",
".",
"Source",
"=",
"source",
"\n",
"return",
"o",
"\n",
"}"
] | // WithSource adds the source to the get nodes identifier catalogs source params | [
"WithSource",
"adds",
"the",
"source",
"to",
"the",
"get",
"nodes",
"identifier",
"catalogs",
"source",
"params"
] | 66bd88ab29593b880ba59b35db2c17a4b4bab1f1 | https://github.com/thecodeteam/gorackhd/blob/66bd88ab29593b880ba59b35db2c17a4b4bab1f1/client/get/get_nodes_identifier_catalogs_source_parameters.go#L65-L68 |
153,662 | bearded-web/bearded | pkg/client/scans.go | List | func (s *ScansService) List(ctx context.Context, opt *ScansListOpts) (*scan.ScanList, error) {
scanList := &scan.ScanList{}
return scanList, s.client.List(ctx, scansUrl, opt, scanList)
} | go | func (s *ScansService) List(ctx context.Context, opt *ScansListOpts) (*scan.ScanList, error) {
scanList := &scan.ScanList{}
return scanList, s.client.List(ctx, scansUrl, opt, scanList)
} | [
"func",
"(",
"s",
"*",
"ScansService",
")",
"List",
"(",
"ctx",
"context",
".",
"Context",
",",
"opt",
"*",
"ScansListOpts",
")",
"(",
"*",
"scan",
".",
"ScanList",
",",
"error",
")",
"{",
"scanList",
":=",
"&",
"scan",
".",
"ScanList",
"{",
"}",
"... | // List scans.
//
// | [
"List",
"scans",
"."
] | c937b9e05d299400e95143a433836214a6ffa649 | https://github.com/bearded-web/bearded/blob/c937b9e05d299400e95143a433836214a6ffa649/pkg/client/scans.go#L29-L32 |
153,663 | thecodeteam/gorackhd | client/nodes/delete_nodes_identifier_workflows_active_parameters.go | WithIdentifier | func (o *DeleteNodesIdentifierWorkflowsActiveParams) WithIdentifier(identifier string) *DeleteNodesIdentifierWorkflowsActiveParams {
o.Identifier = identifier
return o
} | go | func (o *DeleteNodesIdentifierWorkflowsActiveParams) WithIdentifier(identifier string) *DeleteNodesIdentifierWorkflowsActiveParams {
o.Identifier = identifier
return o
} | [
"func",
"(",
"o",
"*",
"DeleteNodesIdentifierWorkflowsActiveParams",
")",
"WithIdentifier",
"(",
"identifier",
"string",
")",
"*",
"DeleteNodesIdentifierWorkflowsActiveParams",
"{",
"o",
".",
"Identifier",
"=",
"identifier",
"\n",
"return",
"o",
"\n",
"}"
] | // WithIdentifier adds the identifier to the delete nodes identifier workflows active params | [
"WithIdentifier",
"adds",
"the",
"identifier",
"to",
"the",
"delete",
"nodes",
"identifier",
"workflows",
"active",
"params"
] | 66bd88ab29593b880ba59b35db2c17a4b4bab1f1 | https://github.com/thecodeteam/gorackhd/blob/66bd88ab29593b880ba59b35db2c17a4b4bab1f1/client/nodes/delete_nodes_identifier_workflows_active_parameters.go#L53-L56 |
153,664 | bearded-web/bearded | pkg/scheduler/scheduler.go | NewMemoryScheduler | func NewMemoryScheduler(mgr *manager.Manager) *MemoryScheduler {
return &MemoryScheduler{
scans: map[string]*scan.Scan{},
mgr: mgr,
}
} | go | func NewMemoryScheduler(mgr *manager.Manager) *MemoryScheduler {
return &MemoryScheduler{
scans: map[string]*scan.Scan{},
mgr: mgr,
}
} | [
"func",
"NewMemoryScheduler",
"(",
"mgr",
"*",
"manager",
".",
"Manager",
")",
"*",
"MemoryScheduler",
"{",
"return",
"&",
"MemoryScheduler",
"{",
"scans",
":",
"map",
"[",
"string",
"]",
"*",
"scan",
".",
"Scan",
"{",
"}",
",",
"mgr",
":",
"mgr",
",",... | // Memory scheduler is just a prototype of scheduler, it mustn't be used in production environment | [
"Memory",
"scheduler",
"is",
"just",
"a",
"prototype",
"of",
"scheduler",
"it",
"mustn",
"t",
"be",
"used",
"in",
"production",
"environment"
] | c937b9e05d299400e95143a433836214a6ffa649 | https://github.com/bearded-web/bearded/blob/c937b9e05d299400e95143a433836214a6ffa649/pkg/scheduler/scheduler.go#L29-L34 |
153,665 | thecodeteam/gorackhd | client/lookups/delete_lookups_id_parameters.go | WithID | func (o *DeleteLookupsIDParams) WithID(id string) *DeleteLookupsIDParams {
o.ID = id
return o
} | go | func (o *DeleteLookupsIDParams) WithID(id string) *DeleteLookupsIDParams {
o.ID = id
return o
} | [
"func",
"(",
"o",
"*",
"DeleteLookupsIDParams",
")",
"WithID",
"(",
"id",
"string",
")",
"*",
"DeleteLookupsIDParams",
"{",
"o",
".",
"ID",
"=",
"id",
"\n",
"return",
"o",
"\n",
"}"
] | // WithID adds the id to the delete lookups ID params | [
"WithID",
"adds",
"the",
"id",
"to",
"the",
"delete",
"lookups",
"ID",
"params"
] | 66bd88ab29593b880ba59b35db2c17a4b4bab1f1 | https://github.com/thecodeteam/gorackhd/blob/66bd88ab29593b880ba59b35db2c17a4b4bab1f1/client/lookups/delete_lookups_id_parameters.go#L51-L54 |
153,666 | veer66/mapkha | edge.go | IsBetterThan | func (edge *Edge) IsBetterThan(another *Edge) bool {
if edge == nil {
return false
}
if another == nil {
return true
}
if (edge.UnkCount < another.UnkCount) || ((edge.UnkCount == another.UnkCount) && (edge.WordCount < another.WordCount)) {
return true
}
return false
} | go | func (edge *Edge) IsBetterThan(another *Edge) bool {
if edge == nil {
return false
}
if another == nil {
return true
}
if (edge.UnkCount < another.UnkCount) || ((edge.UnkCount == another.UnkCount) && (edge.WordCount < another.WordCount)) {
return true
}
return false
} | [
"func",
"(",
"edge",
"*",
"Edge",
")",
"IsBetterThan",
"(",
"another",
"*",
"Edge",
")",
"bool",
"{",
"if",
"edge",
"==",
"nil",
"{",
"return",
"false",
"\n",
"}",
"\n\n",
"if",
"another",
"==",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"if"... | // IsBetterThan - comparing this edge to another edge | [
"IsBetterThan",
"-",
"comparing",
"this",
"edge",
"to",
"another",
"edge"
] | 4c22c721f2c6c6414a04849669688556d882f526 | https://github.com/veer66/mapkha/blob/4c22c721f2c6c6414a04849669688556d882f526/edge.go#L12-L26 |
153,667 | thecodeteam/gorackhd | client/patch/patch_nodes_identifier_parameters.go | WithIdentifier | func (o *PatchNodesIdentifierParams) WithIdentifier(identifier string) *PatchNodesIdentifierParams {
o.Identifier = identifier
return o
} | go | func (o *PatchNodesIdentifierParams) WithIdentifier(identifier string) *PatchNodesIdentifierParams {
o.Identifier = identifier
return o
} | [
"func",
"(",
"o",
"*",
"PatchNodesIdentifierParams",
")",
"WithIdentifier",
"(",
"identifier",
"string",
")",
"*",
"PatchNodesIdentifierParams",
"{",
"o",
".",
"Identifier",
"=",
"identifier",
"\n",
"return",
"o",
"\n",
"}"
] | // WithIdentifier adds the identifier to the patch nodes identifier params | [
"WithIdentifier",
"adds",
"the",
"identifier",
"to",
"the",
"patch",
"nodes",
"identifier",
"params"
] | 66bd88ab29593b880ba59b35db2c17a4b4bab1f1 | https://github.com/thecodeteam/gorackhd/blob/66bd88ab29593b880ba59b35db2c17a4b4bab1f1/client/patch/patch_nodes_identifier_parameters.go#L65-L68 |
153,668 | bearded-web/bearded | pkg/manager/manager.go | New | func New(db *mgo.Database, cfg ...ManagerConfig) *Manager {
m := &Manager{
db: db,
managers: []ManagerInterface{},
}
if len(cfg) > 0 {
m.Cfg = cfg[0]
}
// initialize different managers
m.Users = &UserManager{manager: m, col: db.C("users")}
m.Plugins = &PluginManager{manager: m, col: db.C("plugins")}
m.Projects = &ProjectManager{manager: m, col: db.C("projects")}
m.Targets = &TargetManager{manager: m, col: db.C("targets")}
m.Plans = &PlanManager{manager: m, col: db.C("plans")}
m.Scans = &ScanManager{manager: m, col: db.C("scans")}
m.Agents = &AgentManager{manager: m, col: db.C("agents")}
m.Reports = &ReportManager{manager: m, col: db.C("reports")}
m.Feed = &FeedManager{manager: m, col: db.C("feed")}
m.Files = &FileManager{manager: m, grid: db.GridFS("fs")}
m.Comments = &CommentManager{manager: m, col: db.C("comments")}
m.Issues = &IssueManager{manager: m, col: db.C("issues")}
m.Techs = &TechManager{manager: m, col: db.C("techs")}
m.Tokens = &TokenManager{manager: m, col: db.C("tokens")}
m.Permission = &PermissionManager{manager: m}
m.Vulndb = &VulndbManager{manager: m}
m.managers = append(m.managers,
m.Users,
m.Plugins,
m.Projects,
m.Targets,
m.Plans,
m.Scans,
m.Agents,
m.Reports,
m.Feed,
m.Files,
m.Comments,
m.Issues,
m.Techs,
m.Tokens,
m.Permission,
m.Vulndb,
)
return m
} | go | func New(db *mgo.Database, cfg ...ManagerConfig) *Manager {
m := &Manager{
db: db,
managers: []ManagerInterface{},
}
if len(cfg) > 0 {
m.Cfg = cfg[0]
}
// initialize different managers
m.Users = &UserManager{manager: m, col: db.C("users")}
m.Plugins = &PluginManager{manager: m, col: db.C("plugins")}
m.Projects = &ProjectManager{manager: m, col: db.C("projects")}
m.Targets = &TargetManager{manager: m, col: db.C("targets")}
m.Plans = &PlanManager{manager: m, col: db.C("plans")}
m.Scans = &ScanManager{manager: m, col: db.C("scans")}
m.Agents = &AgentManager{manager: m, col: db.C("agents")}
m.Reports = &ReportManager{manager: m, col: db.C("reports")}
m.Feed = &FeedManager{manager: m, col: db.C("feed")}
m.Files = &FileManager{manager: m, grid: db.GridFS("fs")}
m.Comments = &CommentManager{manager: m, col: db.C("comments")}
m.Issues = &IssueManager{manager: m, col: db.C("issues")}
m.Techs = &TechManager{manager: m, col: db.C("techs")}
m.Tokens = &TokenManager{manager: m, col: db.C("tokens")}
m.Permission = &PermissionManager{manager: m}
m.Vulndb = &VulndbManager{manager: m}
m.managers = append(m.managers,
m.Users,
m.Plugins,
m.Projects,
m.Targets,
m.Plans,
m.Scans,
m.Agents,
m.Reports,
m.Feed,
m.Files,
m.Comments,
m.Issues,
m.Techs,
m.Tokens,
m.Permission,
m.Vulndb,
)
return m
} | [
"func",
"New",
"(",
"db",
"*",
"mgo",
".",
"Database",
",",
"cfg",
"...",
"ManagerConfig",
")",
"*",
"Manager",
"{",
"m",
":=",
"&",
"Manager",
"{",
"db",
":",
"db",
",",
"managers",
":",
"[",
"]",
"ManagerInterface",
"{",
"}",
",",
"}",
"\n",
"i... | // Manager contains all available managers for different models
// and hidden all db related operations | [
"Manager",
"contains",
"all",
"available",
"managers",
"for",
"different",
"models",
"and",
"hidden",
"all",
"db",
"related",
"operations"
] | c937b9e05d299400e95143a433836214a6ffa649 | https://github.com/bearded-web/bearded/blob/c937b9e05d299400e95143a433836214a6ffa649/pkg/manager/manager.go#L52-L101 |
153,669 | bearded-web/bearded | pkg/manager/manager.go | Init | func (m *Manager) Init() error {
for _, manager := range m.managers {
if err := manager.Init(); err != nil {
return err
}
}
return nil
} | go | func (m *Manager) Init() error {
for _, manager := range m.managers {
if err := manager.Init(); err != nil {
return err
}
}
return nil
} | [
"func",
"(",
"m",
"*",
"Manager",
")",
"Init",
"(",
")",
"error",
"{",
"for",
"_",
",",
"manager",
":=",
"range",
"m",
".",
"managers",
"{",
"if",
"err",
":=",
"manager",
".",
"Init",
"(",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n... | // Initialize all managers. Ensure indexes. | [
"Initialize",
"all",
"managers",
".",
"Ensure",
"indexes",
"."
] | c937b9e05d299400e95143a433836214a6ffa649 | https://github.com/bearded-web/bearded/blob/c937b9e05d299400e95143a433836214a6ffa649/pkg/manager/manager.go#L104-L111 |
153,670 | bearded-web/bearded | pkg/manager/manager.go | Copy | func (m *Manager) Copy() *Manager {
sess := m.db.Session.Copy()
copy := New(m.db.With(sess), m.Cfg)
// TODO (m0sth8): implement copy through the interface
m.Permission.Copy(copy.Permission)
m.Vulndb.Copy(copy.Vulndb)
return copy
} | go | func (m *Manager) Copy() *Manager {
sess := m.db.Session.Copy()
copy := New(m.db.With(sess), m.Cfg)
// TODO (m0sth8): implement copy through the interface
m.Permission.Copy(copy.Permission)
m.Vulndb.Copy(copy.Vulndb)
return copy
} | [
"func",
"(",
"m",
"*",
"Manager",
")",
"Copy",
"(",
")",
"*",
"Manager",
"{",
"sess",
":=",
"m",
".",
"db",
".",
"Session",
".",
"Copy",
"(",
")",
"\n",
"copy",
":=",
"New",
"(",
"m",
".",
"db",
".",
"With",
"(",
"sess",
")",
",",
"m",
".",... | // Get copy of manager with copied session, don't forget to call Close after | [
"Get",
"copy",
"of",
"manager",
"with",
"copied",
"session",
"don",
"t",
"forget",
"to",
"call",
"Close",
"after"
] | c937b9e05d299400e95143a433836214a6ffa649 | https://github.com/bearded-web/bearded/blob/c937b9e05d299400e95143a433836214a6ffa649/pkg/manager/manager.go#L114-L121 |
153,671 | bearded-web/bearded | pkg/manager/manager.go | Clone | func (m *Manager) Clone() *Manager {
sess := m.db.Session.Clone()
return New(m.db.With(sess))
} | go | func (m *Manager) Clone() *Manager {
sess := m.db.Session.Clone()
return New(m.db.With(sess))
} | [
"func",
"(",
"m",
"*",
"Manager",
")",
"Clone",
"(",
")",
"*",
"Manager",
"{",
"sess",
":=",
"m",
".",
"db",
".",
"Session",
".",
"Clone",
"(",
")",
"\n",
"return",
"New",
"(",
"m",
".",
"db",
".",
"With",
"(",
"sess",
")",
")",
"\n",
"}"
] | // Clone works just like Copy, but also reuses the same socket as the original
// session, in case it had already reserved one due to its consistency
// guarantees. This behavior ensures that writes performed in the old session
// are necessarily observed when using the new session, as long as it was a
// strong or monotonic session. That said, it also means that long operations
// may cause other goroutines using the original session to wait. | [
"Clone",
"works",
"just",
"like",
"Copy",
"but",
"also",
"reuses",
"the",
"same",
"socket",
"as",
"the",
"original",
"session",
"in",
"case",
"it",
"had",
"already",
"reserved",
"one",
"due",
"to",
"its",
"consistency",
"guarantees",
".",
"This",
"behavior",... | c937b9e05d299400e95143a433836214a6ffa649 | https://github.com/bearded-web/bearded/blob/c937b9e05d299400e95143a433836214a6ffa649/pkg/manager/manager.go#L129-L132 |
153,672 | thecodeteam/gorackhd | client/put/put_templates_library_identifier_parameters.go | WithIdentifier | func (o *PutTemplatesLibraryIdentifierParams) WithIdentifier(identifier string) *PutTemplatesLibraryIdentifierParams {
o.Identifier = identifier
return o
} | go | func (o *PutTemplatesLibraryIdentifierParams) WithIdentifier(identifier string) *PutTemplatesLibraryIdentifierParams {
o.Identifier = identifier
return o
} | [
"func",
"(",
"o",
"*",
"PutTemplatesLibraryIdentifierParams",
")",
"WithIdentifier",
"(",
"identifier",
"string",
")",
"*",
"PutTemplatesLibraryIdentifierParams",
"{",
"o",
".",
"Identifier",
"=",
"identifier",
"\n",
"return",
"o",
"\n",
"}"
] | // WithIdentifier adds the identifier to the put templates library identifier params | [
"WithIdentifier",
"adds",
"the",
"identifier",
"to",
"the",
"put",
"templates",
"library",
"identifier",
"params"
] | 66bd88ab29593b880ba59b35db2c17a4b4bab1f1 | https://github.com/thecodeteam/gorackhd/blob/66bd88ab29593b880ba59b35db2c17a4b4bab1f1/client/put/put_templates_library_identifier_parameters.go#L52-L55 |
153,673 | thecodeteam/gorackhd | client/get/get_workflows_instance_id_parameters.go | WithInstanceID | func (o *GetWorkflowsInstanceIDParams) WithInstanceID(instanceID string) *GetWorkflowsInstanceIDParams {
o.InstanceID = instanceID
return o
} | go | func (o *GetWorkflowsInstanceIDParams) WithInstanceID(instanceID string) *GetWorkflowsInstanceIDParams {
o.InstanceID = instanceID
return o
} | [
"func",
"(",
"o",
"*",
"GetWorkflowsInstanceIDParams",
")",
"WithInstanceID",
"(",
"instanceID",
"string",
")",
"*",
"GetWorkflowsInstanceIDParams",
"{",
"o",
".",
"InstanceID",
"=",
"instanceID",
"\n",
"return",
"o",
"\n",
"}"
] | // WithInstanceID adds the instanceID to the get workflows instance ID params | [
"WithInstanceID",
"adds",
"the",
"instanceID",
"to",
"the",
"get",
"workflows",
"instance",
"ID",
"params"
] | 66bd88ab29593b880ba59b35db2c17a4b4bab1f1 | https://github.com/thecodeteam/gorackhd/blob/66bd88ab29593b880ba59b35db2c17a4b4bab1f1/client/get/get_workflows_instance_id_parameters.go#L48-L51 |
153,674 | veer66/mapkha | unk_edge_builder.go | Build | func (builder *UnkEdgeBuilder) Build(context *EdgeBuildingContext) *Edge {
if context.BestEdge != nil {
return nil
}
source := context.Path[context.LeftBoundary]
return &Edge{S: context.LeftBoundary,
EdgeType: UNK,
WordCount: source.WordCount + 1,
UnkCount: source.UnkCount + 1}
} | go | func (builder *UnkEdgeBuilder) Build(context *EdgeBuildingContext) *Edge {
if context.BestEdge != nil {
return nil
}
source := context.Path[context.LeftBoundary]
return &Edge{S: context.LeftBoundary,
EdgeType: UNK,
WordCount: source.WordCount + 1,
UnkCount: source.UnkCount + 1}
} | [
"func",
"(",
"builder",
"*",
"UnkEdgeBuilder",
")",
"Build",
"(",
"context",
"*",
"EdgeBuildingContext",
")",
"*",
"Edge",
"{",
"if",
"context",
".",
"BestEdge",
"!=",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n\n",
"source",
":=",
"context",
".",
"Path"... | // Build - build dummy edge when there is no edge created. | [
"Build",
"-",
"build",
"dummy",
"edge",
"when",
"there",
"is",
"no",
"edge",
"created",
"."
] | 4c22c721f2c6c6414a04849669688556d882f526 | https://github.com/veer66/mapkha/blob/4c22c721f2c6c6414a04849669688556d882f526/unk_edge_builder.go#L7-L18 |
153,675 | bearded-web/bearded | Godeps/_workspace/src/gopkg.in/validator.v2/validator.go | Valid | func (mv *Validator) Valid(val interface{}, tags string) error {
if tags == "-" {
return nil
}
v := reflect.ValueOf(val)
if v.Kind() == reflect.Ptr && !v.IsNil() {
return mv.Valid(v.Elem().Interface(), tags)
}
var err error
switch v.Kind() {
case reflect.Struct:
return ErrUnsupported
case reflect.Invalid:
err = mv.validateVar(nil, tags)
default:
err = mv.validateVar(val, tags)
}
return err
} | go | func (mv *Validator) Valid(val interface{}, tags string) error {
if tags == "-" {
return nil
}
v := reflect.ValueOf(val)
if v.Kind() == reflect.Ptr && !v.IsNil() {
return mv.Valid(v.Elem().Interface(), tags)
}
var err error
switch v.Kind() {
case reflect.Struct:
return ErrUnsupported
case reflect.Invalid:
err = mv.validateVar(nil, tags)
default:
err = mv.validateVar(val, tags)
}
return err
} | [
"func",
"(",
"mv",
"*",
"Validator",
")",
"Valid",
"(",
"val",
"interface",
"{",
"}",
",",
"tags",
"string",
")",
"error",
"{",
"if",
"tags",
"==",
"\"",
"\"",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"v",
":=",
"reflect",
".",
"ValueOf",
"(",
"val... | // Valid validates a value based on the provided
// tags and returns errors found or nil. | [
"Valid",
"validates",
"a",
"value",
"based",
"on",
"the",
"provided",
"tags",
"and",
"returns",
"errors",
"found",
"or",
"nil",
"."
] | c937b9e05d299400e95143a433836214a6ffa649 | https://github.com/bearded-web/bearded/blob/c937b9e05d299400e95143a433836214a6ffa649/Godeps/_workspace/src/gopkg.in/validator.v2/validator.go#L273-L291 |
153,676 | bearded-web/bearded | Godeps/_workspace/src/gopkg.in/validator.v2/validator.go | parseTags | func (mv *Validator) parseTags(t string) ([]tag, error) {
tl := strings.Split(t, ",")
tags := make([]tag, 0, len(tl))
for _, i := range tl {
tg := tag{}
v := strings.SplitN(i, "=", 2)
tg.Name = strings.Trim(v[0], " ")
if tg.Name == "" {
return []tag{}, ErrUnknownTag
}
if len(v) > 1 {
tg.Param = strings.Trim(v[1], " ")
}
var found bool
if tg.Fn, found = mv.validationFuncs[tg.Name]; !found {
return []tag{}, ErrUnknownTag
}
tags = append(tags, tg)
}
return tags, nil
} | go | func (mv *Validator) parseTags(t string) ([]tag, error) {
tl := strings.Split(t, ",")
tags := make([]tag, 0, len(tl))
for _, i := range tl {
tg := tag{}
v := strings.SplitN(i, "=", 2)
tg.Name = strings.Trim(v[0], " ")
if tg.Name == "" {
return []tag{}, ErrUnknownTag
}
if len(v) > 1 {
tg.Param = strings.Trim(v[1], " ")
}
var found bool
if tg.Fn, found = mv.validationFuncs[tg.Name]; !found {
return []tag{}, ErrUnknownTag
}
tags = append(tags, tg)
}
return tags, nil
} | [
"func",
"(",
"mv",
"*",
"Validator",
")",
"parseTags",
"(",
"t",
"string",
")",
"(",
"[",
"]",
"tag",
",",
"error",
")",
"{",
"tl",
":=",
"strings",
".",
"Split",
"(",
"t",
",",
"\"",
"\"",
")",
"\n",
"tags",
":=",
"make",
"(",
"[",
"]",
"tag... | // parseTags parses all individual tags found within a struct tag. | [
"parseTags",
"parses",
"all",
"individual",
"tags",
"found",
"within",
"a",
"struct",
"tag",
"."
] | c937b9e05d299400e95143a433836214a6ffa649 | https://github.com/bearded-web/bearded/blob/c937b9e05d299400e95143a433836214a6ffa649/Godeps/_workspace/src/gopkg.in/validator.v2/validator.go#L320-L341 |
153,677 | bearded-web/bearded | Godeps/_workspace/src/gopkg.in/fatih/set.v0/set_nots.go | NewNonTS | func NewNonTS(items ...interface{}) *SetNonTS {
s := &SetNonTS{}
s.m = make(map[interface{}]struct{})
// Ensure interface compliance
var _ Interface = s
s.Add(items...)
return s
} | go | func NewNonTS(items ...interface{}) *SetNonTS {
s := &SetNonTS{}
s.m = make(map[interface{}]struct{})
// Ensure interface compliance
var _ Interface = s
s.Add(items...)
return s
} | [
"func",
"NewNonTS",
"(",
"items",
"...",
"interface",
"{",
"}",
")",
"*",
"SetNonTS",
"{",
"s",
":=",
"&",
"SetNonTS",
"{",
"}",
"\n",
"s",
".",
"m",
"=",
"make",
"(",
"map",
"[",
"interface",
"{",
"}",
"]",
"struct",
"{",
"}",
")",
"\n\n",
"//... | // NewNonTS creates and initialize a new non-threadsafe Set.
// It accepts a variable number of arguments to populate the initial set.
// If nothing is passed a SetNonTS with zero size is created. | [
"NewNonTS",
"creates",
"and",
"initialize",
"a",
"new",
"non",
"-",
"threadsafe",
"Set",
".",
"It",
"accepts",
"a",
"variable",
"number",
"of",
"arguments",
"to",
"populate",
"the",
"initial",
"set",
".",
"If",
"nothing",
"is",
"passed",
"a",
"SetNonTS",
"... | c937b9e05d299400e95143a433836214a6ffa649 | https://github.com/bearded-web/bearded/blob/c937b9e05d299400e95143a433836214a6ffa649/Godeps/_workspace/src/gopkg.in/fatih/set.v0/set_nots.go#L21-L30 |
153,678 | bearded-web/bearded | pkg/email/memory.go | NewMemoryBackend | func NewMemoryBackend(max int) *MemoryBackend {
return &MemoryBackend{
messages: make(chan *gomail.Message, max),
}
} | go | func NewMemoryBackend(max int) *MemoryBackend {
return &MemoryBackend{
messages: make(chan *gomail.Message, max),
}
} | [
"func",
"NewMemoryBackend",
"(",
"max",
"int",
")",
"*",
"MemoryBackend",
"{",
"return",
"&",
"MemoryBackend",
"{",
"messages",
":",
"make",
"(",
"chan",
"*",
"gomail",
".",
"Message",
",",
"max",
")",
",",
"}",
"\n",
"}"
] | // Just for testing purposes. Is not thread safe. | [
"Just",
"for",
"testing",
"purposes",
".",
"Is",
"not",
"thread",
"safe",
"."
] | c937b9e05d299400e95143a433836214a6ffa649 | https://github.com/bearded-web/bearded/blob/c937b9e05d299400e95143a433836214a6ffa649/pkg/email/memory.go#L14-L18 |
153,679 | bearded-web/bearded | Godeps/_workspace/src/gopkg.in/gomail.v1/gomail.go | NewMessage | func NewMessage(settings ...MessageSetting) *Message {
msg := &Message{
header: make(header),
charset: "UTF-8",
encoding: QuotedPrintable,
}
msg.applySettings(settings)
var e quotedprintable.Encoding
if msg.encoding == Base64 {
e = quotedprintable.B
} else {
e = quotedprintable.Q
}
msg.hEncoder = e.NewHeaderEncoder(msg.charset)
return msg
} | go | func NewMessage(settings ...MessageSetting) *Message {
msg := &Message{
header: make(header),
charset: "UTF-8",
encoding: QuotedPrintable,
}
msg.applySettings(settings)
var e quotedprintable.Encoding
if msg.encoding == Base64 {
e = quotedprintable.B
} else {
e = quotedprintable.Q
}
msg.hEncoder = e.NewHeaderEncoder(msg.charset)
return msg
} | [
"func",
"NewMessage",
"(",
"settings",
"...",
"MessageSetting",
")",
"*",
"Message",
"{",
"msg",
":=",
"&",
"Message",
"{",
"header",
":",
"make",
"(",
"header",
")",
",",
"charset",
":",
"\"",
"\"",
",",
"encoding",
":",
"QuotedPrintable",
",",
"}",
"... | // NewMessage creates a new message. It uses UTF-8 and quoted-printable encoding
// by default. | [
"NewMessage",
"creates",
"a",
"new",
"message",
".",
"It",
"uses",
"UTF",
"-",
"8",
"and",
"quoted",
"-",
"printable",
"encoding",
"by",
"default",
"."
] | c937b9e05d299400e95143a433836214a6ffa649 | https://github.com/bearded-web/bearded/blob/c937b9e05d299400e95143a433836214a6ffa649/Godeps/_workspace/src/gopkg.in/gomail.v1/gomail.go#L37-L55 |
153,680 | bearded-web/bearded | Godeps/_workspace/src/gopkg.in/gomail.v1/gomail.go | SetHeader | func (msg *Message) SetHeader(field string, value ...string) {
for i := range value {
value[i] = msg.encodeHeader(value[i])
}
msg.header[field] = value
} | go | func (msg *Message) SetHeader(field string, value ...string) {
for i := range value {
value[i] = msg.encodeHeader(value[i])
}
msg.header[field] = value
} | [
"func",
"(",
"msg",
"*",
"Message",
")",
"SetHeader",
"(",
"field",
"string",
",",
"value",
"...",
"string",
")",
"{",
"for",
"i",
":=",
"range",
"value",
"{",
"value",
"[",
"i",
"]",
"=",
"msg",
".",
"encodeHeader",
"(",
"value",
"[",
"i",
"]",
... | // SetHeader sets a value to the given header field. | [
"SetHeader",
"sets",
"a",
"value",
"to",
"the",
"given",
"header",
"field",
"."
] | c937b9e05d299400e95143a433836214a6ffa649 | https://github.com/bearded-web/bearded/blob/c937b9e05d299400e95143a433836214a6ffa649/Godeps/_workspace/src/gopkg.in/gomail.v1/gomail.go#L104-L109 |
153,681 | bearded-web/bearded | Godeps/_workspace/src/gopkg.in/gomail.v1/gomail.go | SetAddressHeader | func (msg *Message) SetAddressHeader(field, address, name string) {
msg.header[field] = []string{msg.FormatAddress(address, name)}
} | go | func (msg *Message) SetAddressHeader(field, address, name string) {
msg.header[field] = []string{msg.FormatAddress(address, name)}
} | [
"func",
"(",
"msg",
"*",
"Message",
")",
"SetAddressHeader",
"(",
"field",
",",
"address",
",",
"name",
"string",
")",
"{",
"msg",
".",
"header",
"[",
"field",
"]",
"=",
"[",
"]",
"string",
"{",
"msg",
".",
"FormatAddress",
"(",
"address",
",",
"name... | // SetAddressHeader sets an address to the given header field. | [
"SetAddressHeader",
"sets",
"an",
"address",
"to",
"the",
"given",
"header",
"field",
"."
] | c937b9e05d299400e95143a433836214a6ffa649 | https://github.com/bearded-web/bearded/blob/c937b9e05d299400e95143a433836214a6ffa649/Godeps/_workspace/src/gopkg.in/gomail.v1/gomail.go#L131-L133 |
153,682 | bearded-web/bearded | Godeps/_workspace/src/gopkg.in/gomail.v1/gomail.go | FormatAddress | func (msg *Message) FormatAddress(address, name string) string {
return msg.encodeHeader(name) + " <" + address + ">"
} | go | func (msg *Message) FormatAddress(address, name string) string {
return msg.encodeHeader(name) + " <" + address + ">"
} | [
"func",
"(",
"msg",
"*",
"Message",
")",
"FormatAddress",
"(",
"address",
",",
"name",
"string",
")",
"string",
"{",
"return",
"msg",
".",
"encodeHeader",
"(",
"name",
")",
"+",
"\"",
"\"",
"+",
"address",
"+",
"\"",
"\"",
"\n",
"}"
] | // FormatAddress formats an address and a name as a valid RFC 5322 address. | [
"FormatAddress",
"formats",
"an",
"address",
"and",
"a",
"name",
"as",
"a",
"valid",
"RFC",
"5322",
"address",
"."
] | c937b9e05d299400e95143a433836214a6ffa649 | https://github.com/bearded-web/bearded/blob/c937b9e05d299400e95143a433836214a6ffa649/Godeps/_workspace/src/gopkg.in/gomail.v1/gomail.go#L136-L138 |
153,683 | bearded-web/bearded | Godeps/_workspace/src/gopkg.in/gomail.v1/gomail.go | SetDateHeader | func (msg *Message) SetDateHeader(field string, date time.Time) {
msg.header[field] = []string{msg.FormatDate(date)}
} | go | func (msg *Message) SetDateHeader(field string, date time.Time) {
msg.header[field] = []string{msg.FormatDate(date)}
} | [
"func",
"(",
"msg",
"*",
"Message",
")",
"SetDateHeader",
"(",
"field",
"string",
",",
"date",
"time",
".",
"Time",
")",
"{",
"msg",
".",
"header",
"[",
"field",
"]",
"=",
"[",
"]",
"string",
"{",
"msg",
".",
"FormatDate",
"(",
"date",
")",
"}",
... | // SetDateHeader sets a date to the given header field. | [
"SetDateHeader",
"sets",
"a",
"date",
"to",
"the",
"given",
"header",
"field",
"."
] | c937b9e05d299400e95143a433836214a6ffa649 | https://github.com/bearded-web/bearded/blob/c937b9e05d299400e95143a433836214a6ffa649/Godeps/_workspace/src/gopkg.in/gomail.v1/gomail.go#L141-L143 |
153,684 | bearded-web/bearded | Godeps/_workspace/src/gopkg.in/gomail.v1/gomail.go | FormatDate | func (msg *Message) FormatDate(date time.Time) string {
return date.Format(time.RFC822Z)
} | go | func (msg *Message) FormatDate(date time.Time) string {
return date.Format(time.RFC822Z)
} | [
"func",
"(",
"msg",
"*",
"Message",
")",
"FormatDate",
"(",
"date",
"time",
".",
"Time",
")",
"string",
"{",
"return",
"date",
".",
"Format",
"(",
"time",
".",
"RFC822Z",
")",
"\n",
"}"
] | // FormatDate formats a date as a valid RFC 5322 date. | [
"FormatDate",
"formats",
"a",
"date",
"as",
"a",
"valid",
"RFC",
"5322",
"date",
"."
] | c937b9e05d299400e95143a433836214a6ffa649 | https://github.com/bearded-web/bearded/blob/c937b9e05d299400e95143a433836214a6ffa649/Godeps/_workspace/src/gopkg.in/gomail.v1/gomail.go#L146-L148 |
153,685 | bearded-web/bearded | Godeps/_workspace/src/gopkg.in/gomail.v1/gomail.go | OpenFile | func OpenFile(filename string) (*File, error) {
content, err := readFile(filename)
if err != nil {
return nil, err
}
f := CreateFile(filepath.Base(filename), content)
return f, nil
} | go | func OpenFile(filename string) (*File, error) {
content, err := readFile(filename)
if err != nil {
return nil, err
}
f := CreateFile(filepath.Base(filename), content)
return f, nil
} | [
"func",
"OpenFile",
"(",
"filename",
"string",
")",
"(",
"*",
"File",
",",
"error",
")",
"{",
"content",
",",
"err",
":=",
"readFile",
"(",
"filename",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"f",
... | // OpenFile opens a file on disk to create a gomail.File. | [
"OpenFile",
"opens",
"a",
"file",
"on",
"disk",
"to",
"create",
"a",
"gomail",
".",
"File",
"."
] | c937b9e05d299400e95143a433836214a6ffa649 | https://github.com/bearded-web/bearded/blob/c937b9e05d299400e95143a433836214a6ffa649/Godeps/_workspace/src/gopkg.in/gomail.v1/gomail.go#L217-L226 |
153,686 | bearded-web/bearded | Godeps/_workspace/src/gopkg.in/gomail.v1/gomail.go | CreateFile | func CreateFile(name string, content []byte) *File {
mimeType := mime.TypeByExtension(filepath.Ext(name))
if mimeType == "" {
mimeType = "application/octet-stream"
}
return &File{
Name: name,
MimeType: mimeType,
Content: content,
}
} | go | func CreateFile(name string, content []byte) *File {
mimeType := mime.TypeByExtension(filepath.Ext(name))
if mimeType == "" {
mimeType = "application/octet-stream"
}
return &File{
Name: name,
MimeType: mimeType,
Content: content,
}
} | [
"func",
"CreateFile",
"(",
"name",
"string",
",",
"content",
"[",
"]",
"byte",
")",
"*",
"File",
"{",
"mimeType",
":=",
"mime",
".",
"TypeByExtension",
"(",
"filepath",
".",
"Ext",
"(",
"name",
")",
")",
"\n",
"if",
"mimeType",
"==",
"\"",
"\"",
"{",... | // CreateFile creates a gomail.File from the given name and content. | [
"CreateFile",
"creates",
"a",
"gomail",
".",
"File",
"from",
"the",
"given",
"name",
"and",
"content",
"."
] | c937b9e05d299400e95143a433836214a6ffa649 | https://github.com/bearded-web/bearded/blob/c937b9e05d299400e95143a433836214a6ffa649/Godeps/_workspace/src/gopkg.in/gomail.v1/gomail.go#L229-L240 |
153,687 | bearded-web/bearded | Godeps/_workspace/src/gopkg.in/gomail.v1/gomail.go | Attach | func (msg *Message) Attach(f ...*File) {
if msg.attachments == nil {
msg.attachments = f
} else {
msg.attachments = append(msg.attachments, f...)
}
} | go | func (msg *Message) Attach(f ...*File) {
if msg.attachments == nil {
msg.attachments = f
} else {
msg.attachments = append(msg.attachments, f...)
}
} | [
"func",
"(",
"msg",
"*",
"Message",
")",
"Attach",
"(",
"f",
"...",
"*",
"File",
")",
"{",
"if",
"msg",
".",
"attachments",
"==",
"nil",
"{",
"msg",
".",
"attachments",
"=",
"f",
"\n",
"}",
"else",
"{",
"msg",
".",
"attachments",
"=",
"append",
"... | // Attach attaches the files to the email. | [
"Attach",
"attaches",
"the",
"files",
"to",
"the",
"email",
"."
] | c937b9e05d299400e95143a433836214a6ffa649 | https://github.com/bearded-web/bearded/blob/c937b9e05d299400e95143a433836214a6ffa649/Godeps/_workspace/src/gopkg.in/gomail.v1/gomail.go#L243-L249 |
153,688 | thecodeteam/gorackhd | models/catalog.go | Validate | func (m *Catalog) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateID(formats); err != nil {
// prop
res = append(res, err)
}
if err := m.validateNode(formats); err != nil {
// prop
res = append(res, err)
}
if err := m.validateSource(formats); err != nil {
// prop
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
} | go | func (m *Catalog) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateID(formats); err != nil {
// prop
res = append(res, err)
}
if err := m.validateNode(formats); err != nil {
// prop
res = append(res, err)
}
if err := m.validateSource(formats); err != nil {
// prop
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
} | [
"func",
"(",
"m",
"*",
"Catalog",
")",
"Validate",
"(",
"formats",
"strfmt",
".",
"Registry",
")",
"error",
"{",
"var",
"res",
"[",
"]",
"error",
"\n\n",
"if",
"err",
":=",
"m",
".",
"validateID",
"(",
"formats",
")",
";",
"err",
"!=",
"nil",
"{",
... | // Validate validates this catalog | [
"Validate",
"validates",
"this",
"catalog"
] | 66bd88ab29593b880ba59b35db2c17a4b4bab1f1 | https://github.com/thecodeteam/gorackhd/blob/66bd88ab29593b880ba59b35db2c17a4b4bab1f1/models/catalog.go#L43-L65 |
153,689 | bearded-web/bearded | pkg/client/tokens.go | List | func (s *TokensService) List(ctx context.Context, opt *TokensListOpts) (*token.TokenList, error) {
tokenList := &token.TokenList{}
return tokenList, s.client.List(ctx, tokensUrl, opt, tokenList)
} | go | func (s *TokensService) List(ctx context.Context, opt *TokensListOpts) (*token.TokenList, error) {
tokenList := &token.TokenList{}
return tokenList, s.client.List(ctx, tokensUrl, opt, tokenList)
} | [
"func",
"(",
"s",
"*",
"TokensService",
")",
"List",
"(",
"ctx",
"context",
".",
"Context",
",",
"opt",
"*",
"TokensListOpts",
")",
"(",
"*",
"token",
".",
"TokenList",
",",
"error",
")",
"{",
"tokenList",
":=",
"&",
"token",
".",
"TokenList",
"{",
"... | // List tokens.
//
// | [
"List",
"tokens",
"."
] | c937b9e05d299400e95143a433836214a6ffa649 | https://github.com/bearded-web/bearded/blob/c937b9e05d299400e95143a433836214a6ffa649/pkg/client/tokens.go#L27-L30 |
153,690 | veer66/mapkha | dict.go | LoadDict | func LoadDict(path string) (*Dict, error) {
f, err := os.Open(path)
if err != nil {
return nil, err
}
defer f.Close()
wordWithPayloads := make([]WordWithPayload, 0)
scanner := bufio.NewScanner(f)
for scanner.Scan() {
if line := scanner.Text(); len(line) != 0 {
wordWithPayloads = append(wordWithPayloads,
WordWithPayload{line, true})
}
}
tree := MakePrefixTree(wordWithPayloads)
dix := Dict{tree}
return &dix, nil
} | go | func LoadDict(path string) (*Dict, error) {
f, err := os.Open(path)
if err != nil {
return nil, err
}
defer f.Close()
wordWithPayloads := make([]WordWithPayload, 0)
scanner := bufio.NewScanner(f)
for scanner.Scan() {
if line := scanner.Text(); len(line) != 0 {
wordWithPayloads = append(wordWithPayloads,
WordWithPayload{line, true})
}
}
tree := MakePrefixTree(wordWithPayloads)
dix := Dict{tree}
return &dix, nil
} | [
"func",
"LoadDict",
"(",
"path",
"string",
")",
"(",
"*",
"Dict",
",",
"error",
")",
"{",
"f",
",",
"err",
":=",
"os",
".",
"Open",
"(",
"path",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n",
"defer",
... | // LoadDict is for loading a word list from file | [
"LoadDict",
"is",
"for",
"loading",
"a",
"word",
"list",
"from",
"file"
] | 4c22c721f2c6c6414a04849669688556d882f526 | https://github.com/veer66/mapkha/blob/4c22c721f2c6c6414a04849669688556d882f526/dict.go#L16-L33 |
153,691 | veer66/mapkha | dict.go | LoadDefaultDict | func LoadDefaultDict() (*Dict, error) {
_, filename, _, _ := runtime.Caller(0)
return LoadDict(path.Join(path.Dir(filename), "tdict-std.txt"))
} | go | func LoadDefaultDict() (*Dict, error) {
_, filename, _, _ := runtime.Caller(0)
return LoadDict(path.Join(path.Dir(filename), "tdict-std.txt"))
} | [
"func",
"LoadDefaultDict",
"(",
")",
"(",
"*",
"Dict",
",",
"error",
")",
"{",
"_",
",",
"filename",
",",
"_",
",",
"_",
":=",
"runtime",
".",
"Caller",
"(",
"0",
")",
"\n",
"return",
"LoadDict",
"(",
"path",
".",
"Join",
"(",
"path",
".",
"Dir",... | // LoadDefaultDict - loading default Thai dictionary | [
"LoadDefaultDict",
"-",
"loading",
"default",
"Thai",
"dictionary"
] | 4c22c721f2c6c6414a04849669688556d882f526 | https://github.com/veer66/mapkha/blob/4c22c721f2c6c6414a04849669688556d882f526/dict.go#L47-L50 |
153,692 | veer66/mapkha | dict.go | Lookup | func (d *Dict) Lookup(p int, offset int, ch rune) (*PrefixTreePointer, bool) {
pointer, found := d.tree.Lookup(p, offset, ch)
return pointer, found
} | go | func (d *Dict) Lookup(p int, offset int, ch rune) (*PrefixTreePointer, bool) {
pointer, found := d.tree.Lookup(p, offset, ch)
return pointer, found
} | [
"func",
"(",
"d",
"*",
"Dict",
")",
"Lookup",
"(",
"p",
"int",
",",
"offset",
"int",
",",
"ch",
"rune",
")",
"(",
"*",
"PrefixTreePointer",
",",
"bool",
")",
"{",
"pointer",
",",
"found",
":=",
"d",
".",
"tree",
".",
"Lookup",
"(",
"p",
",",
"o... | // Lookup - lookup node in a Prefix Tree | [
"Lookup",
"-",
"lookup",
"node",
"in",
"a",
"Prefix",
"Tree"
] | 4c22c721f2c6c6414a04849669688556d882f526 | https://github.com/veer66/mapkha/blob/4c22c721f2c6c6414a04849669688556d882f526/dict.go#L53-L56 |
153,693 | thecodeteam/gorackhd | client/get/get_nodes_identifier_workflows_parameters.go | WithIdentifier | func (o *GetNodesIdentifierWorkflowsParams) WithIdentifier(identifier string) *GetNodesIdentifierWorkflowsParams {
o.Identifier = identifier
return o
} | go | func (o *GetNodesIdentifierWorkflowsParams) WithIdentifier(identifier string) *GetNodesIdentifierWorkflowsParams {
o.Identifier = identifier
return o
} | [
"func",
"(",
"o",
"*",
"GetNodesIdentifierWorkflowsParams",
")",
"WithIdentifier",
"(",
"identifier",
"string",
")",
"*",
"GetNodesIdentifierWorkflowsParams",
"{",
"o",
".",
"Identifier",
"=",
"identifier",
"\n",
"return",
"o",
"\n",
"}"
] | // WithIdentifier adds the identifier to the get nodes identifier workflows params | [
"WithIdentifier",
"adds",
"the",
"identifier",
"to",
"the",
"get",
"nodes",
"identifier",
"workflows",
"params"
] | 66bd88ab29593b880ba59b35db2c17a4b4bab1f1 | https://github.com/thecodeteam/gorackhd/blob/66bd88ab29593b880ba59b35db2c17a4b4bab1f1/client/get/get_nodes_identifier_workflows_parameters.go#L53-L56 |
153,694 | thecodeteam/gorackhd | client/lookups/post_lookups_id_parameters.go | WithID | func (o *PostLookupsIDParams) WithID(id string) *PostLookupsIDParams {
o.ID = id
return o
} | go | func (o *PostLookupsIDParams) WithID(id string) *PostLookupsIDParams {
o.ID = id
return o
} | [
"func",
"(",
"o",
"*",
"PostLookupsIDParams",
")",
"WithID",
"(",
"id",
"string",
")",
"*",
"PostLookupsIDParams",
"{",
"o",
".",
"ID",
"=",
"id",
"\n",
"return",
"o",
"\n",
"}"
] | // WithID adds the id to the post lookups ID params | [
"WithID",
"adds",
"the",
"id",
"to",
"the",
"post",
"lookups",
"ID",
"params"
] | 66bd88ab29593b880ba59b35db2c17a4b4bab1f1 | https://github.com/thecodeteam/gorackhd/blob/66bd88ab29593b880ba59b35db2c17a4b4bab1f1/client/lookups/post_lookups_id_parameters.go#L62-L65 |
153,695 | thecodeteam/gorackhd | models/sku.go | Validate | func (m *Sku) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateNodes(formats); err != nil {
// prop
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
} | go | func (m *Sku) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateNodes(formats); err != nil {
// prop
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
} | [
"func",
"(",
"m",
"*",
"Sku",
")",
"Validate",
"(",
"formats",
"strfmt",
".",
"Registry",
")",
"error",
"{",
"var",
"res",
"[",
"]",
"error",
"\n\n",
"if",
"err",
":=",
"m",
".",
"validateNodes",
"(",
"formats",
")",
";",
"err",
"!=",
"nil",
"{",
... | // Validate validates this sku | [
"Validate",
"validates",
"this",
"sku"
] | 66bd88ab29593b880ba59b35db2c17a4b4bab1f1 | https://github.com/thecodeteam/gorackhd/blob/66bd88ab29593b880ba59b35db2c17a4b4bab1f1/models/sku.go#L45-L57 |
153,696 | bearded-web/bearded | models/plugin/plugin.go | String | func (p *Plugin) String() string {
var str string
if p.Id != "" {
str = fmt.Sprintf("%x - %s v.%s", string(p.Id), p.Name, p.Version)
} else {
str = fmt.Sprintf("%s v.%s", p.Name, p.Version)
}
if p.Id != "" && !p.Enabled {
str = fmt.Sprintf("%s DISABLED", str)
}
return str
} | go | func (p *Plugin) String() string {
var str string
if p.Id != "" {
str = fmt.Sprintf("%x - %s v.%s", string(p.Id), p.Name, p.Version)
} else {
str = fmt.Sprintf("%s v.%s", p.Name, p.Version)
}
if p.Id != "" && !p.Enabled {
str = fmt.Sprintf("%s DISABLED", str)
}
return str
} | [
"func",
"(",
"p",
"*",
"Plugin",
")",
"String",
"(",
")",
"string",
"{",
"var",
"str",
"string",
"\n",
"if",
"p",
".",
"Id",
"!=",
"\"",
"\"",
"{",
"str",
"=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"string",
"(",
"p",
".",
"Id",
")",
... | // Short description of plugin | [
"Short",
"description",
"of",
"plugin"
] | c937b9e05d299400e95143a433836214a6ffa649 | https://github.com/bearded-web/bearded/blob/c937b9e05d299400e95143a433836214a6ffa649/models/plugin/plugin.go#L51-L62 |
153,697 | thecodeteam/gorackhd | client/monorail_client.go | New | func New(transport runtime.ClientTransport, formats strfmt.Registry) *Monorail {
cli := new(Monorail)
cli.Transport = transport
cli.Catalog = catalog.New(transport, formats)
cli.Catalogs = catalogs.New(transport, formats)
cli.Config = config.New(transport, formats)
cli.Delete = delete.New(transport, formats)
cli.Dhcp = dhcp.New(transport, formats)
cli.Files = files.New(transport, formats)
cli.Get = get.New(transport, formats)
cli.Identify = identify.New(transport, formats)
cli.Lookups = lookups.New(transport, formats)
cli.Nodes = nodes.New(transport, formats)
cli.Obm = obm.New(transport, formats)
cli.Obms = obms.New(transport, formats)
cli.Patch = patch.New(transport, formats)
cli.Pollers = pollers.New(transport, formats)
cli.Post = post.New(transport, formats)
cli.Profiles = profiles.New(transport, formats)
cli.Put = put.New(transport, formats)
cli.Skus = skus.New(transport, formats)
cli.Tags = tags.New(transport, formats)
cli.Task = task.New(transport, formats)
cli.Templates = templates.New(transport, formats)
cli.Versions = versions.New(transport, formats)
cli.Whitelist = whitelist.New(transport, formats)
cli.Workflow = workflow.New(transport, formats)
return cli
} | go | func New(transport runtime.ClientTransport, formats strfmt.Registry) *Monorail {
cli := new(Monorail)
cli.Transport = transport
cli.Catalog = catalog.New(transport, formats)
cli.Catalogs = catalogs.New(transport, formats)
cli.Config = config.New(transport, formats)
cli.Delete = delete.New(transport, formats)
cli.Dhcp = dhcp.New(transport, formats)
cli.Files = files.New(transport, formats)
cli.Get = get.New(transport, formats)
cli.Identify = identify.New(transport, formats)
cli.Lookups = lookups.New(transport, formats)
cli.Nodes = nodes.New(transport, formats)
cli.Obm = obm.New(transport, formats)
cli.Obms = obms.New(transport, formats)
cli.Patch = patch.New(transport, formats)
cli.Pollers = pollers.New(transport, formats)
cli.Post = post.New(transport, formats)
cli.Profiles = profiles.New(transport, formats)
cli.Put = put.New(transport, formats)
cli.Skus = skus.New(transport, formats)
cli.Tags = tags.New(transport, formats)
cli.Task = task.New(transport, formats)
cli.Templates = templates.New(transport, formats)
cli.Versions = versions.New(transport, formats)
cli.Whitelist = whitelist.New(transport, formats)
cli.Workflow = workflow.New(transport, formats)
return cli
} | [
"func",
"New",
"(",
"transport",
"runtime",
".",
"ClientTransport",
",",
"formats",
"strfmt",
".",
"Registry",
")",
"*",
"Monorail",
"{",
"cli",
":=",
"new",
"(",
"Monorail",
")",
"\n",
"cli",
".",
"Transport",
"=",
"transport",
"\n\n",
"cli",
".",
"Cata... | // New creates a new monorail client | [
"New",
"creates",
"a",
"new",
"monorail",
"client"
] | 66bd88ab29593b880ba59b35db2c17a4b4bab1f1 | https://github.com/thecodeteam/gorackhd/blob/66bd88ab29593b880ba59b35db2c17a4b4bab1f1/client/monorail_client.go#L51-L104 |
153,698 | thecodeteam/gorackhd | client/get/get_nodes_identifier_pollers_parameters.go | WithIdentifier | func (o *GetNodesIdentifierPollersParams) WithIdentifier(identifier string) *GetNodesIdentifierPollersParams {
o.Identifier = identifier
return o
} | go | func (o *GetNodesIdentifierPollersParams) WithIdentifier(identifier string) *GetNodesIdentifierPollersParams {
o.Identifier = identifier
return o
} | [
"func",
"(",
"o",
"*",
"GetNodesIdentifierPollersParams",
")",
"WithIdentifier",
"(",
"identifier",
"string",
")",
"*",
"GetNodesIdentifierPollersParams",
"{",
"o",
".",
"Identifier",
"=",
"identifier",
"\n",
"return",
"o",
"\n",
"}"
] | // WithIdentifier adds the identifier to the get nodes identifier pollers params | [
"WithIdentifier",
"adds",
"the",
"identifier",
"to",
"the",
"get",
"nodes",
"identifier",
"pollers",
"params"
] | 66bd88ab29593b880ba59b35db2c17a4b4bab1f1 | https://github.com/thecodeteam/gorackhd/blob/66bd88ab29593b880ba59b35db2c17a4b4bab1f1/client/get/get_nodes_identifier_pollers_parameters.go#L53-L56 |
153,699 | bearded-web/bearded | pkg/manager/files.go | GetById | func (m *FileManager) GetById(id string) (*file.File, error) {
f, err := m.grid.OpenId(id)
if err != nil {
return nil, stackerr.Wrap(err)
}
meta := &file.Meta{}
if err = f.GetMeta(meta); err != nil {
return nil, stackerr.Wrap(err)
}
meta.MD5 = f.MD5()
return &file.File{Meta: meta, ReadCloser: f}, nil
} | go | func (m *FileManager) GetById(id string) (*file.File, error) {
f, err := m.grid.OpenId(id)
if err != nil {
return nil, stackerr.Wrap(err)
}
meta := &file.Meta{}
if err = f.GetMeta(meta); err != nil {
return nil, stackerr.Wrap(err)
}
meta.MD5 = f.MD5()
return &file.File{Meta: meta, ReadCloser: f}, nil
} | [
"func",
"(",
"m",
"*",
"FileManager",
")",
"GetById",
"(",
"id",
"string",
")",
"(",
"*",
"file",
".",
"File",
",",
"error",
")",
"{",
"f",
",",
"err",
":=",
"m",
".",
"grid",
".",
"OpenId",
"(",
"id",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{"... | // Get file by id, don't forget to close file after | [
"Get",
"file",
"by",
"id",
"don",
"t",
"forget",
"to",
"close",
"file",
"after"
] | c937b9e05d299400e95143a433836214a6ffa649 | https://github.com/bearded-web/bearded/blob/c937b9e05d299400e95143a433836214a6ffa649/pkg/manager/files.go#L22-L33 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.