Skip to content

Commit

Permalink
Readme formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
dave committed Mar 16, 2017
1 parent 3853335 commit d966cde
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 34 deletions.
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -562,30 +562,30 @@ fmt.Printf("%#v", c)
For the default constant types (bool, int, float64, string, complex128), Lit
will render the untyped constant.

| Code | Output |
| ----------- | -------- |
| Lit(true) | true |
| Lit(1) | 1 |
| Lit(1.0) | 1.0 |
| Lit("foo") | "foo" |
| Lit(0 + 1i) | (0 + 1i) |
| Code | Output |
| ------------- | ---------- |
| `Lit(true)` | `true` |
| `Lit(1)` | `1` |
| `Lit(1.0)` | `1.0` |
| `Lit("foo")` | `"foo"` |
| `Lit(0 + 1i)` | `(0 + 1i)` |

For all other built-in types (float32, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64, uintptr, complex64), Lit will also render the type.

| Code | Output |
| ---------------------- | ----------------- |
| Lit(float32(1)) | float32(1) |
| Lit(int16(1)) | int16(1) |
| Lit(uint8(0x1)) | uint8(0x1) |
| Lit(complex64(0 + 1i)) | complex64(0 + 1i) |
| Code | Output |
| ------------------------ | ------------------- |
| `Lit(float32(1))` | `float32(1)` |
| `Lit(int16(1))` | `int16(1)` |
| `Lit(uint8(0x1))` | `uint8(0x1)` |
| `Lit(complex64(0 + 1i))` | `complex64(0 + 1i)` |

The built-in alias types byte and rune need a special case. LitRune and LitByte
render rune and byte literals.

| Code | Output |
| ---------------------- | --------- |
| LitRune('x') | 'x' |
| LitByte(byte(0x1)) | byte(0x1) |
| Code | Output |
| ------------------------ | ----------- |
| `LitRune('x')` | `'x'` |
| `LitByte(byte(0x1))` | `byte(0x1)` |

# Comments
[Identifiers](#identifiers) [Keywords](#keywords) [Operators](#operators) [Braces](#braces) [Parentheses](#parentheses) [Control flow](#control-flow) [Collections](#collections) [Literals](#literals) **Comments** [Helpers](#helpers) [Misc](#misc) [File](#file)
Expand Down
34 changes: 17 additions & 17 deletions README.md.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -244,30 +244,30 @@ Note: the items are ordered by key when rendered to ensure repeatable code.
For the default constant types (bool, int, float64, string, complex128), Lit
will render the untyped constant.

| Code | Output |
| ----------- | -------- |
| Lit(true) | true |
| Lit(1) | 1 |
| Lit(1.0) | 1.0 |
| Lit("foo") | "foo" |
| Lit(0 + 1i) | (0 + 1i) |
| Code | Output |
| ------------- | ---------- |
| `Lit(true)` | `true` |
| `Lit(1)` | `1` |
| `Lit(1.0)` | `1.0` |
| `Lit("foo")` | `"foo"` |
| `Lit(0 + 1i)` | `(0 + 1i)` |

For all other built-in types (float32, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64, uintptr, complex64), Lit will also render the type.

| Code | Output |
| ---------------------- | ----------------- |
| Lit(float32(1)) | float32(1) |
| Lit(int16(1)) | int16(1) |
| Lit(uint8(0x1)) | uint8(0x1) |
| Lit(complex64(0 + 1i)) | complex64(0 + 1i) |
| Code | Output |
| ------------------------ | ------------------- |
| `Lit(float32(1))` | `float32(1)` |
| `Lit(int16(1))` | `int16(1)` |
| `Lit(uint8(0x1))` | `uint8(0x1)` |
| `Lit(complex64(0 + 1i))` | `complex64(0 + 1i)` |

The built-in alias types byte and rune need a special case. LitRune and LitByte
render rune and byte literals.

| Code | Output |
| ---------------------- | --------- |
| LitRune('x') | 'x' |
| LitByte(byte(0x1)) | byte(0x1) |
| Code | Output |
| ------------------------ | ----------- |
| `LitRune('x')` | `'x'` |
| `LitByte(byte(0x1))` | `byte(0x1)` |

# Comments
[Identifiers](#identifiers) [Keywords](#keywords) [Operators](#operators) [Braces](#braces) [Parentheses](#parentheses) [Control flow](#control-flow) [Collections](#collections) [Literals](#literals) **Comments** [Helpers](#helpers) [Misc](#misc) [File](#file)
Expand Down

0 comments on commit d966cde

Please sign in to comment.