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 listlengths 21 1.41k | docstring stringlengths 6 2.61k | docstring_tokens listlengths 3 215 | sha stringlengths 40 40 | url stringlengths 85 252 |
|---|---|---|---|---|---|---|---|---|---|---|---|
17,500 | thriftrw/thriftrw-go | gen/equals.go | Equals | func (e *equalsGenerator) Equals(g Generator, spec compile.TypeSpec, lhs, rhs string) (string, error) {
if isPrimitiveType(spec) {
if _, isEnum := spec.(*compile.EnumSpec); !isEnum {
return fmt.Sprintf("(%s == %s)", lhs, rhs), nil
}
}
switch s := spec.(type) {
case *compile.BinarySpec:
bytes := g.Import("... | go | func (e *equalsGenerator) Equals(g Generator, spec compile.TypeSpec, lhs, rhs string) (string, error) {
if isPrimitiveType(spec) {
if _, isEnum := spec.(*compile.EnumSpec); !isEnum {
return fmt.Sprintf("(%s == %s)", lhs, rhs), nil
}
}
switch s := spec.(type) {
case *compile.BinarySpec:
bytes := g.Import("... | [
"func",
"(",
"e",
"*",
"equalsGenerator",
")",
"Equals",
"(",
"g",
"Generator",
",",
"spec",
"compile",
".",
"TypeSpec",
",",
"lhs",
",",
"rhs",
"string",
")",
"(",
"string",
",",
"error",
")",
"{",
"if",
"isPrimitiveType",
"(",
"spec",
")",
"{",
"if... | // Equals generates a string comparing rhs to the given lhs.
// Equals generates an expression of type bool. | [
"Equals",
"generates",
"a",
"string",
"comparing",
"rhs",
"to",
"the",
"given",
"lhs",
".",
"Equals",
"generates",
"an",
"expression",
"of",
"type",
"bool",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/gen/equals.go#L39-L63 |
17,501 | thriftrw/thriftrw-go | gen/equals.go | EqualsPtr | func (e *equalsGenerator) EqualsPtr(g Generator, spec compile.TypeSpec, lhs, rhs string) (string, error) {
if !isPrimitiveType(spec) {
// Everything else is a reference type that has a Equals method on it.
return g.TextTemplate(
`((<.LHS> == nil && <.RHS> == nil) || (<.LHS> != nil && <.RHS> != nil && <equals .S... | go | func (e *equalsGenerator) EqualsPtr(g Generator, spec compile.TypeSpec, lhs, rhs string) (string, error) {
if !isPrimitiveType(spec) {
// Everything else is a reference type that has a Equals method on it.
return g.TextTemplate(
`((<.LHS> == nil && <.RHS> == nil) || (<.LHS> != nil && <.RHS> != nil && <equals .S... | [
"func",
"(",
"e",
"*",
"equalsGenerator",
")",
"EqualsPtr",
"(",
"g",
"Generator",
",",
"spec",
"compile",
".",
"TypeSpec",
",",
"lhs",
",",
"rhs",
"string",
")",
"(",
"string",
",",
"error",
")",
"{",
"if",
"!",
"isPrimitiveType",
"(",
"spec",
")",
... | // EqualsPtr is the same as Equals except `lhs` and `rhs` are expected to be a
// reference to a value of the given type. | [
"EqualsPtr",
"is",
"the",
"same",
"as",
"Equals",
"except",
"lhs",
"and",
"rhs",
"are",
"expected",
"to",
"be",
"a",
"reference",
"to",
"a",
"value",
"of",
"the",
"given",
"type",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/gen/equals.go#L67-L104 |
17,502 | thriftrw/thriftrw-go | internal/envelope/client.go | NewClient | func NewClient(p protocol.Protocol, t Transport) Client {
return client{p: p, t: t}
} | go | func NewClient(p protocol.Protocol, t Transport) Client {
return client{p: p, t: t}
} | [
"func",
"NewClient",
"(",
"p",
"protocol",
".",
"Protocol",
",",
"t",
"Transport",
")",
"Client",
"{",
"return",
"client",
"{",
"p",
":",
"p",
",",
"t",
":",
"t",
"}",
"\n",
"}"
] | // NewClient builds a new client which sends requests over the given
// transport, encoding them using the given protocol. | [
"NewClient",
"builds",
"a",
"new",
"client",
"which",
"sends",
"requests",
"over",
"the",
"given",
"transport",
"encoding",
"them",
"using",
"the",
"given",
"protocol",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/internal/envelope/client.go#L47-L49 |
17,503 | thriftrw/thriftrw-go | internal/envelope/client.go | Send | func (c client) Send(name string, reqValue wire.Value) (wire.Value, error) {
reqEnvelope := wire.Envelope{
Name: name,
Type: wire.Call,
SeqID: 1, // don't care
Value: reqValue,
}
// TODO(abg): We don't use or support out-of-order requests and responses
// for plugin communaction so this should be fine fo... | go | func (c client) Send(name string, reqValue wire.Value) (wire.Value, error) {
reqEnvelope := wire.Envelope{
Name: name,
Type: wire.Call,
SeqID: 1, // don't care
Value: reqValue,
}
// TODO(abg): We don't use or support out-of-order requests and responses
// for plugin communaction so this should be fine fo... | [
"func",
"(",
"c",
"client",
")",
"Send",
"(",
"name",
"string",
",",
"reqValue",
"wire",
".",
"Value",
")",
"(",
"wire",
".",
"Value",
",",
"error",
")",
"{",
"reqEnvelope",
":=",
"wire",
".",
"Envelope",
"{",
"Name",
":",
"name",
",",
"Type",
":",... | // Send sends the given request envelope over this transport. | [
"Send",
"sends",
"the",
"given",
"request",
"envelope",
"over",
"this",
"transport",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/internal/envelope/client.go#L57-L98 |
17,504 | thriftrw/thriftrw-go | gen/constant.go | Constant | func Constant(g Generator, c *compile.Constant) error {
err := g.DeclareFromTemplate(
`<formatDoc .Doc><if canBeConstant .Type>const<else>var<end> <constantName .Name> <typeReference .Type> = <constantValue .Value .Type>`,
c,
TemplateFunc("constantValue", ConstantValue),
TemplateFunc("canBeConstant", canBeCons... | go | func Constant(g Generator, c *compile.Constant) error {
err := g.DeclareFromTemplate(
`<formatDoc .Doc><if canBeConstant .Type>const<else>var<end> <constantName .Name> <typeReference .Type> = <constantValue .Value .Type>`,
c,
TemplateFunc("constantValue", ConstantValue),
TemplateFunc("canBeConstant", canBeCons... | [
"func",
"Constant",
"(",
"g",
"Generator",
",",
"c",
"*",
"compile",
".",
"Constant",
")",
"error",
"{",
"err",
":=",
"g",
".",
"DeclareFromTemplate",
"(",
"`<formatDoc .Doc><if canBeConstant .Type>const<else>var<end> <constantName .Name> <typeReference .Type> = <constantValu... | // Constant generates code for `const` expressions in Thrift files. | [
"Constant",
"generates",
"code",
"for",
"const",
"expressions",
"in",
"Thrift",
"files",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/gen/constant.go#L31-L40 |
17,505 | thriftrw/thriftrw-go | gen/constant.go | ConstantValue | func ConstantValue(g Generator, c compile.ConstantValue, t compile.TypeSpec) (string, error) {
switch v := c.(type) {
case compile.ConstantBool:
return constantBool(g, v, t)
case compile.ConstantDouble:
return constantDouble(g, v, t)
case compile.ConstantInt:
return constantInt(g, v, t)
case compile.Constant... | go | func ConstantValue(g Generator, c compile.ConstantValue, t compile.TypeSpec) (string, error) {
switch v := c.(type) {
case compile.ConstantBool:
return constantBool(g, v, t)
case compile.ConstantDouble:
return constantDouble(g, v, t)
case compile.ConstantInt:
return constantInt(g, v, t)
case compile.Constant... | [
"func",
"ConstantValue",
"(",
"g",
"Generator",
",",
"c",
"compile",
".",
"ConstantValue",
",",
"t",
"compile",
".",
"TypeSpec",
")",
"(",
"string",
",",
"error",
")",
"{",
"switch",
"v",
":=",
"c",
".",
"(",
"type",
")",
"{",
"case",
"compile",
".",... | // ConstantValue generates an expression containing the given constant value of
// the given type.
//
// The constant must already have been linked to the given type. | [
"ConstantValue",
"generates",
"an",
"expression",
"containing",
"the",
"given",
"constant",
"value",
"of",
"the",
"given",
"type",
".",
"The",
"constant",
"must",
"already",
"have",
"been",
"linked",
"to",
"the",
"given",
"type",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/gen/constant.go#L46-L74 |
17,506 | thriftrw/thriftrw-go | gen/enum.go | verifyUniqueEnumItemLabels | func verifyUniqueEnumItemLabels(spec *compile.EnumSpec) error {
items := spec.Items
used := make(map[string]compile.EnumItem, len(items))
for _, i := range items {
itemName := entityLabel(&i)
if conflict, isUsed := used[itemName]; isUsed {
return fmt.Errorf(
"item %q with label %q conflicts with item %q i... | go | func verifyUniqueEnumItemLabels(spec *compile.EnumSpec) error {
items := spec.Items
used := make(map[string]compile.EnumItem, len(items))
for _, i := range items {
itemName := entityLabel(&i)
if conflict, isUsed := used[itemName]; isUsed {
return fmt.Errorf(
"item %q with label %q conflicts with item %q i... | [
"func",
"verifyUniqueEnumItemLabels",
"(",
"spec",
"*",
"compile",
".",
"EnumSpec",
")",
"error",
"{",
"items",
":=",
"spec",
".",
"Items",
"\n",
"used",
":=",
"make",
"(",
"map",
"[",
"string",
"]",
"compile",
".",
"EnumItem",
",",
"len",
"(",
"items",
... | // verifyUniqueEnumItemLabels verifies that the labels for the enum items in
// the given enum don't conflict. | [
"verifyUniqueEnumItemLabels",
"verifies",
"that",
"the",
"labels",
"for",
"the",
"enum",
"items",
"in",
"the",
"given",
"enum",
"don",
"t",
"conflict",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/gen/enum.go#L304-L317 |
17,507 | thriftrw/thriftrw-go | gen/enum.go | enumUniqueItems | func enumUniqueItems(items []compile.EnumItem) []compile.EnumItem {
used := make(map[int32]struct{}, len(items))
filtered := items[:0] // zero-alloc filtering
for _, i := range items {
if _, isUsed := used[i.Value]; isUsed {
continue
}
filtered = append(filtered, i)
used[i.Value] = struct{}{}
}
return f... | go | func enumUniqueItems(items []compile.EnumItem) []compile.EnumItem {
used := make(map[int32]struct{}, len(items))
filtered := items[:0] // zero-alloc filtering
for _, i := range items {
if _, isUsed := used[i.Value]; isUsed {
continue
}
filtered = append(filtered, i)
used[i.Value] = struct{}{}
}
return f... | [
"func",
"enumUniqueItems",
"(",
"items",
"[",
"]",
"compile",
".",
"EnumItem",
")",
"[",
"]",
"compile",
".",
"EnumItem",
"{",
"used",
":=",
"make",
"(",
"map",
"[",
"int32",
"]",
"struct",
"{",
"}",
",",
"len",
"(",
"items",
")",
")",
"\n",
"filte... | // enumUniqueItems returns a subset of the given list of enum items where
// there are no value collisions between items. | [
"enumUniqueItems",
"returns",
"a",
"subset",
"of",
"the",
"given",
"list",
"of",
"enum",
"items",
"where",
"there",
"are",
"no",
"value",
"collisions",
"between",
"items",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/gen/enum.go#L321-L332 |
17,508 | thriftrw/thriftrw-go | compile/namespace.go | claim | func (n namespace) claim(name string, line int) error {
s := n.transform(name)
if line, ok := n.names[s]; ok {
return nameConflict{name: name, line: line}
}
n.names[s] = line
return nil
} | go | func (n namespace) claim(name string, line int) error {
s := n.transform(name)
if line, ok := n.names[s]; ok {
return nameConflict{name: name, line: line}
}
n.names[s] = line
return nil
} | [
"func",
"(",
"n",
"namespace",
")",
"claim",
"(",
"name",
"string",
",",
"line",
"int",
")",
"error",
"{",
"s",
":=",
"n",
".",
"transform",
"(",
"name",
")",
"\n",
"if",
"line",
",",
"ok",
":=",
"n",
".",
"names",
"[",
"s",
"]",
";",
"ok",
"... | // claim requests the given name in the namespace. If the name is already
// claimed, an error will be returned. | [
"claim",
"requests",
"the",
"given",
"name",
"in",
"the",
"namespace",
".",
"If",
"the",
"name",
"is",
"already",
"claimed",
"an",
"error",
"will",
"be",
"returned",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/compile/namespace.go#L57-L64 |
17,509 | thriftrw/thriftrw-go | compile/constant.go | compileConstant | func compileConstant(file string, src *ast.Constant) (*Constant, error) {
typ, err := compileTypeReference(src.Type)
if err != nil {
return nil, err
}
return &Constant{
Name: src.Name,
File: file,
Type: typ,
Doc: src.Doc,
Value: compileConstantValue(src.Value),
}, nil
} | go | func compileConstant(file string, src *ast.Constant) (*Constant, error) {
typ, err := compileTypeReference(src.Type)
if err != nil {
return nil, err
}
return &Constant{
Name: src.Name,
File: file,
Type: typ,
Doc: src.Doc,
Value: compileConstantValue(src.Value),
}, nil
} | [
"func",
"compileConstant",
"(",
"file",
"string",
",",
"src",
"*",
"ast",
".",
"Constant",
")",
"(",
"*",
"Constant",
",",
"error",
")",
"{",
"typ",
",",
"err",
":=",
"compileTypeReference",
"(",
"src",
".",
"Type",
")",
"\n",
"if",
"err",
"!=",
"nil... | // compileConstant builds a Constant from the given AST constant. | [
"compileConstant",
"builds",
"a",
"Constant",
"from",
"the",
"given",
"AST",
"constant",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/compile/constant.go#L41-L54 |
17,510 | thriftrw/thriftrw-go | compile/constant.go | Link | func (c *Constant) Link(scope Scope) (err error) {
if c.linked() {
return nil
}
if c.Type, err = c.Type.Link(scope); err != nil {
return compileError{Target: c.Name, Reason: err}
}
if c.Value, err = c.Value.Link(scope, c.Type); err != nil {
return compileError{Target: c.Name, Reason: err}
}
return nil
} | go | func (c *Constant) Link(scope Scope) (err error) {
if c.linked() {
return nil
}
if c.Type, err = c.Type.Link(scope); err != nil {
return compileError{Target: c.Name, Reason: err}
}
if c.Value, err = c.Value.Link(scope, c.Type); err != nil {
return compileError{Target: c.Name, Reason: err}
}
return nil
} | [
"func",
"(",
"c",
"*",
"Constant",
")",
"Link",
"(",
"scope",
"Scope",
")",
"(",
"err",
"error",
")",
"{",
"if",
"c",
".",
"linked",
"(",
")",
"{",
"return",
"nil",
"\n",
"}",
"\n\n",
"if",
"c",
".",
"Type",
",",
"err",
"=",
"c",
".",
"Type",... | // Link resolves any references made by the constant. | [
"Link",
"resolves",
"any",
"references",
"made",
"by",
"the",
"constant",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/compile/constant.go#L57-L71 |
17,511 | thriftrw/thriftrw-go | gen/string.go | isAllCaps | func isAllCaps(s string) bool {
for _, r := range s {
if unicode.IsLetter(r) && !unicode.IsUpper(r) {
return false
}
}
return true
} | go | func isAllCaps(s string) bool {
for _, r := range s {
if unicode.IsLetter(r) && !unicode.IsUpper(r) {
return false
}
}
return true
} | [
"func",
"isAllCaps",
"(",
"s",
"string",
")",
"bool",
"{",
"for",
"_",
",",
"r",
":=",
"range",
"s",
"{",
"if",
"unicode",
".",
"IsLetter",
"(",
"r",
")",
"&&",
"!",
"unicode",
".",
"IsUpper",
"(",
"r",
")",
"{",
"return",
"false",
"\n",
"}",
"... | // isAllCaps checks if a string contains all capital letters only. Non-letters
// are not considered. | [
"isAllCaps",
"checks",
"if",
"a",
"string",
"contains",
"all",
"capital",
"letters",
"only",
".",
"Non",
"-",
"letters",
"are",
"not",
"considered",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/gen/string.go#L34-L41 |
17,512 | thriftrw/thriftrw-go | gen/string.go | pascalCase | func pascalCase(allowAllCaps bool, words ...string) string {
for i, chunk := range words {
if len(chunk) == 0 {
// foo__bar
continue
}
// known initalism
init := strings.ToUpper(chunk)
if _, ok := commonInitialisms[init]; ok {
words[i] = init
continue
}
// Was SCREAMING_SNAKE_CASE and not a... | go | func pascalCase(allowAllCaps bool, words ...string) string {
for i, chunk := range words {
if len(chunk) == 0 {
// foo__bar
continue
}
// known initalism
init := strings.ToUpper(chunk)
if _, ok := commonInitialisms[init]; ok {
words[i] = init
continue
}
// Was SCREAMING_SNAKE_CASE and not a... | [
"func",
"pascalCase",
"(",
"allowAllCaps",
"bool",
",",
"words",
"...",
"string",
")",
"string",
"{",
"for",
"i",
",",
"chunk",
":=",
"range",
"words",
"{",
"if",
"len",
"(",
"chunk",
")",
"==",
"0",
"{",
"// foo__bar",
"continue",
"\n",
"}",
"\n\n",
... | // pascalCase combines the given words using PascalCase.
//
// If allowAllCaps is true, when an all-caps word that is not a known
// abbreviation is encountered, it is left unchanged. Otherwise, it is
// Titlecased. | [
"pascalCase",
"combines",
"the",
"given",
"words",
"using",
"PascalCase",
".",
"If",
"allowAllCaps",
"is",
"true",
"when",
"an",
"all",
"-",
"caps",
"word",
"that",
"is",
"not",
"a",
"known",
"abbreviation",
"is",
"encountered",
"it",
"is",
"left",
"unchange... | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/gen/string.go#L48-L77 |
17,513 | thriftrw/thriftrw-go | gen/string.go | goCase | func goCase(s string) string {
if len(s) == 0 {
panic(fmt.Sprintf("%q is not a valid identifier", s))
}
words := strings.Split(s, "_")
return pascalCase(len(words) == 1 /* all caps */, words...)
// goCase allows all caps only if the string is a single all caps word.
// That is, "FOO" is allowed but "FOO_BAR" i... | go | func goCase(s string) string {
if len(s) == 0 {
panic(fmt.Sprintf("%q is not a valid identifier", s))
}
words := strings.Split(s, "_")
return pascalCase(len(words) == 1 /* all caps */, words...)
// goCase allows all caps only if the string is a single all caps word.
// That is, "FOO" is allowed but "FOO_BAR" i... | [
"func",
"goCase",
"(",
"s",
"string",
")",
"string",
"{",
"if",
"len",
"(",
"s",
")",
"==",
"0",
"{",
"panic",
"(",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"s",
")",
")",
"\n",
"}",
"\n\n",
"words",
":=",
"strings",
".",
"Split",
"(",
"s... | // goCase converts strings into PascalCase. | [
"goCase",
"converts",
"strings",
"into",
"PascalCase",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/gen/string.go#L84-L93 |
17,514 | thriftrw/thriftrw-go | internal/frame/server.go | NewServer | func NewServer(r io.Reader, w io.Writer) *Server {
return &Server{
r: NewReader(r),
w: NewWriter(w),
running: atomic.NewBool(false),
}
} | go | func NewServer(r io.Reader, w io.Writer) *Server {
return &Server{
r: NewReader(r),
w: NewWriter(w),
running: atomic.NewBool(false),
}
} | [
"func",
"NewServer",
"(",
"r",
"io",
".",
"Reader",
",",
"w",
"io",
".",
"Writer",
")",
"*",
"Server",
"{",
"return",
"&",
"Server",
"{",
"r",
":",
"NewReader",
"(",
"r",
")",
",",
"w",
":",
"NewWriter",
"(",
"w",
")",
",",
"running",
":",
"ato... | // NewServer builds a new server which reads requests from the given Reader
// and writes responses to the given Writer. | [
"NewServer",
"builds",
"a",
"new",
"server",
"which",
"reads",
"requests",
"from",
"the",
"given",
"Reader",
"and",
"writes",
"responses",
"to",
"the",
"given",
"Writer",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/internal/frame/server.go#L49-L55 |
17,515 | thriftrw/thriftrw-go | internal/frame/server.go | Serve | func (s *Server) Serve(h Handler) (err error) {
if s.running.Swap(true) {
return fmt.Errorf("server is already running")
}
defer func() {
err = multierr.Append(err, s.r.Close())
err = multierr.Append(err, s.w.Close())
}()
for s.running.Load() {
req, err := s.r.Read()
if err != nil {
// If the error ... | go | func (s *Server) Serve(h Handler) (err error) {
if s.running.Swap(true) {
return fmt.Errorf("server is already running")
}
defer func() {
err = multierr.Append(err, s.r.Close())
err = multierr.Append(err, s.w.Close())
}()
for s.running.Load() {
req, err := s.r.Read()
if err != nil {
// If the error ... | [
"func",
"(",
"s",
"*",
"Server",
")",
"Serve",
"(",
"h",
"Handler",
")",
"(",
"err",
"error",
")",
"{",
"if",
"s",
".",
"running",
".",
"Swap",
"(",
"true",
")",
"{",
"return",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"d... | // Serve serves the given Handler with the Server.
//
// Only one request is served at a time. The server stops handling requests if
// there is an IO error or an unhandled error is received from the Handler.
//
// This blocks until the server is stopped using Stop. | [
"Serve",
"serves",
"the",
"given",
"Handler",
"with",
"the",
"Server",
".",
"Only",
"one",
"request",
"is",
"served",
"at",
"a",
"time",
".",
"The",
"server",
"stops",
"handling",
"requests",
"if",
"there",
"is",
"an",
"IO",
"error",
"or",
"an",
"unhandl... | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/internal/frame/server.go#L63-L95 |
17,516 | thriftrw/thriftrw-go | internal/frame/server.go | Stop | func (s *Server) Stop() error {
// We only close the reader because we want the writer to be available if
// Stop() was called by a request handler which still needs to send back a
// response (goodbye()). The writer will be closed automatically when the
// loop exits.
if s.running.Swap(false) {
return s.r.Close... | go | func (s *Server) Stop() error {
// We only close the reader because we want the writer to be available if
// Stop() was called by a request handler which still needs to send back a
// response (goodbye()). The writer will be closed automatically when the
// loop exits.
if s.running.Swap(false) {
return s.r.Close... | [
"func",
"(",
"s",
"*",
"Server",
")",
"Stop",
"(",
")",
"error",
"{",
"// We only close the reader because we want the writer to be available if",
"// Stop() was called by a request handler which still needs to send back a",
"// response (goodbye()). The writer will be closed automatically... | // Stop tells the Server that it's okay to stop Serve.
//
// This is a no-op if the server wasn't already running. | [
"Stop",
"tells",
"the",
"Server",
"that",
"it",
"s",
"okay",
"to",
"stop",
"Serve",
".",
"This",
"is",
"a",
"no",
"-",
"op",
"if",
"the",
"server",
"wasn",
"t",
"already",
"running",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/internal/frame/server.go#L100-L109 |
17,517 | thriftrw/thriftrw-go | gen/embedidl.go | embedIDL | func embedIDL(g Generator, i thriftPackageImporter, m *compile.Module) error {
pkg, err := i.Package(m.ThriftPath)
if err != nil {
return wrapGenerateError("idl embedding", err)
}
packageRelPath, err := i.RelativeThriftFilePath(m.ThriftPath)
if err != nil {
return wrapGenerateError("idl embedding", err)
}
h... | go | func embedIDL(g Generator, i thriftPackageImporter, m *compile.Module) error {
pkg, err := i.Package(m.ThriftPath)
if err != nil {
return wrapGenerateError("idl embedding", err)
}
packageRelPath, err := i.RelativeThriftFilePath(m.ThriftPath)
if err != nil {
return wrapGenerateError("idl embedding", err)
}
h... | [
"func",
"embedIDL",
"(",
"g",
"Generator",
",",
"i",
"thriftPackageImporter",
",",
"m",
"*",
"compile",
".",
"Module",
")",
"error",
"{",
"pkg",
",",
"err",
":=",
"i",
".",
"Package",
"(",
"m",
".",
"ThriftPath",
")",
"\n",
"if",
"err",
"!=",
"nil",
... | // embedIDL generate Go code with a full copy of the IDL embeded. | [
"embedIDL",
"generate",
"Go",
"code",
"with",
"a",
"full",
"copy",
"of",
"the",
"IDL",
"embeded",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/gen/embedidl.go#L32-L88 |
17,518 | thriftrw/thriftrw-go | plugin/api/types.go | String | func (v *Argument) String() string {
if v == nil {
return "<nil>"
}
var fields [2]string
i := 0
fields[i] = fmt.Sprintf("Name: %v", v.Name)
i++
fields[i] = fmt.Sprintf("Type: %v", v.Type)
i++
return fmt.Sprintf("Argument{%v}", strings.Join(fields[:i], ", "))
} | go | func (v *Argument) String() string {
if v == nil {
return "<nil>"
}
var fields [2]string
i := 0
fields[i] = fmt.Sprintf("Name: %v", v.Name)
i++
fields[i] = fmt.Sprintf("Type: %v", v.Type)
i++
return fmt.Sprintf("Argument{%v}", strings.Join(fields[:i], ", "))
} | [
"func",
"(",
"v",
"*",
"Argument",
")",
"String",
"(",
")",
"string",
"{",
"if",
"v",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n\n",
"var",
"fields",
"[",
"2",
"]",
"string",
"\n",
"i",
":=",
"0",
"\n",
"fields",
"[",
"i",
"]",
"=... | // String returns a readable string representation of a Argument
// struct. | [
"String",
"returns",
"a",
"readable",
"string",
"representation",
"of",
"a",
"Argument",
"struct",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L163-L176 |
17,519 | thriftrw/thriftrw-go | plugin/api/types.go | Equals | func (v *Argument) Equals(rhs *Argument) bool {
if v == nil {
return rhs == nil
} else if rhs == nil {
return false
}
if !(v.Name == rhs.Name) {
return false
}
if !v.Type.Equals(rhs.Type) {
return false
}
return true
} | go | func (v *Argument) Equals(rhs *Argument) bool {
if v == nil {
return rhs == nil
} else if rhs == nil {
return false
}
if !(v.Name == rhs.Name) {
return false
}
if !v.Type.Equals(rhs.Type) {
return false
}
return true
} | [
"func",
"(",
"v",
"*",
"Argument",
")",
"Equals",
"(",
"rhs",
"*",
"Argument",
")",
"bool",
"{",
"if",
"v",
"==",
"nil",
"{",
"return",
"rhs",
"==",
"nil",
"\n",
"}",
"else",
"if",
"rhs",
"==",
"nil",
"{",
"return",
"false",
"\n",
"}",
"\n",
"i... | // Equals returns true if all the fields of this Argument match the
// provided Argument.
//
// This function performs a deep comparison. | [
"Equals",
"returns",
"true",
"if",
"all",
"the",
"fields",
"of",
"this",
"Argument",
"match",
"the",
"provided",
"Argument",
".",
"This",
"function",
"performs",
"a",
"deep",
"comparison",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L182-L196 |
17,520 | thriftrw/thriftrw-go | plugin/api/types.go | MarshalLogObject | func (v *Argument) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
if v == nil {
return nil
}
enc.AddString("name", v.Name)
err = multierr.Append(err, enc.AddObject("type", v.Type))
return err
} | go | func (v *Argument) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
if v == nil {
return nil
}
enc.AddString("name", v.Name)
err = multierr.Append(err, enc.AddObject("type", v.Type))
return err
} | [
"func",
"(",
"v",
"*",
"Argument",
")",
"MarshalLogObject",
"(",
"enc",
"zapcore",
".",
"ObjectEncoder",
")",
"(",
"err",
"error",
")",
"{",
"if",
"v",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"enc",
".",
"AddString",
"(",
"\"",
"\"",
",... | // MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of Argument. | [
"MarshalLogObject",
"implements",
"zapcore",
".",
"ObjectMarshaler",
"enabling",
"fast",
"logging",
"of",
"Argument",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L200-L207 |
17,521 | thriftrw/thriftrw-go | plugin/api/types.go | MarshalLogObject | func (v Feature) MarshalLogObject(enc zapcore.ObjectEncoder) error {
enc.AddInt32("value", int32(v))
switch int32(v) {
case 1:
enc.AddString("name", "SERVICE_GENERATOR")
}
return nil
} | go | func (v Feature) MarshalLogObject(enc zapcore.ObjectEncoder) error {
enc.AddInt32("value", int32(v))
switch int32(v) {
case 1:
enc.AddString("name", "SERVICE_GENERATOR")
}
return nil
} | [
"func",
"(",
"v",
"Feature",
")",
"MarshalLogObject",
"(",
"enc",
"zapcore",
".",
"ObjectEncoder",
")",
"error",
"{",
"enc",
".",
"AddInt32",
"(",
"\"",
"\"",
",",
"int32",
"(",
"v",
")",
")",
"\n",
"switch",
"int32",
"(",
"v",
")",
"{",
"case",
"1... | // MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of Feature.
// Enums are logged as objects, where the value is logged with key "value", and
// if this value's name is known, the name is logged with key "name". | [
"MarshalLogObject",
"implements",
"zapcore",
".",
"ObjectMarshaler",
"enabling",
"fast",
"logging",
"of",
"Feature",
".",
"Enums",
"are",
"logged",
"as",
"objects",
"where",
"the",
"value",
"is",
"logged",
"with",
"key",
"value",
"and",
"if",
"this",
"value",
... | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L289-L296 |
17,522 | thriftrw/thriftrw-go | plugin/api/types.go | String | func (v Feature) String() string {
w := int32(v)
switch w {
case 1:
return "SERVICE_GENERATOR"
}
return fmt.Sprintf("Feature(%d)", w)
} | go | func (v Feature) String() string {
w := int32(v)
switch w {
case 1:
return "SERVICE_GENERATOR"
}
return fmt.Sprintf("Feature(%d)", w)
} | [
"func",
"(",
"v",
"Feature",
")",
"String",
"(",
")",
"string",
"{",
"w",
":=",
"int32",
"(",
"v",
")",
"\n",
"switch",
"w",
"{",
"case",
"1",
":",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
... | // String returns a readable string representation of Feature. | [
"String",
"returns",
"a",
"readable",
"string",
"representation",
"of",
"Feature",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L331-L338 |
17,523 | thriftrw/thriftrw-go | plugin/api/types.go | MarshalJSON | func (v Feature) MarshalJSON() ([]byte, error) {
switch int32(v) {
case 1:
return ([]byte)("\"SERVICE_GENERATOR\""), nil
}
return ([]byte)(strconv.FormatInt(int64(v), 10)), nil
} | go | func (v Feature) MarshalJSON() ([]byte, error) {
switch int32(v) {
case 1:
return ([]byte)("\"SERVICE_GENERATOR\""), nil
}
return ([]byte)(strconv.FormatInt(int64(v), 10)), nil
} | [
"func",
"(",
"v",
"Feature",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"switch",
"int32",
"(",
"v",
")",
"{",
"case",
"1",
":",
"return",
"(",
"[",
"]",
"byte",
")",
"(",
"\"",
"\\\"",
"\\\"",
"\"",
")",
","... | // MarshalJSON serializes Feature into JSON.
//
// If the enum value is recognized, its name is returned. Otherwise,
// its integer value is returned.
//
// This implements json.Marshaler. | [
"MarshalJSON",
"serializes",
"Feature",
"into",
"JSON",
".",
"If",
"the",
"enum",
"value",
"is",
"recognized",
"its",
"name",
"is",
"returned",
".",
"Otherwise",
"its",
"integer",
"value",
"is",
"returned",
".",
"This",
"implements",
"json",
".",
"Marshaler",
... | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L352-L358 |
17,524 | thriftrw/thriftrw-go | plugin/api/types.go | String | func (v *Function) String() string {
if v == nil {
return "<nil>"
}
var fields [7]string
i := 0
fields[i] = fmt.Sprintf("Name: %v", v.Name)
i++
fields[i] = fmt.Sprintf("ThriftName: %v", v.ThriftName)
i++
fields[i] = fmt.Sprintf("Arguments: %v", v.Arguments)
i++
if v.ReturnType != nil {
fields[i] = fmt.S... | go | func (v *Function) String() string {
if v == nil {
return "<nil>"
}
var fields [7]string
i := 0
fields[i] = fmt.Sprintf("Name: %v", v.Name)
i++
fields[i] = fmt.Sprintf("ThriftName: %v", v.ThriftName)
i++
fields[i] = fmt.Sprintf("Arguments: %v", v.Arguments)
i++
if v.ReturnType != nil {
fields[i] = fmt.S... | [
"func",
"(",
"v",
"*",
"Function",
")",
"String",
"(",
")",
"string",
"{",
"if",
"v",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n\n",
"var",
"fields",
"[",
"7",
"]",
"string",
"\n",
"i",
":=",
"0",
"\n",
"fields",
"[",
"i",
"]",
"=... | // String returns a readable string representation of a Function
// struct. | [
"String",
"returns",
"a",
"readable",
"string",
"representation",
"of",
"a",
"Function",
"struct",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L732-L763 |
17,525 | thriftrw/thriftrw-go | plugin/api/types.go | Equals | func (v *Function) Equals(rhs *Function) bool {
if v == nil {
return rhs == nil
} else if rhs == nil {
return false
}
if !(v.Name == rhs.Name) {
return false
}
if !(v.ThriftName == rhs.ThriftName) {
return false
}
if !_List_Argument_Equals(v.Arguments, rhs.Arguments) {
return false
}
if !((v.ReturnT... | go | func (v *Function) Equals(rhs *Function) bool {
if v == nil {
return rhs == nil
} else if rhs == nil {
return false
}
if !(v.Name == rhs.Name) {
return false
}
if !(v.ThriftName == rhs.ThriftName) {
return false
}
if !_List_Argument_Equals(v.Arguments, rhs.Arguments) {
return false
}
if !((v.ReturnT... | [
"func",
"(",
"v",
"*",
"Function",
")",
"Equals",
"(",
"rhs",
"*",
"Function",
")",
"bool",
"{",
"if",
"v",
"==",
"nil",
"{",
"return",
"rhs",
"==",
"nil",
"\n",
"}",
"else",
"if",
"rhs",
"==",
"nil",
"{",
"return",
"false",
"\n",
"}",
"\n",
"i... | // Equals returns true if all the fields of this Function match the
// provided Function.
//
// This function performs a deep comparison. | [
"Equals",
"returns",
"true",
"if",
"all",
"the",
"fields",
"of",
"this",
"Function",
"match",
"the",
"provided",
"Function",
".",
"This",
"function",
"performs",
"a",
"deep",
"comparison",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L811-L840 |
17,526 | thriftrw/thriftrw-go | plugin/api/types.go | MarshalLogObject | func (v *Function) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
if v == nil {
return nil
}
enc.AddString("name", v.Name)
enc.AddString("thriftName", v.ThriftName)
err = multierr.Append(err, enc.AddArray("arguments", (_List_Argument_Zapper)(v.Arguments)))
if v.ReturnType != nil {
err = multierr.Ap... | go | func (v *Function) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
if v == nil {
return nil
}
enc.AddString("name", v.Name)
enc.AddString("thriftName", v.ThriftName)
err = multierr.Append(err, enc.AddArray("arguments", (_List_Argument_Zapper)(v.Arguments)))
if v.ReturnType != nil {
err = multierr.Ap... | [
"func",
"(",
"v",
"*",
"Function",
")",
"MarshalLogObject",
"(",
"enc",
"zapcore",
".",
"ObjectEncoder",
")",
"(",
"err",
"error",
")",
"{",
"if",
"v",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"enc",
".",
"AddString",
"(",
"\"",
"\"",
",... | // MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of Function. | [
"MarshalLogObject",
"implements",
"zapcore",
".",
"ObjectMarshaler",
"enabling",
"fast",
"logging",
"of",
"Function",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L866-L886 |
17,527 | thriftrw/thriftrw-go | plugin/api/types.go | GetArguments | func (v *Function) GetArguments() (o []*Argument) {
if v != nil {
o = v.Arguments
}
return
} | go | func (v *Function) GetArguments() (o []*Argument) {
if v != nil {
o = v.Arguments
}
return
} | [
"func",
"(",
"v",
"*",
"Function",
")",
"GetArguments",
"(",
")",
"(",
"o",
"[",
"]",
"*",
"Argument",
")",
"{",
"if",
"v",
"!=",
"nil",
"{",
"o",
"=",
"v",
".",
"Arguments",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] | // GetArguments returns the value of Arguments if it is set or its
// zero value if it is unset. | [
"GetArguments",
"returns",
"the",
"value",
"of",
"Arguments",
"if",
"it",
"is",
"set",
"or",
"its",
"zero",
"value",
"if",
"it",
"is",
"unset",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L908-L913 |
17,528 | thriftrw/thriftrw-go | plugin/api/types.go | GetReturnType | func (v *Function) GetReturnType() (o *Type) {
if v != nil && v.ReturnType != nil {
return v.ReturnType
}
return
} | go | func (v *Function) GetReturnType() (o *Type) {
if v != nil && v.ReturnType != nil {
return v.ReturnType
}
return
} | [
"func",
"(",
"v",
"*",
"Function",
")",
"GetReturnType",
"(",
")",
"(",
"o",
"*",
"Type",
")",
"{",
"if",
"v",
"!=",
"nil",
"&&",
"v",
".",
"ReturnType",
"!=",
"nil",
"{",
"return",
"v",
".",
"ReturnType",
"\n",
"}",
"\n\n",
"return",
"\n",
"}"
] | // GetReturnType returns the value of ReturnType if it is set or its
// zero value if it is unset. | [
"GetReturnType",
"returns",
"the",
"value",
"of",
"ReturnType",
"if",
"it",
"is",
"set",
"or",
"its",
"zero",
"value",
"if",
"it",
"is",
"unset",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L922-L928 |
17,529 | thriftrw/thriftrw-go | plugin/api/types.go | GetExceptions | func (v *Function) GetExceptions() (o []*Argument) {
if v != nil && v.Exceptions != nil {
return v.Exceptions
}
return
} | go | func (v *Function) GetExceptions() (o []*Argument) {
if v != nil && v.Exceptions != nil {
return v.Exceptions
}
return
} | [
"func",
"(",
"v",
"*",
"Function",
")",
"GetExceptions",
"(",
")",
"(",
"o",
"[",
"]",
"*",
"Argument",
")",
"{",
"if",
"v",
"!=",
"nil",
"&&",
"v",
".",
"Exceptions",
"!=",
"nil",
"{",
"return",
"v",
".",
"Exceptions",
"\n",
"}",
"\n\n",
"return... | // GetExceptions returns the value of Exceptions if it is set or its
// zero value if it is unset. | [
"GetExceptions",
"returns",
"the",
"value",
"of",
"Exceptions",
"if",
"it",
"is",
"set",
"or",
"its",
"zero",
"value",
"if",
"it",
"is",
"unset",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L937-L943 |
17,530 | thriftrw/thriftrw-go | plugin/api/types.go | GetOneWay | func (v *Function) GetOneWay() (o bool) {
if v != nil && v.OneWay != nil {
return *v.OneWay
}
return
} | go | func (v *Function) GetOneWay() (o bool) {
if v != nil && v.OneWay != nil {
return *v.OneWay
}
return
} | [
"func",
"(",
"v",
"*",
"Function",
")",
"GetOneWay",
"(",
")",
"(",
"o",
"bool",
")",
"{",
"if",
"v",
"!=",
"nil",
"&&",
"v",
".",
"OneWay",
"!=",
"nil",
"{",
"return",
"*",
"v",
".",
"OneWay",
"\n",
"}",
"\n\n",
"return",
"\n",
"}"
] | // GetOneWay returns the value of OneWay if it is set or its
// zero value if it is unset. | [
"GetOneWay",
"returns",
"the",
"value",
"of",
"OneWay",
"if",
"it",
"is",
"set",
"or",
"its",
"zero",
"value",
"if",
"it",
"is",
"unset",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L952-L958 |
17,531 | thriftrw/thriftrw-go | plugin/api/types.go | String | func (v *GenerateServiceRequest) String() string {
if v == nil {
return "<nil>"
}
var fields [5]string
i := 0
fields[i] = fmt.Sprintf("RootServices: %v", v.RootServices)
i++
fields[i] = fmt.Sprintf("Services: %v", v.Services)
i++
fields[i] = fmt.Sprintf("Modules: %v", v.Modules)
i++
fields[i] = fmt.Sprint... | go | func (v *GenerateServiceRequest) String() string {
if v == nil {
return "<nil>"
}
var fields [5]string
i := 0
fields[i] = fmt.Sprintf("RootServices: %v", v.RootServices)
i++
fields[i] = fmt.Sprintf("Services: %v", v.Services)
i++
fields[i] = fmt.Sprintf("Modules: %v", v.Modules)
i++
fields[i] = fmt.Sprint... | [
"func",
"(",
"v",
"*",
"GenerateServiceRequest",
")",
"String",
"(",
")",
"string",
"{",
"if",
"v",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n\n",
"var",
"fields",
"[",
"5",
"]",
"string",
"\n",
"i",
":=",
"0",
"\n",
"fields",
"[",
"i... | // String returns a readable string representation of a GenerateServiceRequest
// struct. | [
"String",
"returns",
"a",
"readable",
"string",
"representation",
"of",
"a",
"GenerateServiceRequest",
"struct",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L1374-L1393 |
17,532 | thriftrw/thriftrw-go | plugin/api/types.go | Equals | func (v *GenerateServiceRequest) Equals(rhs *GenerateServiceRequest) bool {
if v == nil {
return rhs == nil
} else if rhs == nil {
return false
}
if !_List_ServiceID_Equals(v.RootServices, rhs.RootServices) {
return false
}
if !_Map_ServiceID_Service_Equals(v.Services, rhs.Services) {
return false
}
if ... | go | func (v *GenerateServiceRequest) Equals(rhs *GenerateServiceRequest) bool {
if v == nil {
return rhs == nil
} else if rhs == nil {
return false
}
if !_List_ServiceID_Equals(v.RootServices, rhs.RootServices) {
return false
}
if !_Map_ServiceID_Service_Equals(v.Services, rhs.Services) {
return false
}
if ... | [
"func",
"(",
"v",
"*",
"GenerateServiceRequest",
")",
"Equals",
"(",
"rhs",
"*",
"GenerateServiceRequest",
")",
"bool",
"{",
"if",
"v",
"==",
"nil",
"{",
"return",
"rhs",
"==",
"nil",
"\n",
"}",
"else",
"if",
"rhs",
"==",
"nil",
"{",
"return",
"false",... | // Equals returns true if all the fields of this GenerateServiceRequest match the
// provided GenerateServiceRequest.
//
// This function performs a deep comparison. | [
"Equals",
"returns",
"true",
"if",
"all",
"the",
"fields",
"of",
"this",
"GenerateServiceRequest",
"match",
"the",
"provided",
"GenerateServiceRequest",
".",
"This",
"function",
"performs",
"a",
"deep",
"comparison",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L1448-L1471 |
17,533 | thriftrw/thriftrw-go | plugin/api/types.go | MarshalLogArray | func (l _List_ServiceID_Zapper) MarshalLogArray(enc zapcore.ArrayEncoder) (err error) {
for _, v := range l {
enc.AppendInt32((int32)(v))
}
return err
} | go | func (l _List_ServiceID_Zapper) MarshalLogArray(enc zapcore.ArrayEncoder) (err error) {
for _, v := range l {
enc.AppendInt32((int32)(v))
}
return err
} | [
"func",
"(",
"l",
"_List_ServiceID_Zapper",
")",
"MarshalLogArray",
"(",
"enc",
"zapcore",
".",
"ArrayEncoder",
")",
"(",
"err",
"error",
")",
"{",
"for",
"_",
",",
"v",
":=",
"range",
"l",
"{",
"enc",
".",
"AppendInt32",
"(",
"(",
"int32",
")",
"(",
... | // MarshalLogArray implements zapcore.ArrayMarshaler, enabling
// fast logging of _List_ServiceID_Zapper. | [
"MarshalLogArray",
"implements",
"zapcore",
".",
"ArrayMarshaler",
"enabling",
"fast",
"logging",
"of",
"_List_ServiceID_Zapper",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L1477-L1482 |
17,534 | thriftrw/thriftrw-go | plugin/api/types.go | MarshalLogArray | func (m _Map_ServiceID_Service_Zapper) MarshalLogArray(enc zapcore.ArrayEncoder) (err error) {
for k, v := range m {
err = multierr.Append(err, enc.AppendObject(_Map_ServiceID_Service_Item_Zapper{Key: k, Value: v}))
}
return err
} | go | func (m _Map_ServiceID_Service_Zapper) MarshalLogArray(enc zapcore.ArrayEncoder) (err error) {
for k, v := range m {
err = multierr.Append(err, enc.AppendObject(_Map_ServiceID_Service_Item_Zapper{Key: k, Value: v}))
}
return err
} | [
"func",
"(",
"m",
"_Map_ServiceID_Service_Zapper",
")",
"MarshalLogArray",
"(",
"enc",
"zapcore",
".",
"ArrayEncoder",
")",
"(",
"err",
"error",
")",
"{",
"for",
"k",
",",
"v",
":=",
"range",
"m",
"{",
"err",
"=",
"multierr",
".",
"Append",
"(",
"err",
... | // MarshalLogArray implements zapcore.ArrayMarshaler, enabling
// fast logging of _Map_ServiceID_Service_Zapper. | [
"MarshalLogArray",
"implements",
"zapcore",
".",
"ArrayMarshaler",
"enabling",
"fast",
"logging",
"of",
"_Map_ServiceID_Service_Zapper",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L1501-L1506 |
17,535 | thriftrw/thriftrw-go | plugin/api/types.go | MarshalLogObject | func (v _Map_ModuleID_Module_Item_Zapper) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
enc.AddInt32("key", (int32)(v.Key))
err = multierr.Append(err, enc.AddObject("value", v.Value))
return err
} | go | func (v _Map_ModuleID_Module_Item_Zapper) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
enc.AddInt32("key", (int32)(v.Key))
err = multierr.Append(err, enc.AddObject("value", v.Value))
return err
} | [
"func",
"(",
"v",
"_Map_ModuleID_Module_Item_Zapper",
")",
"MarshalLogObject",
"(",
"enc",
"zapcore",
".",
"ObjectEncoder",
")",
"(",
"err",
"error",
")",
"{",
"enc",
".",
"AddInt32",
"(",
"\"",
"\"",
",",
"(",
"int32",
")",
"(",
"v",
".",
"Key",
")",
... | // MarshalLogArray implements zapcore.ArrayMarshaler, enabling
// fast logging of _Map_ModuleID_Module_Item_Zapper. | [
"MarshalLogArray",
"implements",
"zapcore",
".",
"ArrayMarshaler",
"enabling",
"fast",
"logging",
"of",
"_Map_ModuleID_Module_Item_Zapper",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L1515-L1519 |
17,536 | thriftrw/thriftrw-go | plugin/api/types.go | MarshalLogArray | func (m _Map_ModuleID_Module_Zapper) MarshalLogArray(enc zapcore.ArrayEncoder) (err error) {
for k, v := range m {
err = multierr.Append(err, enc.AppendObject(_Map_ModuleID_Module_Item_Zapper{Key: k, Value: v}))
}
return err
} | go | func (m _Map_ModuleID_Module_Zapper) MarshalLogArray(enc zapcore.ArrayEncoder) (err error) {
for k, v := range m {
err = multierr.Append(err, enc.AppendObject(_Map_ModuleID_Module_Item_Zapper{Key: k, Value: v}))
}
return err
} | [
"func",
"(",
"m",
"_Map_ModuleID_Module_Zapper",
")",
"MarshalLogArray",
"(",
"enc",
"zapcore",
".",
"ArrayEncoder",
")",
"(",
"err",
"error",
")",
"{",
"for",
"k",
",",
"v",
":=",
"range",
"m",
"{",
"err",
"=",
"multierr",
".",
"Append",
"(",
"err",
"... | // MarshalLogArray implements zapcore.ArrayMarshaler, enabling
// fast logging of _Map_ModuleID_Module_Zapper. | [
"MarshalLogArray",
"implements",
"zapcore",
".",
"ArrayMarshaler",
"enabling",
"fast",
"logging",
"of",
"_Map_ModuleID_Module_Zapper",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L1525-L1530 |
17,537 | thriftrw/thriftrw-go | plugin/api/types.go | MarshalLogObject | func (v *GenerateServiceRequest) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
if v == nil {
return nil
}
err = multierr.Append(err, enc.AddArray("rootServices", (_List_ServiceID_Zapper)(v.RootServices)))
err = multierr.Append(err, enc.AddArray("services", (_Map_ServiceID_Service_Zapper)(v.Services)))... | go | func (v *GenerateServiceRequest) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
if v == nil {
return nil
}
err = multierr.Append(err, enc.AddArray("rootServices", (_List_ServiceID_Zapper)(v.RootServices)))
err = multierr.Append(err, enc.AddArray("services", (_Map_ServiceID_Service_Zapper)(v.Services)))... | [
"func",
"(",
"v",
"*",
"GenerateServiceRequest",
")",
"MarshalLogObject",
"(",
"enc",
"zapcore",
".",
"ObjectEncoder",
")",
"(",
"err",
"error",
")",
"{",
"if",
"v",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"err",
"=",
"multierr",
".",
"Appe... | // MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of GenerateServiceRequest. | [
"MarshalLogObject",
"implements",
"zapcore",
".",
"ObjectMarshaler",
"enabling",
"fast",
"logging",
"of",
"GenerateServiceRequest",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L1534-L1544 |
17,538 | thriftrw/thriftrw-go | plugin/api/types.go | GetRootServices | func (v *GenerateServiceRequest) GetRootServices() (o []ServiceID) {
if v != nil {
o = v.RootServices
}
return
} | go | func (v *GenerateServiceRequest) GetRootServices() (o []ServiceID) {
if v != nil {
o = v.RootServices
}
return
} | [
"func",
"(",
"v",
"*",
"GenerateServiceRequest",
")",
"GetRootServices",
"(",
")",
"(",
"o",
"[",
"]",
"ServiceID",
")",
"{",
"if",
"v",
"!=",
"nil",
"{",
"o",
"=",
"v",
".",
"RootServices",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] | // GetRootServices returns the value of RootServices if it is set or its
// zero value if it is unset. | [
"GetRootServices",
"returns",
"the",
"value",
"of",
"RootServices",
"if",
"it",
"is",
"set",
"or",
"its",
"zero",
"value",
"if",
"it",
"is",
"unset",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L1548-L1553 |
17,539 | thriftrw/thriftrw-go | plugin/api/types.go | GetServices | func (v *GenerateServiceRequest) GetServices() (o map[ServiceID]*Service) {
if v != nil {
o = v.Services
}
return
} | go | func (v *GenerateServiceRequest) GetServices() (o map[ServiceID]*Service) {
if v != nil {
o = v.Services
}
return
} | [
"func",
"(",
"v",
"*",
"GenerateServiceRequest",
")",
"GetServices",
"(",
")",
"(",
"o",
"map",
"[",
"ServiceID",
"]",
"*",
"Service",
")",
"{",
"if",
"v",
"!=",
"nil",
"{",
"o",
"=",
"v",
".",
"Services",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] | // GetServices returns the value of Services if it is set or its
// zero value if it is unset. | [
"GetServices",
"returns",
"the",
"value",
"of",
"Services",
"if",
"it",
"is",
"set",
"or",
"its",
"zero",
"value",
"if",
"it",
"is",
"unset",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L1562-L1567 |
17,540 | thriftrw/thriftrw-go | plugin/api/types.go | GetModules | func (v *GenerateServiceRequest) GetModules() (o map[ModuleID]*Module) {
if v != nil {
o = v.Modules
}
return
} | go | func (v *GenerateServiceRequest) GetModules() (o map[ModuleID]*Module) {
if v != nil {
o = v.Modules
}
return
} | [
"func",
"(",
"v",
"*",
"GenerateServiceRequest",
")",
"GetModules",
"(",
")",
"(",
"o",
"map",
"[",
"ModuleID",
"]",
"*",
"Module",
")",
"{",
"if",
"v",
"!=",
"nil",
"{",
"o",
"=",
"v",
".",
"Modules",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] | // GetModules returns the value of Modules if it is set or its
// zero value if it is unset. | [
"GetModules",
"returns",
"the",
"value",
"of",
"Modules",
"if",
"it",
"is",
"set",
"or",
"its",
"zero",
"value",
"if",
"it",
"is",
"unset",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L1576-L1581 |
17,541 | thriftrw/thriftrw-go | plugin/api/types.go | GetPackagePrefix | func (v *GenerateServiceRequest) GetPackagePrefix() (o string) {
if v != nil {
o = v.PackagePrefix
}
return
} | go | func (v *GenerateServiceRequest) GetPackagePrefix() (o string) {
if v != nil {
o = v.PackagePrefix
}
return
} | [
"func",
"(",
"v",
"*",
"GenerateServiceRequest",
")",
"GetPackagePrefix",
"(",
")",
"(",
"o",
"string",
")",
"{",
"if",
"v",
"!=",
"nil",
"{",
"o",
"=",
"v",
".",
"PackagePrefix",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] | // GetPackagePrefix returns the value of PackagePrefix if it is set or its
// zero value if it is unset. | [
"GetPackagePrefix",
"returns",
"the",
"value",
"of",
"PackagePrefix",
"if",
"it",
"is",
"set",
"or",
"its",
"zero",
"value",
"if",
"it",
"is",
"unset",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L1590-L1595 |
17,542 | thriftrw/thriftrw-go | plugin/api/types.go | GetThriftRoot | func (v *GenerateServiceRequest) GetThriftRoot() (o string) {
if v != nil {
o = v.ThriftRoot
}
return
} | go | func (v *GenerateServiceRequest) GetThriftRoot() (o string) {
if v != nil {
o = v.ThriftRoot
}
return
} | [
"func",
"(",
"v",
"*",
"GenerateServiceRequest",
")",
"GetThriftRoot",
"(",
")",
"(",
"o",
"string",
")",
"{",
"if",
"v",
"!=",
"nil",
"{",
"o",
"=",
"v",
".",
"ThriftRoot",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] | // GetThriftRoot returns the value of ThriftRoot if it is set or its
// zero value if it is unset. | [
"GetThriftRoot",
"returns",
"the",
"value",
"of",
"ThriftRoot",
"if",
"it",
"is",
"set",
"or",
"its",
"zero",
"value",
"if",
"it",
"is",
"unset",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L1599-L1604 |
17,543 | thriftrw/thriftrw-go | plugin/api/types.go | String | func (v *GenerateServiceResponse) String() string {
if v == nil {
return "<nil>"
}
var fields [1]string
i := 0
if v.Files != nil {
fields[i] = fmt.Sprintf("Files: %v", v.Files)
i++
}
return fmt.Sprintf("GenerateServiceResponse{%v}", strings.Join(fields[:i], ", "))
} | go | func (v *GenerateServiceResponse) String() string {
if v == nil {
return "<nil>"
}
var fields [1]string
i := 0
if v.Files != nil {
fields[i] = fmt.Sprintf("Files: %v", v.Files)
i++
}
return fmt.Sprintf("GenerateServiceResponse{%v}", strings.Join(fields[:i], ", "))
} | [
"func",
"(",
"v",
"*",
"GenerateServiceResponse",
")",
"String",
"(",
")",
"string",
"{",
"if",
"v",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n\n",
"var",
"fields",
"[",
"1",
"]",
"string",
"\n",
"i",
":=",
"0",
"\n",
"if",
"v",
".",
... | // String returns a readable string representation of a GenerateServiceResponse
// struct. | [
"String",
"returns",
"a",
"readable",
"string",
"representation",
"of",
"a",
"GenerateServiceResponse",
"struct",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L1757-L1770 |
17,544 | thriftrw/thriftrw-go | plugin/api/types.go | Equals | func (v *GenerateServiceResponse) Equals(rhs *GenerateServiceResponse) bool {
if v == nil {
return rhs == nil
} else if rhs == nil {
return false
}
if !((v.Files == nil && rhs.Files == nil) || (v.Files != nil && rhs.Files != nil && _Map_String_Binary_Equals(v.Files, rhs.Files))) {
return false
}
return tru... | go | func (v *GenerateServiceResponse) Equals(rhs *GenerateServiceResponse) bool {
if v == nil {
return rhs == nil
} else if rhs == nil {
return false
}
if !((v.Files == nil && rhs.Files == nil) || (v.Files != nil && rhs.Files != nil && _Map_String_Binary_Equals(v.Files, rhs.Files))) {
return false
}
return tru... | [
"func",
"(",
"v",
"*",
"GenerateServiceResponse",
")",
"Equals",
"(",
"rhs",
"*",
"GenerateServiceResponse",
")",
"bool",
"{",
"if",
"v",
"==",
"nil",
"{",
"return",
"rhs",
"==",
"nil",
"\n",
"}",
"else",
"if",
"rhs",
"==",
"nil",
"{",
"return",
"false... | // Equals returns true if all the fields of this GenerateServiceResponse match the
// provided GenerateServiceResponse.
//
// This function performs a deep comparison. | [
"Equals",
"returns",
"true",
"if",
"all",
"the",
"fields",
"of",
"this",
"GenerateServiceResponse",
"match",
"the",
"provided",
"GenerateServiceResponse",
".",
"This",
"function",
"performs",
"a",
"deep",
"comparison",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L1793-L1804 |
17,545 | thriftrw/thriftrw-go | plugin/api/types.go | MarshalLogObject | func (m _Map_String_Binary_Zapper) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
for k, v := range m {
enc.AddString((string)(k), base64.StdEncoding.EncodeToString(v))
}
return err
} | go | func (m _Map_String_Binary_Zapper) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
for k, v := range m {
enc.AddString((string)(k), base64.StdEncoding.EncodeToString(v))
}
return err
} | [
"func",
"(",
"m",
"_Map_String_Binary_Zapper",
")",
"MarshalLogObject",
"(",
"enc",
"zapcore",
".",
"ObjectEncoder",
")",
"(",
"err",
"error",
")",
"{",
"for",
"k",
",",
"v",
":=",
"range",
"m",
"{",
"enc",
".",
"AddString",
"(",
"(",
"string",
")",
"(... | // MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of _Map_String_Binary_Zapper. | [
"MarshalLogObject",
"implements",
"zapcore",
".",
"ObjectMarshaler",
"enabling",
"fast",
"logging",
"of",
"_Map_String_Binary_Zapper",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L1810-L1815 |
17,546 | thriftrw/thriftrw-go | plugin/api/types.go | MarshalLogObject | func (v *GenerateServiceResponse) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
if v == nil {
return nil
}
if v.Files != nil {
err = multierr.Append(err, enc.AddObject("files", (_Map_String_Binary_Zapper)(v.Files)))
}
return err
} | go | func (v *GenerateServiceResponse) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
if v == nil {
return nil
}
if v.Files != nil {
err = multierr.Append(err, enc.AddObject("files", (_Map_String_Binary_Zapper)(v.Files)))
}
return err
} | [
"func",
"(",
"v",
"*",
"GenerateServiceResponse",
")",
"MarshalLogObject",
"(",
"enc",
"zapcore",
".",
"ObjectEncoder",
")",
"(",
"err",
"error",
")",
"{",
"if",
"v",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"if",
"v",
".",
"Files",
"!=",
... | // MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of GenerateServiceResponse. | [
"MarshalLogObject",
"implements",
"zapcore",
".",
"ObjectMarshaler",
"enabling",
"fast",
"logging",
"of",
"GenerateServiceResponse",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L1819-L1827 |
17,547 | thriftrw/thriftrw-go | plugin/api/types.go | GetFiles | func (v *GenerateServiceResponse) GetFiles() (o map[string][]byte) {
if v != nil && v.Files != nil {
return v.Files
}
return
} | go | func (v *GenerateServiceResponse) GetFiles() (o map[string][]byte) {
if v != nil && v.Files != nil {
return v.Files
}
return
} | [
"func",
"(",
"v",
"*",
"GenerateServiceResponse",
")",
"GetFiles",
"(",
")",
"(",
"o",
"map",
"[",
"string",
"]",
"[",
"]",
"byte",
")",
"{",
"if",
"v",
"!=",
"nil",
"&&",
"v",
".",
"Files",
"!=",
"nil",
"{",
"return",
"v",
".",
"Files",
"\n",
... | // GetFiles returns the value of Files if it is set or its
// zero value if it is unset. | [
"GetFiles",
"returns",
"the",
"value",
"of",
"Files",
"if",
"it",
"is",
"set",
"or",
"its",
"zero",
"value",
"if",
"it",
"is",
"unset",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L1831-L1837 |
17,548 | thriftrw/thriftrw-go | plugin/api/types.go | String | func (v *HandshakeRequest) String() string {
if v == nil {
return "<nil>"
}
var fields [0]string
i := 0
return fmt.Sprintf("HandshakeRequest{%v}", strings.Join(fields[:i], ", "))
} | go | func (v *HandshakeRequest) String() string {
if v == nil {
return "<nil>"
}
var fields [0]string
i := 0
return fmt.Sprintf("HandshakeRequest{%v}", strings.Join(fields[:i], ", "))
} | [
"func",
"(",
"v",
"*",
"HandshakeRequest",
")",
"String",
"(",
")",
"string",
"{",
"if",
"v",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n\n",
"var",
"fields",
"[",
"0",
"]",
"string",
"\n",
"i",
":=",
"0",
"\n\n",
"return",
"fmt",
".",... | // String returns a readable string representation of a HandshakeRequest
// struct. | [
"String",
"returns",
"a",
"readable",
"string",
"representation",
"of",
"a",
"HandshakeRequest",
"struct",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L1902-L1911 |
17,549 | thriftrw/thriftrw-go | plugin/api/types.go | Equals | func (v *HandshakeRequest) Equals(rhs *HandshakeRequest) bool {
if v == nil {
return rhs == nil
} else if rhs == nil {
return false
}
return true
} | go | func (v *HandshakeRequest) Equals(rhs *HandshakeRequest) bool {
if v == nil {
return rhs == nil
} else if rhs == nil {
return false
}
return true
} | [
"func",
"(",
"v",
"*",
"HandshakeRequest",
")",
"Equals",
"(",
"rhs",
"*",
"HandshakeRequest",
")",
"bool",
"{",
"if",
"v",
"==",
"nil",
"{",
"return",
"rhs",
"==",
"nil",
"\n",
"}",
"else",
"if",
"rhs",
"==",
"nil",
"{",
"return",
"false",
"\n",
"... | // Equals returns true if all the fields of this HandshakeRequest match the
// provided HandshakeRequest.
//
// This function performs a deep comparison. | [
"Equals",
"returns",
"true",
"if",
"all",
"the",
"fields",
"of",
"this",
"HandshakeRequest",
"match",
"the",
"provided",
"HandshakeRequest",
".",
"This",
"function",
"performs",
"a",
"deep",
"comparison",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L1917-L1925 |
17,550 | thriftrw/thriftrw-go | plugin/api/types.go | MarshalLogObject | func (v *HandshakeRequest) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
if v == nil {
return nil
}
return err
} | go | func (v *HandshakeRequest) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
if v == nil {
return nil
}
return err
} | [
"func",
"(",
"v",
"*",
"HandshakeRequest",
")",
"MarshalLogObject",
"(",
"enc",
"zapcore",
".",
"ObjectEncoder",
")",
"(",
"err",
"error",
")",
"{",
"if",
"v",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"return",
"err",
"\n",
"}"
] | // MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of HandshakeRequest. | [
"MarshalLogObject",
"implements",
"zapcore",
".",
"ObjectMarshaler",
"enabling",
"fast",
"logging",
"of",
"HandshakeRequest",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L1929-L1934 |
17,551 | thriftrw/thriftrw-go | plugin/api/types.go | String | func (v *HandshakeResponse) String() string {
if v == nil {
return "<nil>"
}
var fields [4]string
i := 0
fields[i] = fmt.Sprintf("Name: %v", v.Name)
i++
fields[i] = fmt.Sprintf("APIVersion: %v", v.APIVersion)
i++
fields[i] = fmt.Sprintf("Features: %v", v.Features)
i++
if v.LibraryVersion != nil {
fields... | go | func (v *HandshakeResponse) String() string {
if v == nil {
return "<nil>"
}
var fields [4]string
i := 0
fields[i] = fmt.Sprintf("Name: %v", v.Name)
i++
fields[i] = fmt.Sprintf("APIVersion: %v", v.APIVersion)
i++
fields[i] = fmt.Sprintf("Features: %v", v.Features)
i++
if v.LibraryVersion != nil {
fields... | [
"func",
"(",
"v",
"*",
"HandshakeResponse",
")",
"String",
"(",
")",
"string",
"{",
"if",
"v",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n\n",
"var",
"fields",
"[",
"4",
"]",
"string",
"\n",
"i",
":=",
"0",
"\n",
"fields",
"[",
"i",
... | // String returns a readable string representation of a HandshakeResponse
// struct. | [
"String",
"returns",
"a",
"readable",
"string",
"representation",
"of",
"a",
"HandshakeResponse",
"struct",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L2141-L2160 |
17,552 | thriftrw/thriftrw-go | plugin/api/types.go | Equals | func (v *HandshakeResponse) Equals(rhs *HandshakeResponse) bool {
if v == nil {
return rhs == nil
} else if rhs == nil {
return false
}
if !(v.Name == rhs.Name) {
return false
}
if !(v.APIVersion == rhs.APIVersion) {
return false
}
if !_List_Feature_Equals(v.Features, rhs.Features) {
return false
}
... | go | func (v *HandshakeResponse) Equals(rhs *HandshakeResponse) bool {
if v == nil {
return rhs == nil
} else if rhs == nil {
return false
}
if !(v.Name == rhs.Name) {
return false
}
if !(v.APIVersion == rhs.APIVersion) {
return false
}
if !_List_Feature_Equals(v.Features, rhs.Features) {
return false
}
... | [
"func",
"(",
"v",
"*",
"HandshakeResponse",
")",
"Equals",
"(",
"rhs",
"*",
"HandshakeResponse",
")",
"bool",
"{",
"if",
"v",
"==",
"nil",
"{",
"return",
"rhs",
"==",
"nil",
"\n",
"}",
"else",
"if",
"rhs",
"==",
"nil",
"{",
"return",
"false",
"\n",
... | // Equals returns true if all the fields of this HandshakeResponse match the
// provided HandshakeResponse.
//
// This function performs a deep comparison. | [
"Equals",
"returns",
"true",
"if",
"all",
"the",
"fields",
"of",
"this",
"HandshakeResponse",
"match",
"the",
"provided",
"HandshakeResponse",
".",
"This",
"function",
"performs",
"a",
"deep",
"comparison",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L2191-L2211 |
17,553 | thriftrw/thriftrw-go | plugin/api/types.go | MarshalLogObject | func (v *HandshakeResponse) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
if v == nil {
return nil
}
enc.AddString("name", v.Name)
enc.AddInt32("apiVersion", v.APIVersion)
err = multierr.Append(err, enc.AddArray("features", (_List_Feature_Zapper)(v.Features)))
if v.LibraryVersion != nil {
enc.AddS... | go | func (v *HandshakeResponse) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
if v == nil {
return nil
}
enc.AddString("name", v.Name)
enc.AddInt32("apiVersion", v.APIVersion)
err = multierr.Append(err, enc.AddArray("features", (_List_Feature_Zapper)(v.Features)))
if v.LibraryVersion != nil {
enc.AddS... | [
"func",
"(",
"v",
"*",
"HandshakeResponse",
")",
"MarshalLogObject",
"(",
"enc",
"zapcore",
".",
"ObjectEncoder",
")",
"(",
"err",
"error",
")",
"{",
"if",
"v",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"enc",
".",
"AddString",
"(",
"\"",
"... | // MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of HandshakeResponse. | [
"MarshalLogObject",
"implements",
"zapcore",
".",
"ObjectMarshaler",
"enabling",
"fast",
"logging",
"of",
"HandshakeResponse",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L2226-L2237 |
17,554 | thriftrw/thriftrw-go | plugin/api/types.go | GetAPIVersion | func (v *HandshakeResponse) GetAPIVersion() (o int32) {
if v != nil {
o = v.APIVersion
}
return
} | go | func (v *HandshakeResponse) GetAPIVersion() (o int32) {
if v != nil {
o = v.APIVersion
}
return
} | [
"func",
"(",
"v",
"*",
"HandshakeResponse",
")",
"GetAPIVersion",
"(",
")",
"(",
"o",
"int32",
")",
"{",
"if",
"v",
"!=",
"nil",
"{",
"o",
"=",
"v",
".",
"APIVersion",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] | // GetAPIVersion returns the value of APIVersion if it is set or its
// zero value if it is unset. | [
"GetAPIVersion",
"returns",
"the",
"value",
"of",
"APIVersion",
"if",
"it",
"is",
"set",
"or",
"its",
"zero",
"value",
"if",
"it",
"is",
"unset",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L2250-L2255 |
17,555 | thriftrw/thriftrw-go | plugin/api/types.go | GetFeatures | func (v *HandshakeResponse) GetFeatures() (o []Feature) {
if v != nil {
o = v.Features
}
return
} | go | func (v *HandshakeResponse) GetFeatures() (o []Feature) {
if v != nil {
o = v.Features
}
return
} | [
"func",
"(",
"v",
"*",
"HandshakeResponse",
")",
"GetFeatures",
"(",
")",
"(",
"o",
"[",
"]",
"Feature",
")",
"{",
"if",
"v",
"!=",
"nil",
"{",
"o",
"=",
"v",
".",
"Features",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] | // GetFeatures returns the value of Features if it is set or its
// zero value if it is unset. | [
"GetFeatures",
"returns",
"the",
"value",
"of",
"Features",
"if",
"it",
"is",
"set",
"or",
"its",
"zero",
"value",
"if",
"it",
"is",
"unset",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L2259-L2264 |
17,556 | thriftrw/thriftrw-go | plugin/api/types.go | GetLibraryVersion | func (v *HandshakeResponse) GetLibraryVersion() (o string) {
if v != nil && v.LibraryVersion != nil {
return *v.LibraryVersion
}
return
} | go | func (v *HandshakeResponse) GetLibraryVersion() (o string) {
if v != nil && v.LibraryVersion != nil {
return *v.LibraryVersion
}
return
} | [
"func",
"(",
"v",
"*",
"HandshakeResponse",
")",
"GetLibraryVersion",
"(",
")",
"(",
"o",
"string",
")",
"{",
"if",
"v",
"!=",
"nil",
"&&",
"v",
".",
"LibraryVersion",
"!=",
"nil",
"{",
"return",
"*",
"v",
".",
"LibraryVersion",
"\n",
"}",
"\n\n",
"r... | // GetLibraryVersion returns the value of LibraryVersion if it is set or its
// zero value if it is unset. | [
"GetLibraryVersion",
"returns",
"the",
"value",
"of",
"LibraryVersion",
"if",
"it",
"is",
"set",
"or",
"its",
"zero",
"value",
"if",
"it",
"is",
"unset",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L2273-L2279 |
17,557 | thriftrw/thriftrw-go | plugin/api/types.go | String | func (v *Module) String() string {
if v == nil {
return "<nil>"
}
var fields [3]string
i := 0
fields[i] = fmt.Sprintf("ImportPath: %v", v.ImportPath)
i++
fields[i] = fmt.Sprintf("Directory: %v", v.Directory)
i++
fields[i] = fmt.Sprintf("ThriftFilePath: %v", v.ThriftFilePath)
i++
return fmt.Sprintf("Modul... | go | func (v *Module) String() string {
if v == nil {
return "<nil>"
}
var fields [3]string
i := 0
fields[i] = fmt.Sprintf("ImportPath: %v", v.ImportPath)
i++
fields[i] = fmt.Sprintf("Directory: %v", v.Directory)
i++
fields[i] = fmt.Sprintf("ThriftFilePath: %v", v.ThriftFilePath)
i++
return fmt.Sprintf("Modul... | [
"func",
"(",
"v",
"*",
"Module",
")",
"String",
"(",
")",
"string",
"{",
"if",
"v",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n\n",
"var",
"fields",
"[",
"3",
"]",
"string",
"\n",
"i",
":=",
"0",
"\n",
"fields",
"[",
"i",
"]",
"=",... | // String returns a readable string representation of a Module
// struct. | [
"String",
"returns",
"a",
"readable",
"string",
"representation",
"of",
"a",
"Module",
"struct",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L2419-L2434 |
17,558 | thriftrw/thriftrw-go | plugin/api/types.go | Equals | func (v *Module) Equals(rhs *Module) bool {
if v == nil {
return rhs == nil
} else if rhs == nil {
return false
}
if !(v.ImportPath == rhs.ImportPath) {
return false
}
if !(v.Directory == rhs.Directory) {
return false
}
if !(v.ThriftFilePath == rhs.ThriftFilePath) {
return false
}
return true
} | go | func (v *Module) Equals(rhs *Module) bool {
if v == nil {
return rhs == nil
} else if rhs == nil {
return false
}
if !(v.ImportPath == rhs.ImportPath) {
return false
}
if !(v.Directory == rhs.Directory) {
return false
}
if !(v.ThriftFilePath == rhs.ThriftFilePath) {
return false
}
return true
} | [
"func",
"(",
"v",
"*",
"Module",
")",
"Equals",
"(",
"rhs",
"*",
"Module",
")",
"bool",
"{",
"if",
"v",
"==",
"nil",
"{",
"return",
"rhs",
"==",
"nil",
"\n",
"}",
"else",
"if",
"rhs",
"==",
"nil",
"{",
"return",
"false",
"\n",
"}",
"\n",
"if",
... | // Equals returns true if all the fields of this Module match the
// provided Module.
//
// This function performs a deep comparison. | [
"Equals",
"returns",
"true",
"if",
"all",
"the",
"fields",
"of",
"this",
"Module",
"match",
"the",
"provided",
"Module",
".",
"This",
"function",
"performs",
"a",
"deep",
"comparison",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L2440-L2457 |
17,559 | thriftrw/thriftrw-go | plugin/api/types.go | MarshalLogObject | func (v *Module) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
if v == nil {
return nil
}
enc.AddString("importPath", v.ImportPath)
enc.AddString("directory", v.Directory)
enc.AddString("thriftFilePath", v.ThriftFilePath)
return err
} | go | func (v *Module) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
if v == nil {
return nil
}
enc.AddString("importPath", v.ImportPath)
enc.AddString("directory", v.Directory)
enc.AddString("thriftFilePath", v.ThriftFilePath)
return err
} | [
"func",
"(",
"v",
"*",
"Module",
")",
"MarshalLogObject",
"(",
"enc",
"zapcore",
".",
"ObjectEncoder",
")",
"(",
"err",
"error",
")",
"{",
"if",
"v",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"enc",
".",
"AddString",
"(",
"\"",
"\"",
",",... | // MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of Module. | [
"MarshalLogObject",
"implements",
"zapcore",
".",
"ObjectMarshaler",
"enabling",
"fast",
"logging",
"of",
"Module",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L2461-L2469 |
17,560 | thriftrw/thriftrw-go | plugin/api/types.go | GetDirectory | func (v *Module) GetDirectory() (o string) {
if v != nil {
o = v.Directory
}
return
} | go | func (v *Module) GetDirectory() (o string) {
if v != nil {
o = v.Directory
}
return
} | [
"func",
"(",
"v",
"*",
"Module",
")",
"GetDirectory",
"(",
")",
"(",
"o",
"string",
")",
"{",
"if",
"v",
"!=",
"nil",
"{",
"o",
"=",
"v",
".",
"Directory",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] | // GetDirectory returns the value of Directory if it is set or its
// zero value if it is unset. | [
"GetDirectory",
"returns",
"the",
"value",
"of",
"Directory",
"if",
"it",
"is",
"set",
"or",
"its",
"zero",
"value",
"if",
"it",
"is",
"unset",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L2482-L2487 |
17,561 | thriftrw/thriftrw-go | plugin/api/types.go | GetThriftFilePath | func (v *Module) GetThriftFilePath() (o string) {
if v != nil {
o = v.ThriftFilePath
}
return
} | go | func (v *Module) GetThriftFilePath() (o string) {
if v != nil {
o = v.ThriftFilePath
}
return
} | [
"func",
"(",
"v",
"*",
"Module",
")",
"GetThriftFilePath",
"(",
")",
"(",
"o",
"string",
")",
"{",
"if",
"v",
"!=",
"nil",
"{",
"o",
"=",
"v",
".",
"ThriftFilePath",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] | // GetThriftFilePath returns the value of ThriftFilePath if it is set or its
// zero value if it is unset. | [
"GetThriftFilePath",
"returns",
"the",
"value",
"of",
"ThriftFilePath",
"if",
"it",
"is",
"set",
"or",
"its",
"zero",
"value",
"if",
"it",
"is",
"unset",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L2491-L2496 |
17,562 | thriftrw/thriftrw-go | plugin/api/types.go | ToWire | func (v ModuleID) ToWire() (wire.Value, error) {
x := (int32)(v)
return wire.NewValueI32(x), error(nil)
} | go | func (v ModuleID) ToWire() (wire.Value, error) {
x := (int32)(v)
return wire.NewValueI32(x), error(nil)
} | [
"func",
"(",
"v",
"ModuleID",
")",
"ToWire",
"(",
")",
"(",
"wire",
".",
"Value",
",",
"error",
")",
"{",
"x",
":=",
"(",
"int32",
")",
"(",
"v",
")",
"\n",
"return",
"wire",
".",
"NewValueI32",
"(",
"x",
")",
",",
"error",
"(",
"nil",
")",
"... | // ToWire translates ModuleID into a Thrift-level intermediate
// representation. This intermediate representation may be serialized
// into bytes using a ThriftRW protocol implementation. | [
"ToWire",
"translates",
"ModuleID",
"into",
"a",
"Thrift",
"-",
"level",
"intermediate",
"representation",
".",
"This",
"intermediate",
"representation",
"may",
"be",
"serialized",
"into",
"bytes",
"using",
"a",
"ThriftRW",
"protocol",
"implementation",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L2510-L2513 |
17,563 | thriftrw/thriftrw-go | plugin/api/types.go | String | func (v ModuleID) String() string {
x := (int32)(v)
return fmt.Sprint(x)
} | go | func (v ModuleID) String() string {
x := (int32)(v)
return fmt.Sprint(x)
} | [
"func",
"(",
"v",
"ModuleID",
")",
"String",
"(",
")",
"string",
"{",
"x",
":=",
"(",
"int32",
")",
"(",
"v",
")",
"\n",
"return",
"fmt",
".",
"Sprint",
"(",
"x",
")",
"\n",
"}"
] | // String returns a readable string representation of ModuleID. | [
"String",
"returns",
"a",
"readable",
"string",
"representation",
"of",
"ModuleID",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L2516-L2519 |
17,564 | thriftrw/thriftrw-go | plugin/api/types.go | Equals | func (lhs ModuleID) Equals(rhs ModuleID) bool {
return ((int32)(lhs) == (int32)(rhs))
} | go | func (lhs ModuleID) Equals(rhs ModuleID) bool {
return ((int32)(lhs) == (int32)(rhs))
} | [
"func",
"(",
"lhs",
"ModuleID",
")",
"Equals",
"(",
"rhs",
"ModuleID",
")",
"bool",
"{",
"return",
"(",
"(",
"int32",
")",
"(",
"lhs",
")",
"==",
"(",
"int32",
")",
"(",
"rhs",
")",
")",
"\n",
"}"
] | // Equals returns true if this ModuleID is equal to the provided
// ModuleID. | [
"Equals",
"returns",
"true",
"if",
"this",
"ModuleID",
"is",
"equal",
"to",
"the",
"provided",
"ModuleID",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L2532-L2534 |
17,565 | thriftrw/thriftrw-go | plugin/api/types.go | String | func (v *Service) String() string {
if v == nil {
return "<nil>"
}
var fields [6]string
i := 0
fields[i] = fmt.Sprintf("Name: %v", v.Name)
i++
fields[i] = fmt.Sprintf("ThriftName: %v", v.ThriftName)
i++
if v.ParentID != nil {
fields[i] = fmt.Sprintf("ParentID: %v", *(v.ParentID))
i++
}
fields[i] = fmt... | go | func (v *Service) String() string {
if v == nil {
return "<nil>"
}
var fields [6]string
i := 0
fields[i] = fmt.Sprintf("Name: %v", v.Name)
i++
fields[i] = fmt.Sprintf("ThriftName: %v", v.ThriftName)
i++
if v.ParentID != nil {
fields[i] = fmt.Sprintf("ParentID: %v", *(v.ParentID))
i++
}
fields[i] = fmt... | [
"func",
"(",
"v",
"*",
"Service",
")",
"String",
"(",
")",
"string",
"{",
"if",
"v",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n\n",
"var",
"fields",
"[",
"6",
"]",
"string",
"\n",
"i",
":=",
"0",
"\n",
"fields",
"[",
"i",
"]",
"="... | // String returns a readable string representation of a Service
// struct. | [
"String",
"returns",
"a",
"readable",
"string",
"representation",
"of",
"a",
"Service",
"struct",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L2790-L2815 |
17,566 | thriftrw/thriftrw-go | plugin/api/types.go | Equals | func (v *Service) Equals(rhs *Service) bool {
if v == nil {
return rhs == nil
} else if rhs == nil {
return false
}
if !(v.Name == rhs.Name) {
return false
}
if !(v.ThriftName == rhs.ThriftName) {
return false
}
if !_ServiceID_EqualsPtr(v.ParentID, rhs.ParentID) {
return false
}
if !_List_Function_E... | go | func (v *Service) Equals(rhs *Service) bool {
if v == nil {
return rhs == nil
} else if rhs == nil {
return false
}
if !(v.Name == rhs.Name) {
return false
}
if !(v.ThriftName == rhs.ThriftName) {
return false
}
if !_ServiceID_EqualsPtr(v.ParentID, rhs.ParentID) {
return false
}
if !_List_Function_E... | [
"func",
"(",
"v",
"*",
"Service",
")",
"Equals",
"(",
"rhs",
"*",
"Service",
")",
"bool",
"{",
"if",
"v",
"==",
"nil",
"{",
"return",
"rhs",
"==",
"nil",
"\n",
"}",
"else",
"if",
"rhs",
"==",
"nil",
"{",
"return",
"false",
"\n",
"}",
"\n",
"if"... | // Equals returns true if all the fields of this Service match the
// provided Service.
//
// This function performs a deep comparison. | [
"Equals",
"returns",
"true",
"if",
"all",
"the",
"fields",
"of",
"this",
"Service",
"match",
"the",
"provided",
"Service",
".",
"This",
"function",
"performs",
"a",
"deep",
"comparison",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L2846-L2872 |
17,567 | thriftrw/thriftrw-go | plugin/api/types.go | MarshalLogObject | func (v *Service) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
if v == nil {
return nil
}
enc.AddString("name", v.Name)
enc.AddString("thriftName", v.ThriftName)
if v.ParentID != nil {
enc.AddInt32("parentID", (int32)(*v.ParentID))
}
err = multierr.Append(err, enc.AddArray("functions", (_List_Fu... | go | func (v *Service) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
if v == nil {
return nil
}
enc.AddString("name", v.Name)
enc.AddString("thriftName", v.ThriftName)
if v.ParentID != nil {
enc.AddInt32("parentID", (int32)(*v.ParentID))
}
err = multierr.Append(err, enc.AddArray("functions", (_List_Fu... | [
"func",
"(",
"v",
"*",
"Service",
")",
"MarshalLogObject",
"(",
"enc",
"zapcore",
".",
"ObjectEncoder",
")",
"(",
"err",
"error",
")",
"{",
"if",
"v",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"enc",
".",
"AddString",
"(",
"\"",
"\"",
","... | // MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of Service. | [
"MarshalLogObject",
"implements",
"zapcore",
".",
"ObjectMarshaler",
"enabling",
"fast",
"logging",
"of",
"Service",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L2887-L2902 |
17,568 | thriftrw/thriftrw-go | plugin/api/types.go | GetParentID | func (v *Service) GetParentID() (o ServiceID) {
if v != nil && v.ParentID != nil {
return *v.ParentID
}
return
} | go | func (v *Service) GetParentID() (o ServiceID) {
if v != nil && v.ParentID != nil {
return *v.ParentID
}
return
} | [
"func",
"(",
"v",
"*",
"Service",
")",
"GetParentID",
"(",
")",
"(",
"o",
"ServiceID",
")",
"{",
"if",
"v",
"!=",
"nil",
"&&",
"v",
".",
"ParentID",
"!=",
"nil",
"{",
"return",
"*",
"v",
".",
"ParentID",
"\n",
"}",
"\n\n",
"return",
"\n",
"}"
] | // GetParentID returns the value of ParentID if it is set or its
// zero value if it is unset. | [
"GetParentID",
"returns",
"the",
"value",
"of",
"ParentID",
"if",
"it",
"is",
"set",
"or",
"its",
"zero",
"value",
"if",
"it",
"is",
"unset",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L2924-L2930 |
17,569 | thriftrw/thriftrw-go | plugin/api/types.go | GetFunctions | func (v *Service) GetFunctions() (o []*Function) {
if v != nil {
o = v.Functions
}
return
} | go | func (v *Service) GetFunctions() (o []*Function) {
if v != nil {
o = v.Functions
}
return
} | [
"func",
"(",
"v",
"*",
"Service",
")",
"GetFunctions",
"(",
")",
"(",
"o",
"[",
"]",
"*",
"Function",
")",
"{",
"if",
"v",
"!=",
"nil",
"{",
"o",
"=",
"v",
".",
"Functions",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] | // GetFunctions returns the value of Functions if it is set or its
// zero value if it is unset. | [
"GetFunctions",
"returns",
"the",
"value",
"of",
"Functions",
"if",
"it",
"is",
"set",
"or",
"its",
"zero",
"value",
"if",
"it",
"is",
"unset",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L2939-L2944 |
17,570 | thriftrw/thriftrw-go | plugin/api/types.go | GetModuleID | func (v *Service) GetModuleID() (o ModuleID) {
if v != nil {
o = v.ModuleID
}
return
} | go | func (v *Service) GetModuleID() (o ModuleID) {
if v != nil {
o = v.ModuleID
}
return
} | [
"func",
"(",
"v",
"*",
"Service",
")",
"GetModuleID",
"(",
")",
"(",
"o",
"ModuleID",
")",
"{",
"if",
"v",
"!=",
"nil",
"{",
"o",
"=",
"v",
".",
"ModuleID",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] | // GetModuleID returns the value of ModuleID if it is set or its
// zero value if it is unset. | [
"GetModuleID",
"returns",
"the",
"value",
"of",
"ModuleID",
"if",
"it",
"is",
"set",
"or",
"its",
"zero",
"value",
"if",
"it",
"is",
"unset",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L2953-L2958 |
17,571 | thriftrw/thriftrw-go | plugin/api/types.go | String | func (v ServiceID) String() string {
x := (int32)(v)
return fmt.Sprint(x)
} | go | func (v ServiceID) String() string {
x := (int32)(v)
return fmt.Sprint(x)
} | [
"func",
"(",
"v",
"ServiceID",
")",
"String",
"(",
")",
"string",
"{",
"x",
":=",
"(",
"int32",
")",
"(",
"v",
")",
"\n",
"return",
"fmt",
".",
"Sprint",
"(",
"x",
")",
"\n",
"}"
] | // String returns a readable string representation of ServiceID. | [
"String",
"returns",
"a",
"readable",
"string",
"representation",
"of",
"ServiceID",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L2993-L2996 |
17,572 | thriftrw/thriftrw-go | plugin/api/types.go | FromWire | func (v *ServiceID) FromWire(w wire.Value) error {
x, err := w.GetI32(), error(nil)
*v = (ServiceID)(x)
return err
} | go | func (v *ServiceID) FromWire(w wire.Value) error {
x, err := w.GetI32(), error(nil)
*v = (ServiceID)(x)
return err
} | [
"func",
"(",
"v",
"*",
"ServiceID",
")",
"FromWire",
"(",
"w",
"wire",
".",
"Value",
")",
"error",
"{",
"x",
",",
"err",
":=",
"w",
".",
"GetI32",
"(",
")",
",",
"error",
"(",
"nil",
")",
"\n",
"*",
"v",
"=",
"(",
"ServiceID",
")",
"(",
"x",
... | // FromWire deserializes ServiceID from its Thrift-level
// representation. The Thrift-level representation may be obtained
// from a ThriftRW protocol implementation. | [
"FromWire",
"deserializes",
"ServiceID",
"from",
"its",
"Thrift",
"-",
"level",
"representation",
".",
"The",
"Thrift",
"-",
"level",
"representation",
"may",
"be",
"obtained",
"from",
"a",
"ThriftRW",
"protocol",
"implementation",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L3001-L3005 |
17,573 | thriftrw/thriftrw-go | plugin/api/types.go | Equals | func (lhs ServiceID) Equals(rhs ServiceID) bool {
return ((int32)(lhs) == (int32)(rhs))
} | go | func (lhs ServiceID) Equals(rhs ServiceID) bool {
return ((int32)(lhs) == (int32)(rhs))
} | [
"func",
"(",
"lhs",
"ServiceID",
")",
"Equals",
"(",
"rhs",
"ServiceID",
")",
"bool",
"{",
"return",
"(",
"(",
"int32",
")",
"(",
"lhs",
")",
"==",
"(",
"int32",
")",
"(",
"rhs",
")",
")",
"\n",
"}"
] | // Equals returns true if this ServiceID is equal to the provided
// ServiceID. | [
"Equals",
"returns",
"true",
"if",
"this",
"ServiceID",
"is",
"equal",
"to",
"the",
"provided",
"ServiceID",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L3009-L3011 |
17,574 | thriftrw/thriftrw-go | plugin/api/types.go | SimpleType_Values | func SimpleType_Values() []SimpleType {
return []SimpleType{
SimpleTypeBool,
SimpleTypeByte,
SimpleTypeInt8,
SimpleTypeInt16,
SimpleTypeInt32,
SimpleTypeInt64,
SimpleTypeFloat64,
SimpleTypeString,
SimpleTypeStructEmpty,
}
} | go | func SimpleType_Values() []SimpleType {
return []SimpleType{
SimpleTypeBool,
SimpleTypeByte,
SimpleTypeInt8,
SimpleTypeInt16,
SimpleTypeInt32,
SimpleTypeInt64,
SimpleTypeFloat64,
SimpleTypeString,
SimpleTypeStructEmpty,
}
} | [
"func",
"SimpleType_Values",
"(",
")",
"[",
"]",
"SimpleType",
"{",
"return",
"[",
"]",
"SimpleType",
"{",
"SimpleTypeBool",
",",
"SimpleTypeByte",
",",
"SimpleTypeInt8",
",",
"SimpleTypeInt16",
",",
"SimpleTypeInt32",
",",
"SimpleTypeInt64",
",",
"SimpleTypeFloat64... | // SimpleType_Values returns all recognized values of SimpleType. | [
"SimpleType_Values",
"returns",
"all",
"recognized",
"values",
"of",
"SimpleType",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L3029-L3041 |
17,575 | thriftrw/thriftrw-go | plugin/api/types.go | ToWire | func (v SimpleType) ToWire() (wire.Value, error) {
return wire.NewValueI32(int32(v)), nil
} | go | func (v SimpleType) ToWire() (wire.Value, error) {
return wire.NewValueI32(int32(v)), nil
} | [
"func",
"(",
"v",
"SimpleType",
")",
"ToWire",
"(",
")",
"(",
"wire",
".",
"Value",
",",
"error",
")",
"{",
"return",
"wire",
".",
"NewValueI32",
"(",
"int32",
"(",
"v",
")",
")",
",",
"nil",
"\n",
"}"
] | // ToWire translates SimpleType into a Thrift-level intermediate
// representation. This intermediate representation may be serialized
// into bytes using a ThriftRW protocol implementation.
//
// Enums are represented as 32-bit integers over the wire. | [
"ToWire",
"translates",
"SimpleType",
"into",
"a",
"Thrift",
"-",
"level",
"intermediate",
"representation",
".",
"This",
"intermediate",
"representation",
"may",
"be",
"serialized",
"into",
"bytes",
"using",
"a",
"ThriftRW",
"protocol",
"implementation",
".",
"Enum... | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L3156-L3158 |
17,576 | thriftrw/thriftrw-go | plugin/api/types.go | String | func (v SimpleType) String() string {
w := int32(v)
switch w {
case 1:
return "BOOL"
case 2:
return "BYTE"
case 3:
return "INT8"
case 4:
return "INT16"
case 5:
return "INT32"
case 6:
return "INT64"
case 7:
return "FLOAT64"
case 8:
return "STRING"
case 9:
return "STRUCT_EMPTY"
}
return fmt... | go | func (v SimpleType) String() string {
w := int32(v)
switch w {
case 1:
return "BOOL"
case 2:
return "BYTE"
case 3:
return "INT8"
case 4:
return "INT16"
case 5:
return "INT32"
case 6:
return "INT64"
case 7:
return "FLOAT64"
case 8:
return "STRING"
case 9:
return "STRUCT_EMPTY"
}
return fmt... | [
"func",
"(",
"v",
"SimpleType",
")",
"String",
"(",
")",
"string",
"{",
"w",
":=",
"int32",
"(",
"v",
")",
"\n",
"switch",
"w",
"{",
"case",
"1",
":",
"return",
"\"",
"\"",
"\n",
"case",
"2",
":",
"return",
"\"",
"\"",
"\n",
"case",
"3",
":",
... | // String returns a readable string representation of SimpleType. | [
"String",
"returns",
"a",
"readable",
"string",
"representation",
"of",
"SimpleType",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L3179-L3202 |
17,577 | thriftrw/thriftrw-go | plugin/api/types.go | String | func (v *Type) String() string {
if v == nil {
return "<nil>"
}
var fields [6]string
i := 0
if v.SimpleType != nil {
fields[i] = fmt.Sprintf("SimpleType: %v", *(v.SimpleType))
i++
}
if v.SliceType != nil {
fields[i] = fmt.Sprintf("SliceType: %v", v.SliceType)
i++
}
if v.KeyValueSliceType != nil {
... | go | func (v *Type) String() string {
if v == nil {
return "<nil>"
}
var fields [6]string
i := 0
if v.SimpleType != nil {
fields[i] = fmt.Sprintf("SimpleType: %v", *(v.SimpleType))
i++
}
if v.SliceType != nil {
fields[i] = fmt.Sprintf("SliceType: %v", v.SliceType)
i++
}
if v.KeyValueSliceType != nil {
... | [
"func",
"(",
"v",
"*",
"Type",
")",
"String",
"(",
")",
"string",
"{",
"if",
"v",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n\n",
"var",
"fields",
"[",
"6",
"]",
"string",
"\n",
"i",
":=",
"0",
"\n",
"if",
"v",
".",
"SimpleType",
"... | // String returns a readable string representation of a Type
// struct. | [
"String",
"returns",
"a",
"readable",
"string",
"representation",
"of",
"a",
"Type",
"struct",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L3497-L3530 |
17,578 | thriftrw/thriftrw-go | plugin/api/types.go | Equals | func (v *Type) Equals(rhs *Type) bool {
if v == nil {
return rhs == nil
} else if rhs == nil {
return false
}
if !_SimpleType_EqualsPtr(v.SimpleType, rhs.SimpleType) {
return false
}
if !((v.SliceType == nil && rhs.SliceType == nil) || (v.SliceType != nil && rhs.SliceType != nil && v.SliceType.Equals(rhs.Sl... | go | func (v *Type) Equals(rhs *Type) bool {
if v == nil {
return rhs == nil
} else if rhs == nil {
return false
}
if !_SimpleType_EqualsPtr(v.SimpleType, rhs.SimpleType) {
return false
}
if !((v.SliceType == nil && rhs.SliceType == nil) || (v.SliceType != nil && rhs.SliceType != nil && v.SliceType.Equals(rhs.Sl... | [
"func",
"(",
"v",
"*",
"Type",
")",
"Equals",
"(",
"rhs",
"*",
"Type",
")",
"bool",
"{",
"if",
"v",
"==",
"nil",
"{",
"return",
"rhs",
"==",
"nil",
"\n",
"}",
"else",
"if",
"rhs",
"==",
"nil",
"{",
"return",
"false",
"\n",
"}",
"\n",
"if",
"!... | // Equals returns true if all the fields of this Type match the
// provided Type.
//
// This function performs a deep comparison. | [
"Equals",
"returns",
"true",
"if",
"all",
"the",
"fields",
"of",
"this",
"Type",
"match",
"the",
"provided",
"Type",
".",
"This",
"function",
"performs",
"a",
"deep",
"comparison",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L3546-L3572 |
17,579 | thriftrw/thriftrw-go | plugin/api/types.go | MarshalLogObject | func (v *Type) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
if v == nil {
return nil
}
if v.SimpleType != nil {
err = multierr.Append(err, enc.AddObject("simpleType", *v.SimpleType))
}
if v.SliceType != nil {
err = multierr.Append(err, enc.AddObject("sliceType", v.SliceType))
}
if v.KeyValueSl... | go | func (v *Type) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
if v == nil {
return nil
}
if v.SimpleType != nil {
err = multierr.Append(err, enc.AddObject("simpleType", *v.SimpleType))
}
if v.SliceType != nil {
err = multierr.Append(err, enc.AddObject("sliceType", v.SliceType))
}
if v.KeyValueSl... | [
"func",
"(",
"v",
"*",
"Type",
")",
"MarshalLogObject",
"(",
"enc",
"zapcore",
".",
"ObjectEncoder",
")",
"(",
"err",
"error",
")",
"{",
"if",
"v",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"if",
"v",
".",
"SimpleType",
"!=",
"nil",
"{",
... | // MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of Type. | [
"MarshalLogObject",
"implements",
"zapcore",
".",
"ObjectMarshaler",
"enabling",
"fast",
"logging",
"of",
"Type",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L3576-L3599 |
17,580 | thriftrw/thriftrw-go | plugin/api/types.go | GetSimpleType | func (v *Type) GetSimpleType() (o SimpleType) {
if v != nil && v.SimpleType != nil {
return *v.SimpleType
}
return
} | go | func (v *Type) GetSimpleType() (o SimpleType) {
if v != nil && v.SimpleType != nil {
return *v.SimpleType
}
return
} | [
"func",
"(",
"v",
"*",
"Type",
")",
"GetSimpleType",
"(",
")",
"(",
"o",
"SimpleType",
")",
"{",
"if",
"v",
"!=",
"nil",
"&&",
"v",
".",
"SimpleType",
"!=",
"nil",
"{",
"return",
"*",
"v",
".",
"SimpleType",
"\n",
"}",
"\n\n",
"return",
"\n",
"}"... | // GetSimpleType returns the value of SimpleType if it is set or its
// zero value if it is unset. | [
"GetSimpleType",
"returns",
"the",
"value",
"of",
"SimpleType",
"if",
"it",
"is",
"set",
"or",
"its",
"zero",
"value",
"if",
"it",
"is",
"unset",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L3603-L3609 |
17,581 | thriftrw/thriftrw-go | plugin/api/types.go | GetSliceType | func (v *Type) GetSliceType() (o *Type) {
if v != nil && v.SliceType != nil {
return v.SliceType
}
return
} | go | func (v *Type) GetSliceType() (o *Type) {
if v != nil && v.SliceType != nil {
return v.SliceType
}
return
} | [
"func",
"(",
"v",
"*",
"Type",
")",
"GetSliceType",
"(",
")",
"(",
"o",
"*",
"Type",
")",
"{",
"if",
"v",
"!=",
"nil",
"&&",
"v",
".",
"SliceType",
"!=",
"nil",
"{",
"return",
"v",
".",
"SliceType",
"\n",
"}",
"\n\n",
"return",
"\n",
"}"
] | // GetSliceType returns the value of SliceType if it is set or its
// zero value if it is unset. | [
"GetSliceType",
"returns",
"the",
"value",
"of",
"SliceType",
"if",
"it",
"is",
"set",
"or",
"its",
"zero",
"value",
"if",
"it",
"is",
"unset",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L3618-L3624 |
17,582 | thriftrw/thriftrw-go | plugin/api/types.go | GetKeyValueSliceType | func (v *Type) GetKeyValueSliceType() (o *TypePair) {
if v != nil && v.KeyValueSliceType != nil {
return v.KeyValueSliceType
}
return
} | go | func (v *Type) GetKeyValueSliceType() (o *TypePair) {
if v != nil && v.KeyValueSliceType != nil {
return v.KeyValueSliceType
}
return
} | [
"func",
"(",
"v",
"*",
"Type",
")",
"GetKeyValueSliceType",
"(",
")",
"(",
"o",
"*",
"TypePair",
")",
"{",
"if",
"v",
"!=",
"nil",
"&&",
"v",
".",
"KeyValueSliceType",
"!=",
"nil",
"{",
"return",
"v",
".",
"KeyValueSliceType",
"\n",
"}",
"\n\n",
"ret... | // GetKeyValueSliceType returns the value of KeyValueSliceType if it is set or its
// zero value if it is unset. | [
"GetKeyValueSliceType",
"returns",
"the",
"value",
"of",
"KeyValueSliceType",
"if",
"it",
"is",
"set",
"or",
"its",
"zero",
"value",
"if",
"it",
"is",
"unset",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L3633-L3639 |
17,583 | thriftrw/thriftrw-go | plugin/api/types.go | GetMapType | func (v *Type) GetMapType() (o *TypePair) {
if v != nil && v.MapType != nil {
return v.MapType
}
return
} | go | func (v *Type) GetMapType() (o *TypePair) {
if v != nil && v.MapType != nil {
return v.MapType
}
return
} | [
"func",
"(",
"v",
"*",
"Type",
")",
"GetMapType",
"(",
")",
"(",
"o",
"*",
"TypePair",
")",
"{",
"if",
"v",
"!=",
"nil",
"&&",
"v",
".",
"MapType",
"!=",
"nil",
"{",
"return",
"v",
".",
"MapType",
"\n",
"}",
"\n\n",
"return",
"\n",
"}"
] | // GetMapType returns the value of MapType if it is set or its
// zero value if it is unset. | [
"GetMapType",
"returns",
"the",
"value",
"of",
"MapType",
"if",
"it",
"is",
"set",
"or",
"its",
"zero",
"value",
"if",
"it",
"is",
"unset",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L3648-L3654 |
17,584 | thriftrw/thriftrw-go | plugin/api/types.go | GetReferenceType | func (v *Type) GetReferenceType() (o *TypeReference) {
if v != nil && v.ReferenceType != nil {
return v.ReferenceType
}
return
} | go | func (v *Type) GetReferenceType() (o *TypeReference) {
if v != nil && v.ReferenceType != nil {
return v.ReferenceType
}
return
} | [
"func",
"(",
"v",
"*",
"Type",
")",
"GetReferenceType",
"(",
")",
"(",
"o",
"*",
"TypeReference",
")",
"{",
"if",
"v",
"!=",
"nil",
"&&",
"v",
".",
"ReferenceType",
"!=",
"nil",
"{",
"return",
"v",
".",
"ReferenceType",
"\n",
"}",
"\n\n",
"return",
... | // GetReferenceType returns the value of ReferenceType if it is set or its
// zero value if it is unset. | [
"GetReferenceType",
"returns",
"the",
"value",
"of",
"ReferenceType",
"if",
"it",
"is",
"set",
"or",
"its",
"zero",
"value",
"if",
"it",
"is",
"unset",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L3663-L3669 |
17,585 | thriftrw/thriftrw-go | plugin/api/types.go | GetPointerType | func (v *Type) GetPointerType() (o *Type) {
if v != nil && v.PointerType != nil {
return v.PointerType
}
return
} | go | func (v *Type) GetPointerType() (o *Type) {
if v != nil && v.PointerType != nil {
return v.PointerType
}
return
} | [
"func",
"(",
"v",
"*",
"Type",
")",
"GetPointerType",
"(",
")",
"(",
"o",
"*",
"Type",
")",
"{",
"if",
"v",
"!=",
"nil",
"&&",
"v",
".",
"PointerType",
"!=",
"nil",
"{",
"return",
"v",
".",
"PointerType",
"\n",
"}",
"\n\n",
"return",
"\n",
"}"
] | // GetPointerType returns the value of PointerType if it is set or its
// zero value if it is unset. | [
"GetPointerType",
"returns",
"the",
"value",
"of",
"PointerType",
"if",
"it",
"is",
"set",
"or",
"its",
"zero",
"value",
"if",
"it",
"is",
"unset",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L3678-L3684 |
17,586 | thriftrw/thriftrw-go | plugin/api/types.go | String | func (v *TypePair) String() string {
if v == nil {
return "<nil>"
}
var fields [2]string
i := 0
fields[i] = fmt.Sprintf("Left: %v", v.Left)
i++
fields[i] = fmt.Sprintf("Right: %v", v.Right)
i++
return fmt.Sprintf("TypePair{%v}", strings.Join(fields[:i], ", "))
} | go | func (v *TypePair) String() string {
if v == nil {
return "<nil>"
}
var fields [2]string
i := 0
fields[i] = fmt.Sprintf("Left: %v", v.Left)
i++
fields[i] = fmt.Sprintf("Right: %v", v.Right)
i++
return fmt.Sprintf("TypePair{%v}", strings.Join(fields[:i], ", "))
} | [
"func",
"(",
"v",
"*",
"TypePair",
")",
"String",
"(",
")",
"string",
"{",
"if",
"v",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n\n",
"var",
"fields",
"[",
"2",
"]",
"string",
"\n",
"i",
":=",
"0",
"\n",
"fields",
"[",
"i",
"]",
"=... | // String returns a readable string representation of a TypePair
// struct. | [
"String",
"returns",
"a",
"readable",
"string",
"representation",
"of",
"a",
"TypePair",
"struct",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L3799-L3812 |
17,587 | thriftrw/thriftrw-go | plugin/api/types.go | Equals | func (v *TypePair) Equals(rhs *TypePair) bool {
if v == nil {
return rhs == nil
} else if rhs == nil {
return false
}
if !v.Left.Equals(rhs.Left) {
return false
}
if !v.Right.Equals(rhs.Right) {
return false
}
return true
} | go | func (v *TypePair) Equals(rhs *TypePair) bool {
if v == nil {
return rhs == nil
} else if rhs == nil {
return false
}
if !v.Left.Equals(rhs.Left) {
return false
}
if !v.Right.Equals(rhs.Right) {
return false
}
return true
} | [
"func",
"(",
"v",
"*",
"TypePair",
")",
"Equals",
"(",
"rhs",
"*",
"TypePair",
")",
"bool",
"{",
"if",
"v",
"==",
"nil",
"{",
"return",
"rhs",
"==",
"nil",
"\n",
"}",
"else",
"if",
"rhs",
"==",
"nil",
"{",
"return",
"false",
"\n",
"}",
"\n",
"i... | // Equals returns true if all the fields of this TypePair match the
// provided TypePair.
//
// This function performs a deep comparison. | [
"Equals",
"returns",
"true",
"if",
"all",
"the",
"fields",
"of",
"this",
"TypePair",
"match",
"the",
"provided",
"TypePair",
".",
"This",
"function",
"performs",
"a",
"deep",
"comparison",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L3818-L3832 |
17,588 | thriftrw/thriftrw-go | plugin/api/types.go | MarshalLogObject | func (v *TypePair) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
if v == nil {
return nil
}
err = multierr.Append(err, enc.AddObject("left", v.Left))
err = multierr.Append(err, enc.AddObject("right", v.Right))
return err
} | go | func (v *TypePair) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
if v == nil {
return nil
}
err = multierr.Append(err, enc.AddObject("left", v.Left))
err = multierr.Append(err, enc.AddObject("right", v.Right))
return err
} | [
"func",
"(",
"v",
"*",
"TypePair",
")",
"MarshalLogObject",
"(",
"enc",
"zapcore",
".",
"ObjectEncoder",
")",
"(",
"err",
"error",
")",
"{",
"if",
"v",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"err",
"=",
"multierr",
".",
"Append",
"(",
... | // MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of TypePair. | [
"MarshalLogObject",
"implements",
"zapcore",
".",
"ObjectMarshaler",
"enabling",
"fast",
"logging",
"of",
"TypePair",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L3836-L3843 |
17,589 | thriftrw/thriftrw-go | plugin/api/types.go | GetLeft | func (v *TypePair) GetLeft() (o *Type) {
if v != nil {
o = v.Left
}
return
} | go | func (v *TypePair) GetLeft() (o *Type) {
if v != nil {
o = v.Left
}
return
} | [
"func",
"(",
"v",
"*",
"TypePair",
")",
"GetLeft",
"(",
")",
"(",
"o",
"*",
"Type",
")",
"{",
"if",
"v",
"!=",
"nil",
"{",
"o",
"=",
"v",
".",
"Left",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] | // GetLeft returns the value of Left if it is set or its
// zero value if it is unset. | [
"GetLeft",
"returns",
"the",
"value",
"of",
"Left",
"if",
"it",
"is",
"set",
"or",
"its",
"zero",
"value",
"if",
"it",
"is",
"unset",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L3847-L3852 |
17,590 | thriftrw/thriftrw-go | plugin/api/types.go | GetRight | func (v *TypePair) GetRight() (o *Type) {
if v != nil {
o = v.Right
}
return
} | go | func (v *TypePair) GetRight() (o *Type) {
if v != nil {
o = v.Right
}
return
} | [
"func",
"(",
"v",
"*",
"TypePair",
")",
"GetRight",
"(",
")",
"(",
"o",
"*",
"Type",
")",
"{",
"if",
"v",
"!=",
"nil",
"{",
"o",
"=",
"v",
".",
"Right",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] | // GetRight returns the value of Right if it is set or its
// zero value if it is unset. | [
"GetRight",
"returns",
"the",
"value",
"of",
"Right",
"if",
"it",
"is",
"set",
"or",
"its",
"zero",
"value",
"if",
"it",
"is",
"unset",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L3861-L3866 |
17,591 | thriftrw/thriftrw-go | plugin/api/types.go | String | func (v *TypeReference) String() string {
if v == nil {
return "<nil>"
}
var fields [3]string
i := 0
fields[i] = fmt.Sprintf("Name: %v", v.Name)
i++
fields[i] = fmt.Sprintf("ImportPath: %v", v.ImportPath)
i++
if v.Annotations != nil {
fields[i] = fmt.Sprintf("Annotations: %v", v.Annotations)
i++
}
re... | go | func (v *TypeReference) String() string {
if v == nil {
return "<nil>"
}
var fields [3]string
i := 0
fields[i] = fmt.Sprintf("Name: %v", v.Name)
i++
fields[i] = fmt.Sprintf("ImportPath: %v", v.ImportPath)
i++
if v.Annotations != nil {
fields[i] = fmt.Sprintf("Annotations: %v", v.Annotations)
i++
}
re... | [
"func",
"(",
"v",
"*",
"TypeReference",
")",
"String",
"(",
")",
"string",
"{",
"if",
"v",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n\n",
"var",
"fields",
"[",
"3",
"]",
"string",
"\n",
"i",
":=",
"0",
"\n",
"fields",
"[",
"i",
"]",... | // String returns a readable string representation of a TypeReference
// struct. | [
"String",
"returns",
"a",
"readable",
"string",
"representation",
"of",
"a",
"TypeReference",
"struct",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L4012-L4029 |
17,592 | thriftrw/thriftrw-go | plugin/api/types.go | Equals | func (v *TypeReference) Equals(rhs *TypeReference) bool {
if v == nil {
return rhs == nil
} else if rhs == nil {
return false
}
if !(v.Name == rhs.Name) {
return false
}
if !(v.ImportPath == rhs.ImportPath) {
return false
}
if !((v.Annotations == nil && rhs.Annotations == nil) || (v.Annotations != nil &... | go | func (v *TypeReference) Equals(rhs *TypeReference) bool {
if v == nil {
return rhs == nil
} else if rhs == nil {
return false
}
if !(v.Name == rhs.Name) {
return false
}
if !(v.ImportPath == rhs.ImportPath) {
return false
}
if !((v.Annotations == nil && rhs.Annotations == nil) || (v.Annotations != nil &... | [
"func",
"(",
"v",
"*",
"TypeReference",
")",
"Equals",
"(",
"rhs",
"*",
"TypeReference",
")",
"bool",
"{",
"if",
"v",
"==",
"nil",
"{",
"return",
"rhs",
"==",
"nil",
"\n",
"}",
"else",
"if",
"rhs",
"==",
"nil",
"{",
"return",
"false",
"\n",
"}",
... | // Equals returns true if all the fields of this TypeReference match the
// provided TypeReference.
//
// This function performs a deep comparison. | [
"Equals",
"returns",
"true",
"if",
"all",
"the",
"fields",
"of",
"this",
"TypeReference",
"match",
"the",
"provided",
"TypeReference",
".",
"This",
"function",
"performs",
"a",
"deep",
"comparison",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L4035-L4052 |
17,593 | thriftrw/thriftrw-go | plugin/api/types.go | MarshalLogObject | func (v *TypeReference) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
if v == nil {
return nil
}
enc.AddString("name", v.Name)
enc.AddString("importPath", v.ImportPath)
if v.Annotations != nil {
err = multierr.Append(err, enc.AddObject("annotations", (_Map_String_String_Zapper)(v.Annotations)))
}
... | go | func (v *TypeReference) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
if v == nil {
return nil
}
enc.AddString("name", v.Name)
enc.AddString("importPath", v.ImportPath)
if v.Annotations != nil {
err = multierr.Append(err, enc.AddObject("annotations", (_Map_String_String_Zapper)(v.Annotations)))
}
... | [
"func",
"(",
"v",
"*",
"TypeReference",
")",
"MarshalLogObject",
"(",
"enc",
"zapcore",
".",
"ObjectEncoder",
")",
"(",
"err",
"error",
")",
"{",
"if",
"v",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"enc",
".",
"AddString",
"(",
"\"",
"\"",... | // MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of TypeReference. | [
"MarshalLogObject",
"implements",
"zapcore",
".",
"ObjectMarshaler",
"enabling",
"fast",
"logging",
"of",
"TypeReference",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/plugin/api/types.go#L4056-L4066 |
17,594 | thriftrw/thriftrw-go | compile/string.go | capitalize | func capitalize(s string) string {
if len(s) == 0 {
return s
}
x, i := utf8.DecodeRuneInString(s)
return string(unicode.ToUpper(x)) + string(s[i:])
} | go | func capitalize(s string) string {
if len(s) == 0 {
return s
}
x, i := utf8.DecodeRuneInString(s)
return string(unicode.ToUpper(x)) + string(s[i:])
} | [
"func",
"capitalize",
"(",
"s",
"string",
")",
"string",
"{",
"if",
"len",
"(",
"s",
")",
"==",
"0",
"{",
"return",
"s",
"\n",
"}",
"\n",
"x",
",",
"i",
":=",
"utf8",
".",
"DecodeRuneInString",
"(",
"s",
")",
"\n",
"return",
"string",
"(",
"unico... | // capitalize changes the first letter of a string to upper case. | [
"capitalize",
"changes",
"the",
"first",
"letter",
"of",
"a",
"string",
"to",
"upper",
"case",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/compile/string.go#L31-L37 |
17,595 | thriftrw/thriftrw-go | compile/string.go | fileBaseName | func fileBaseName(p string) string {
return strings.TrimSuffix(filepath.Base(p), filepath.Ext(p))
} | go | func fileBaseName(p string) string {
return strings.TrimSuffix(filepath.Base(p), filepath.Ext(p))
} | [
"func",
"fileBaseName",
"(",
"p",
"string",
")",
"string",
"{",
"return",
"strings",
".",
"TrimSuffix",
"(",
"filepath",
".",
"Base",
"(",
"p",
")",
",",
"filepath",
".",
"Ext",
"(",
"p",
")",
")",
"\n",
"}"
] | // fileBaseName returns the base name of the given file without the extension. | [
"fileBaseName",
"returns",
"the",
"base",
"name",
"of",
"the",
"given",
"file",
"without",
"the",
"extension",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/compile/string.go#L40-L42 |
17,596 | thriftrw/thriftrw-go | compile/string.go | splitInclude | func splitInclude(s string) (string, string) {
if i := strings.IndexRune(s, '.'); i > 0 {
return s[:i], s[i+1:]
}
return "", s
} | go | func splitInclude(s string) (string, string) {
if i := strings.IndexRune(s, '.'); i > 0 {
return s[:i], s[i+1:]
}
return "", s
} | [
"func",
"splitInclude",
"(",
"s",
"string",
")",
"(",
"string",
",",
"string",
")",
"{",
"if",
"i",
":=",
"strings",
".",
"IndexRune",
"(",
"s",
",",
"'.'",
")",
";",
"i",
">",
"0",
"{",
"return",
"s",
"[",
":",
"i",
"]",
",",
"s",
"[",
"i",
... | // splitInclude splits the given string at the first ".".
//
// If the given string doesn't have a '.', the second returned string contains
// the entirety of it. | [
"splitInclude",
"splits",
"the",
"given",
"string",
"at",
"the",
"first",
".",
".",
"If",
"the",
"given",
"string",
"doesn",
"t",
"have",
"a",
".",
"the",
"second",
"returned",
"string",
"contains",
"the",
"entirety",
"of",
"it",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/compile/string.go#L48-L53 |
17,597 | thriftrw/thriftrw-go | wire/lazy_list.go | MapItemListToSlice | func MapItemListToSlice(l MapItemList) []MapItem {
items := make([]MapItem, 0, l.Size())
// explicitly ignoring since we know there will not be an error
_ = l.ForEach(func(v MapItem) error {
items = append(items, v)
return nil
})
return items
} | go | func MapItemListToSlice(l MapItemList) []MapItem {
items := make([]MapItem, 0, l.Size())
// explicitly ignoring since we know there will not be an error
_ = l.ForEach(func(v MapItem) error {
items = append(items, v)
return nil
})
return items
} | [
"func",
"MapItemListToSlice",
"(",
"l",
"MapItemList",
")",
"[",
"]",
"MapItem",
"{",
"items",
":=",
"make",
"(",
"[",
"]",
"MapItem",
",",
"0",
",",
"l",
".",
"Size",
"(",
")",
")",
"\n",
"// explicitly ignoring since we know there will not be an error",
"_",... | // MapItemListToSlice builds a slice of values from the given MapItemList. | [
"MapItemListToSlice",
"builds",
"a",
"slice",
"of",
"values",
"from",
"the",
"given",
"MapItemList",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/wire/lazy_list.go#L145-L153 |
17,598 | thriftrw/thriftrw-go | internal/frame/client.go | NewClient | func NewClient(w io.Writer, r io.Reader) *Client {
return &Client{
r: NewReader(r),
w: NewWriter(w),
}
} | go | func NewClient(w io.Writer, r io.Reader) *Client {
return &Client{
r: NewReader(r),
w: NewWriter(w),
}
} | [
"func",
"NewClient",
"(",
"w",
"io",
".",
"Writer",
",",
"r",
"io",
".",
"Reader",
")",
"*",
"Client",
"{",
"return",
"&",
"Client",
"{",
"r",
":",
"NewReader",
"(",
"r",
")",
",",
"w",
":",
"NewWriter",
"(",
"w",
")",
",",
"}",
"\n",
"}"
] | // NewClient builds a new Client which uses the given writer to send requests
// and the given reader to read their responses. | [
"NewClient",
"builds",
"a",
"new",
"Client",
"which",
"uses",
"the",
"given",
"writer",
"to",
"send",
"requests",
"and",
"the",
"given",
"reader",
"to",
"read",
"their",
"responses",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/internal/frame/client.go#L42-L47 |
17,599 | thriftrw/thriftrw-go | internal/frame/client.go | Send | func (c *Client) Send(b []byte) ([]byte, error) {
c.Lock()
defer c.Unlock()
if err := c.w.Write(b); err != nil {
return nil, err
}
return c.r.Read()
} | go | func (c *Client) Send(b []byte) ([]byte, error) {
c.Lock()
defer c.Unlock()
if err := c.w.Write(b); err != nil {
return nil, err
}
return c.r.Read()
} | [
"func",
"(",
"c",
"*",
"Client",
")",
"Send",
"(",
"b",
"[",
"]",
"byte",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"c",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"Unlock",
"(",
")",
"\n\n",
"if",
"err",
":=",
"c",
".",
"w... | // Send sends the given frame and returns its response. | [
"Send",
"sends",
"the",
"given",
"frame",
"and",
"returns",
"its",
"response",
"."
] | a9a6ad793beab07cc3385954d2e8af8abfaa83e2 | https://github.com/thriftrw/thriftrw-go/blob/a9a6ad793beab07cc3385954d2e8af8abfaa83e2/internal/frame/client.go#L50-L58 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.