diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2018-01-23 11:05:51 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-01-23 11:05:51 +0100 |
| commit | 14d1e424b6a582d021c73c88e1f0c5f0962ecc9d (patch) | |
| tree | 0fdc71b6e0de2576ae330f145a51f9c016ad81a2 /pkg/ast/format.go | |
| parent | de3e24c4b6cd0136618ce74eb025a15d4834c082 (diff) | |
pkg/compiler: allow use of empty strings
This comes up in several contexts in netfilter.
Diffstat (limited to 'pkg/ast/format.go')
| -rw-r--r-- | pkg/ast/format.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/ast/format.go b/pkg/ast/format.go index c1dd3a624..a7e0f568f 100644 --- a/pkg/ast/format.go +++ b/pkg/ast/format.go @@ -152,7 +152,7 @@ func fmtType(t *Type) string { switch { case t.Ident != "": v = t.Ident - case t.String != "": + case t.HasString: v = fmt.Sprintf("\"%v\"", t.String) default: v = fmtIntValue(t.Value, t.ValueHex) |
