Skip to content

Commit

Permalink
[change] 删除go语言的保留字。因为生成代码时会将首字母大写,即使与保留字一样也不会有编译错误
Browse files Browse the repository at this point in the history
  • Loading branch information
pirunxi committed Apr 26, 2024
1 parent 7f8e076 commit 023ce02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Luban.Golang/CodeTarget/GoCodeTargetBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public abstract class GoCodeTargetBase : TemplateCodeTargetBase
private static readonly HashSet<string> s_preservedKeyWords = new()
{
// go preserved key words
"break", "default", "func", "interface", "select", "case", "defer", "go", "map", "struct", "chan", "else", "goto", "package", "switch", "const", "fallthrough", "if", "range", "type", "continue", "for", "import", "return", "var"
//"break", "default", "func", "interface", "select", "case", "defer", "go", "map", "struct", "chan", "else", "goto", "package", "switch", "const", "fallthrough", "if", "range", "continue", "for", "import", "return", "var"
};

protected override IReadOnlySet<string> PreservedKeyWords => s_preservedKeyWords;
Expand Down

0 comments on commit 023ce02

Please sign in to comment.