Skip to content

Commit

Permalink
- fixes renamed merge reference
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
  • Loading branch information
baywet committed Oct 22, 2021
1 parent 9b575cb commit 9cde5f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/Kiota.Builder/Writers/Go/CodeEnumWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,16 @@ public override void WriteCodeElement(CodeEnum codeElement, LanguageWriter write
writer.DecreaseIndent();
writer.WriteLines("}",
$"return 0, errors.New(\"Unknown {typeName} value: \" + v)");
writer.CloseCurly();
writer.CloseBlock();
writer.WriteLine($"func Serialize{typeName}(values []{typeName}) []string {{");
writer.IncreaseIndent();
writer.WriteLines("result := make([]string, len(values))",
"for i, v := range values {");
writer.IncreaseIndent();
writer.WriteLine("result[i] = v.String()");
writer.CloseCurly();
writer.CloseBlock();
writer.WriteLine("return result");
writer.CloseCurly();
writer.CloseBlock();
}
}
}
4 changes: 2 additions & 2 deletions src/Kiota.Builder/Writers/Go/CodeMethodWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ private void WriteGetterBody(CodeMethod codeElement, LanguageWriter writer, Code
writer.WriteLine("return value;");
} else
writer.WriteLine($"return m.Get{backingStore.Name.ToFirstCharacterUpperCase()}().Get(\"{codeElement.AccessedProperty?.Name?.ToFirstCharacterLowerCase()}\");");
writer.CloseCurly();
writer.CloseBlock();

}
private void WriteApiConstructorBody(CodeClass parentClass, CodeMethod method, LanguageWriter writer) {
Expand Down Expand Up @@ -486,7 +486,7 @@ private void WriteSerializationMethodCall(CodeTypeBase propType, CodeClass paren
writer.IncreaseIndent();
writer.WriteLines($"temp := v", // temporary creating a new reference to avoid pointers to the same object
$"cast[i] = {parsableSymbol}(&temp)");
writer.CloseCurly();
writer.CloseBlock();
}
var collectionPrefix = propType.IsCollection ? "CollectionOf" : string.Empty;
var collectionSuffix = propType.IsCollection ? "s" : string.Empty;
Expand Down

0 comments on commit 9cde5f0

Please sign in to comment.