Skip to content

Commit

Permalink
sort the messages in the generator
Browse files Browse the repository at this point in the history
  • Loading branch information
Eduard-Voiculescu committed Jul 23, 2024
1 parent 45de425 commit 87244d4
Show file tree
Hide file tree
Showing 4 changed files with 6,908 additions and 6,905 deletions.
7 changes: 6 additions & 1 deletion generator/generator_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package generator

import (
"sort"
"testing"

firecoreRPC "github.com/streamingfast/firehose-core/rpc"
Expand All @@ -20,7 +21,11 @@ func Test_Generator(t *testing.T) {
messages := mc.FetchMessages()
metadata := mc.FetchMetadata()

gen := NewGenerator("/Users/cbillett/devel/sf/firehose-gear/templates/gen_types.go.gotmpl", messages, metadata)
sort.Slice(messages, func(i, j int) bool {
return messages[i].FullTypeName() < messages[j].FullTypeName()
})

gen := NewGenerator("../templates/gen_types.go.gotmpl", messages, metadata)
err = gen.Generate()
require.NoError(t, err)
}
Loading

0 comments on commit 87244d4

Please sign in to comment.