Skip to content

Commit

Permalink
Fixed a compilation error - there is not member named timestamp. Adde…
Browse files Browse the repository at this point in the history
…d some formatting for better looks. (#355)
  • Loading branch information
PranavPeshwe authored Apr 19, 2023
1 parent 0886a6a commit c71396e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/Getting-Started.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ type Message struct {
}

func main() {
code := `map(filter(messages, len(.Text) > 0), .Text + Format(.timestamp))`
code := `map(filter(messages, len(.Text) > 0), Format(.Date) + '\t' + .Text + '\n')`

// We can use an empty instance of the struct as an environment.
program, err := expr.Compile(code, expr.Env(Env{}))
Expand Down

0 comments on commit c71396e

Please sign in to comment.