diff options
author | Ed Warnicke <hagbard@gmail.com> | 2022-04-26 19:14:55 -0500 |
---|---|---|
committer | Ondrej Fabry <ofabry@cisco.com> | 2022-05-19 08:53:51 +0000 |
commit | e93c0bb99ca9400df77687e7c3fd4bebfc6e4c33 (patch) | |
tree | 94829f8e9feb76bc3a8325203d070baafaa3eb1c | |
parent | 1c622180f9be043d5be6c631975182f5cbf9c722 (diff) |
Generate APIName/APIVersion/CrcVersion for 'types'
Signed-off-by: Ed Warnicke <hagbard@gmail.com>
Change-Id: I661eb993c10f73909e21dcde73466d92ff54b52d
-rw-r--r-- | binapigen/generate.go | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/binapigen/generate.go b/binapigen/generate.go index 2ad3eb3..37f7bc4 100644 --- a/binapigen/generate.go +++ b/binapigen/generate.go @@ -90,14 +90,12 @@ func GenerateAPI(gen *Generator, file *File) *GenFile { g.P("const _ = ", govppApiPkg.Ident("GoVppAPIPackageIsVersion"), generatedCodeVersion) g.P() - if !file.isTypesFile() { - g.P("const (") - g.P(apiName, " = ", strconv.Quote(g.file.Desc.Name)) - g.P(apiVersion, " = ", strconv.Quote(g.file.Version)) - g.P(apiCrc, " = ", g.file.Desc.CRC) - g.P(")") - g.P() - } + g.P("const (") + g.P(apiName, " = ", strconv.Quote(g.file.Desc.Name)) + g.P(apiVersion, " = ", strconv.Quote(g.file.Version)) + g.P(apiCrc, " = ", g.file.Desc.CRC) + g.P(")") + g.P() for _, enum := range g.file.Enums { genEnum(g, enum) |