1
1
mirror of https://github.com/github/semantic.git synced 2025-01-01 19:55:34 +03:00
semantic/test/corpus/generated/go.json
2016-11-01 21:36:43 -04:00

52 lines
1.9 KiB
JSON

[
{
"repoUrl": "https://github.com/joshvera/go.git",
"language": "go",
"fileExt": ".go",
"templateText": "package main\n",
"syntaxes": [
{
"syntax": "imports",
"repoFilePath": "imports",
"insert": "import \"net/http\"\nimport . \"some/dsl\"\nimport alias \"some/package\"",
"testCaseFilePath": "test/corpus/diff-summaries/go/imports.json",
"replacement": "import \"foo/bar\"\nimport . \"types/dsl\"\nimport alias \"awesome/packages\""
},
{
"syntax": "int-literal",
"repoFilePath": "int-literal.go",
"insert": "const (\na = 1, b = 2, c = 3\n)",
"testCaseFilePath": "test/corpus/diff-summaries/go/int-literal.json",
"replacement": "const (\na = 4, b = 5, c = 6\n)"
},
{
"syntax": "assignment",
"repoFilePath": "assignment.go",
"insert": "var foo int = 42",
"testCaseFilePath": "test/corpus/diff-summaries/go/assignment.json",
"replacement": "var bar string = \"hello\""
},
{
"syntax": "function-call",
"repoFilePath": "function-call.go",
"insert": "a()",
"testCaseFilePath": "test/corpus/diff-summaries/go/function-call.json",
"replacement": "b()"
},
{
"syntax": "function-literal",
"repoFilePath": "function-literal.go",
"insert": "const s1 = func(s string) (int, int) {\nreturn 1, 2\n}",
"testCaseFilePath": "test/corpus/diff-summaries/go/function-literal.json",
"replacement": "const s1 = func(b int) (string, string) {\nreturn 1, 2\n}"
},
{
"syntax": "const-declarations",
"repoFilePath": "const-declarations.go",
"insert": "const zero = 0",
"testCaseFilePath": "test/corpus/diff-summaries/go/const-declarations.json",
"replacement": "const one, two = 1, 2"
}
]
}
]