-
Notifications
You must be signed in to change notification settings - Fork 524
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* [Go] Fix tokens passed to generateComposite (#849) Too many tokens were passed to `generateComposite` causing weird errors like(#844 and #849). * [Go] Fix Group decoder style warning The `Decode` generator for groups would produce the following code: ``` for i, _ := range o.GroupName { ``` The `gofmt` tools suggest [simplify range expression](https://github.com/golang/tools/blob/master/internal/lsp/analysis/simplifyrange/simplifyrange.go#L23): ``` A range of the form: for x, _ = range v {...} will be simplified to: for x = range v {...} ``` This patch fixes that.
- Loading branch information
Showing
5 changed files
with
57 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package issue849 | ||
|
||
import ( | ||
"testing" | ||
) | ||
|
||
func TestNothing(t *testing.T) { | ||
// placeholder, really just looking for clean builds | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<sbe:messageSchema xmlns:sbe="http://fixprotocol.io/2016/sbe" | ||
package="issue849" | ||
id="1" | ||
version="0" | ||
semanticVersion="1.0" | ||
description="test case 849 20210512" | ||
byteOrder="littleEndian"> | ||
<types> | ||
<composite name="Comp1" description="Comp1"> | ||
<type name="abc" primitiveType="uint32"/> | ||
<type name="wxyz" primitiveType="uint32"/> | ||
</composite> | ||
<composite name="Comp2" description="Comp2"> | ||
<type name="eenie" primitiveType="uint32"/> | ||
<ref name="c1" type="Comp1"/> | ||
<type name="meanie" primitiveType="uint32"/> | ||
</composite> | ||
<composite name="Comp3" description="Comp3"> | ||
<type name="moe" primitiveType="uint32"/> | ||
<ref name="c2" type="Comp2"/> | ||
<type name="roe" primitiveType="uint32"/> | ||
</composite> | ||
<composite name="Comp4" description="Comp4"> | ||
<type name="roe" primitiveType="uint32"/> | ||
</composite> | ||
<composite name="messageHeader" description="MH"> | ||
<type name="blockLength" primitiveType="uint16"/> | ||
<type name="templateId" primitiveType="uint16"/> | ||
<type name="schemaId" primitiveType="uint16"/> | ||
<type name="version" primitiveType="uint16"/> | ||
<ref name="c1" type="Comp1"/> | ||
<type name="lmn" primitiveType="uint32"/> | ||
<ref name="c2" type="Comp2"/> | ||
<type name="opq" primitiveType="uint32"/> | ||
</composite> | ||
</types> | ||
<sbe:message name="barmsg" id="4"> | ||
<field name="header" id="1" type="messageHeader"/> | ||
<field name="c3" id="2" type="Comp3"/> | ||
<field name="c4" id="3" type="Comp4"/> | ||
</sbe:message> | ||
</sbe:messageSchema> |