Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/apcera/gnatsd
Browse files Browse the repository at this point in the history
  • Loading branch information
derekcollison committed Apr 22, 2013
2 parents 1bb5dac + 2012c9a commit c6dcc8e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 4 additions & 2 deletions conf/lex.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright 2013 Apcera Inc. All rights reserved.

// Customized heavily from https://github.com/BurntSushi/toml/blob/master/lex.go, which is based on
// Customized heavily from
// https://github.com/BurntSushi/toml/blob/master/lex.go, which is based on
// Rob Pike's talk: http://cuddle.googlecode.com/hg/talk/lex.html

// The format supported is less restrictive than today's formats.
Expand Down Expand Up @@ -393,7 +394,8 @@ func lexArrayEnd(lx *lexer) stateFn {
return lx.pop()
}

// lexMapKeyStart consumes a key name up until the first non-whitespace character.
// lexMapKeyStart consumes a key name up until the first non-whitespace
// character.
// lexMapKeyStart will ignore whitespace.
func lexMapKeyStart(lx *lexer) stateFn {
r := lx.peek()
Expand Down
5 changes: 3 additions & 2 deletions conf/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Arrays and nested Maps are also supported.

// The format supported is less restrictive than today's formats.
// Supports mixed Arrays [], nexted Maps {}, multiple comment types (# and //)
// Supports mixed Arrays [], nested Maps {}, multiple comment types (# and //)
// Also supports key value assigments using '=' or ':' or whiteSpace()
// e.g. foo = 2, foo : 2, foo 2
// maps can be assigned with no key separator as well
Expand Down Expand Up @@ -147,7 +147,8 @@ func (p *parser) processItem(it item) error {
case itemDatetime:
dt, err := time.Parse("2006-01-02T15:04:05Z", it.val)
if err != nil {
return fmt.Errorf("Expected Zulu formatted DateTime, but got '%s'.", it.val)
return fmt.Errorf(
"Expected Zulu formatted DateTime, but got '%s'.", it.val)
}
p.setValue(dt)
case itemArrayStart:
Expand Down

0 comments on commit c6dcc8e

Please sign in to comment.