repo_name
stringlengths
1
52
repo_creator
stringclasses
6 values
programming_language
stringclasses
4 values
code
stringlengths
0
9.68M
num_lines
int64
1
234k
jsii
aws
Go
type myClass struct { cdk.SomeOtherClass }
4
jsii
aws
Go
type myClass struct { cdk.SomeOtherClass } func newMyClass(x *string, y *string) *myClass { this := &myClass{} cdk.NewSomeOtherClass_Override(this, x) return this }
10
jsii
aws
Go
type myClass struct { cdk.SomeOtherClass } func (this *myClass) someMethod(x *string) { fmt.Println(*x) }
8
jsii
aws
Go
type myClassProps struct { prop1 *string prop2 *f64 } type myClass struct { cdk.SomeOtherClass } func newMyClass(scope cdk.Construct, id *string, props myClassProps) *myClass { this := &myClass{} cdk.NewSomeOtherClass_Override(this, scope, id, props) fmt.Println(*props.prop1) return this }
17
jsii
aws
Go
type A struct { } func NewA(a *string, b *f64) *A { if b == nil { b = jsii.Number(3) } this := &A{} return this }
11
jsii
aws
Go
type empty_class struct { }
3
jsii
aws
Go
type myClass1 struct { } type thisWillNotBeRendered struct { } type myClass2 struct { }
9
jsii
aws
Go
type myClass struct { } func newMyClass(y *string) *myClass { this := &myClass{} this.x = *y return this } func (this *myClass) hello() {} func (this *myClass) bye() {}
13
jsii
aws
Go
type myClass struct { } func newMyClass(y *string) *myClass { this := &myClass{} this.x = *y return this } func (this *myClass) hello() { fmt.Println(this.x) } func (this *myClass) bye() { fmt.Println("bye") }
17
jsii
aws
Go
// Here's a comment // // Second line someCall()
5
jsii
aws
Go
someFunction(arg1, map[string]*string{ /* A comment before arg2 */ "arg2": jsii.String("string"), /* A comment before arg3 */ "arg3": jsii.String("boo"), })
8
jsii
aws
Go
someFunction(arg1, map[string]*string{ // A comment before arg2 "arg2": jsii.String("string"), // A comment before arg3 "arg3": jsii.String("boo"), })
8
jsii
aws
Go
// Here's a comment object.member.functionCall(NewClass(), jsii.String("argument"))
3
jsii
aws
Go
var array []*string fmt.Println(array[3])
4
jsii
aws
Go
fmt.Println(f64(3))
2
jsii
aws
Go
x := future()
1
jsii
aws
Go
x := "some string"
2
jsii
aws
Go
y := "WHY?" x := map[string]*string{ fmt.Sprintf("key-%v", y): jsii.String("value"), } z := map[string]*bool{ y: jsii.Boolean(true), }
9
jsii
aws
Go
x := map[string]*string{ "key": jsii.String("value"), }
4
jsii
aws
Go
callThisFunction(foo, ...)
2
jsii
aws
Go
fmt.Println(enumType_ENUM_VALUE_A)
2
jsii
aws
Go
fmt.Println(enumType_ENUM_VALUE_A())
2
jsii
aws
Go
map := map[string]interface{}{ "Access-Control-Allow-Origin": jsii.String("\"*\""), }
4
jsii
aws
Go
x := someObject.someAttribute
2
jsii
aws
Go
x := "world" y := "well" fmt.Println(fmt.Sprintf("Hello, %v, it works %v!", x, y)) // And now a multi-line expression fmt.Println(fmt.Sprintf("\nHello, %v.\n\nIt works %v!\n", x, y))
7
jsii
aws
Go
literal := ` This is a multiline string literal. "It's cool!". YEAH BABY!! Litteral \\n right here (not a newline!) `
10
jsii
aws
Go
type test struct { key *string } x := &test{ key: jsii.String("value"), }
8
jsii
aws
Go
fmt.Println(-3) fmt.Println(!false) fmt.Println(a == b)
4
jsii
aws
Go
if true { fmt.Println("everything is well") } onlyToEndOfBlock()
6
jsii
aws
Go
foo(jsii.Number(3), ...)
2
jsii
aws
Go
prepare() fmt.Println(this, "it seems to work")
4
jsii
aws
Go
foo(jsii.Number(3), jsii.Number(8))
2
jsii
aws
Go
before() // ... after()
4
jsii
aws
Go
foo(jsii.Number(3))
2
jsii
aws
Go
import lambda "github.com/aws-samples/dummy/scopeawslambda" lambda.NewClassFromLambda(map[string]*string{ "key": jsii.String("lambda.amazonaws.com"), })
5
jsii
aws
Go
import mod "github.com/aws-samples/dummy/scopesomemodule" mod.NewClassFromModule()
3
jsii
aws
Go
import mod "github.com/aws-samples/dummy/scopesomemodule" mod.NewClassFromModule()
3
jsii
aws
Go
import cdk "github.com/aws-samples/dummy/awscdklib" import "github.com/aws-samples/dummy/constructs"
3
jsii
aws
Go
import "github.com/aws-samples/dummy/scopesomemodule" scopesomemodule.NewTwo() scopesomemodule.Four()
4
jsii
aws
Go
import "github.com/aws/jsii/jsii-calc/go/jsiicalc/submodule" import "github.com/aws/jsii/jsii-calc/go/jsiicalc/submodule/child" import "github.com/aws/jsii/jsii-calc/go/jsiicalc" import "github.com/aws/jsii/jsii-calc/go/jsiicalc/foo" import "github.com/aws-samples/dummy/gen/providers/aws/kms" // Access without existing type information awsKmsKeyExamplekms := kms.NewKmsKey(this, jsii.String("examplekms"), map[string]interface{}{ "deletionWindowInDays": jsii.Number(7), "description": jsii.String("KMS key 1"), }) // Accesses two distinct points of the submodule hierarchy myClass := submodule.NewMyClass(&SomeStruct{ Prop: child.SomeEnum_SOME, }) // Access via a renamed import foo.Consumer_Consume(&ConsumerProps{ Homonymous: &Homonymous{ StringProperty: jsii.String("yes"), }, })
24
jsii
aws
Go
type iThing interface { doAThing() }
4
jsii
aws
Go
type iThing interface { thingArn() *string }
4
jsii
aws
Go
callFunction(jsii.Boolean(true), jsii.Boolean(false))
2
jsii
aws
Go
if x == 3 { fmt.Println("hello") }
4
jsii
aws
Go
var variable Type
2
jsii
aws
Go
if x == 3 {}
2
jsii
aws
Go
for _, x := range xs { fmt.Println(x) }
4
jsii
aws
Go
if x == 3 { fmt.Println("bye") }
4
jsii
aws
Go
if x == 3 { fmt.Println("bye") } else { fmt.Println("toodels") }
6
jsii
aws
Go
expected := map[string]interface{}{ "Foo": jsii.String("Bar"), "Baz": jsii.Number(5), "Qux": []*string{ jsii.String("Waldo"), jsii.String("Fred"), }, }
9
jsii
aws
Go
if x == 3 { x += 1 fmt.Println("bye") } else { fmt.Println("toodels") }
7
jsii
aws
Go
func doThing() *f64 { x := 1 // x seems to be equal to 1 return jsii.Number(x + 1) } func doThing2(x *f64) *bool { if *x == 1 { return jsii.Boolean(true) } return jsii.Boolean(false) } func doThing3() *f64 { x := 1 return jsii.Number(x + 1) } func doThing4() { x := 1 x = 85 }
22
jsii
aws
Go
func test(..._args interface{}) { } test(map[string]interface{}{ "Key": jsii.String("Value"), "also": jsii.Number(1337), }) test(map[string]*string{ "Key": jsii.String("Value"), }, map[string]*f64{ "also": jsii.Number(1337), })
14
jsii
aws
Go
statementOne() statementTwo()
4
jsii
aws
Go
if condition { statementOne() statementTwo() }
6
jsii
aws
Go
functionThatTakesAnAny(map[string]*f64{ "argument": jsii.Number(5), })
4
jsii
aws
Go
takes(&myProps{ Struct: &someStruct{ Enabled: jsii.Boolean(false), Option: jsii.String("option"), }, })
9
jsii
aws
Go
NewVpc(this, jsii.String("Something"), &vpcProps{ Argument: jsii.Number(5), })
4
jsii
aws
Go
NewIntegration(this, jsii.String("Something"), &integrationOptions{ Argument: jsii.Number(5), })
4
jsii
aws
Go
vpc := NewVpc(this, jsii.String("Something"), &vpcProps{ Argument: jsii.Number(5), })
4
jsii
aws
Go
vpc := NewVpc(this, jsii.String("Something"), map[string]*f64{ "argument": jsii.Number(5), })
4
jsii-rosetta
aws
Go
func foo(x *string, y *string, z *string) { if y == nil { y = jsii.String("hello") } fmt.Println(*x, *y, *z) }
7
jsii-rosetta
aws
Go
type struct_ struct { x *string y *string } func foo(s *struct_) { fmt.Println(*s.x, *s.y) }
8
jsii-rosetta
aws
Go
callSomeFunction(jsii.Number(1), jsii.Number(2), jsii.Number(3))
2
jsii-rosetta
aws
Go
foo(map[string][]map[string]*f64{ "list": []map[string]*f64{ map[string]*f64{ "a": jsii.Number(1), "b": jsii.Number(2), }, map[string]*f64{ "a": jsii.Number(3), "b": jsii.Number(4), }, }, })
13
jsii-rosetta
aws
Go
func foo(xs map[string]*string) { } foo(map[string]*string{ "foo": jsii.String("bar"), "schmoo": jsii.String("schmar"), })
8
jsii-rosetta
aws
Go
someObject.callSomeFunction(jsii.Number(1), jsii.Number(2), jsii.Number(3))
2
jsii-rosetta
aws
Go
this.callSomeFunction(jsii.Number(25))
2
jsii-rosetta
aws
Go
foo := "hello" callFunction(map[string]*string{ "foo": jsii.String(foo), })
5
jsii-rosetta
aws
Go
someObject_CallSomeFunction(jsii.Number(1), jsii.Number(2), jsii.Number(3))
2
jsii-rosetta
aws
Go
callSomeFunction(this, jsii.Number(25))
2
jsii-rosetta
aws
Go
foo(jsii.Number(25), map[string]interface{}{ "foo": jsii.Number(3), "banana": jsii.String("hello"), })
5
jsii-rosetta
aws
Go
foo(jsii.Number(25), map[string]interface{}{ "foo": jsii.Number(3), "deeper": map[string]*f64{ "a": jsii.Number(1), "b": jsii.Number(2), }, })
8
jsii-rosetta
aws
Go
foo(jsii.Number(25), map[string]interface{}{ "foo": jsii.Number(3), "deeper": map[string]*f64{ "a": jsii.Number(1), "b": jsii.Number(2), }, })
8
jsii-rosetta
aws
Go
foo(jsii.Number(25), map[string]interface{}{ "foo": jsii.Number(3), "banana": jsii.String("hello"), })
6
jsii-rosetta
aws
Go
foo(jsii.Number(25), map[string]interface{}{ "foo": jsii.Number(3), "banana": jsii.String("hello"), })
5
jsii-rosetta
aws
Go
type baseDeeperStruct struct { a *f64 } type deeperStruct struct { baseDeeperStruct b *f64 } type outerStruct struct { foo *f64 deeper *deeperStruct } func foo(x *f64, outer *outerStruct) { } foo(jsii.Number(25), &outerStruct{ Foo: jsii.Number(3), Deeper: &deeperStruct{ A: jsii.Number(1), B: jsii.Number(2), }, })
25
jsii-rosetta
aws
Go
type myClass struct { x *string } func newMyClass(y *string) *myClass { this := &myClass{} this.x = y return this }
10
jsii-rosetta
aws
Go
type myClass struct { x *string } func newMyClass(y *string) *myClass { this := &myClass{} this.x = y return this }
10
jsii-rosetta
aws
Go
type myClass struct { } func (this *myClass) resolve() interface{} { return jsii.Number(42) }
7
jsii-rosetta
aws
Go
type otherName struct { } func newOtherName() *otherName { this := &otherName{} return this }
8
jsii-rosetta
aws
Go
type myClass struct { SomeOtherClass }
4
jsii-rosetta
aws
Go
type myClass struct { cdk.SomeOtherClass }
4
jsii-rosetta
aws
Go
type myClass struct { cdk.SomeOtherClass } func newMyClass(x *string, y *string) *myClass { this := &myClass{} cdk.NewSomeOtherClass_Override(this, x) return this }
10
jsii-rosetta
aws
Go
type myClass struct { cdk.SomeOtherClass } func (this *myClass) someMethod(x *string) { fmt.Println(*x) }
8
jsii-rosetta
aws
Go
type myClassProps struct { prop1 *string prop2 *f64 } type myClass struct { cdk.SomeOtherClass } func newMyClass(scope cdk.Construct, id *string, props myClassProps) *myClass { this := &myClass{} cdk.NewSomeOtherClass_Override(this, scope, id, props) fmt.Println(*props.prop1) return this }
17
jsii-rosetta
aws
Go
type A struct { } func NewA(a *string, b *f64) *A { if b == nil { b = jsii.Number(3) } this := &A{} return this }
11
jsii-rosetta
aws
Go
type empty_class struct { }
3
jsii-rosetta
aws
Go
type myClass1 struct { } type thisWillNotBeRendered struct { } type myClass2 struct { }
9
jsii-rosetta
aws
Go
type myClass struct { } func newMyClass(y *string) *myClass { this := &myClass{} this.x = *y return this } func (this *myClass) hello() {} func (this *myClass) bye() {}
13
jsii-rosetta
aws
Go
type myClass struct { } func newMyClass(y *string) *myClass { this := &myClass{} this.x = *y return this } func (this *myClass) hello() { fmt.Println(this.x) } func (this *myClass) bye() { fmt.Println("bye") }
17
jsii-rosetta
aws
Go
// Here's a comment // // Second line someCall()
5
jsii-rosetta
aws
Go
someFunction(arg1, map[string]*string{ /* A comment before arg2 */ "arg2": jsii.String("string"), /* A comment before arg3 */ "arg3": jsii.String("boo"), })
8
jsii-rosetta
aws
Go
someFunction(arg1, map[string]*string{ // A comment before arg2 "arg2": jsii.String("string"), // A comment before arg3 "arg3": jsii.String("boo"), })
8
jsii-rosetta
aws
Go
// Here's a comment object.member.functionCall(NewClass(), jsii.String("argument"))
3
jsii-rosetta
aws
Go
var array []*string fmt.Println(array[3])
4
jsii-rosetta
aws
Go
fmt.Println(f64(3))
2
jsii-rosetta
aws
Go
x := future()
1
jsii-rosetta
aws
Go
x := "some string"
2
jsii-rosetta
aws
Go
y := "WHY?" x := map[string]*string{ fmt.Sprintf("key-%v", y): jsii.String("value"), } z := map[string]*bool{ y: jsii.Boolean(true), }
9