Browse Source

Add Group.WriteLine

pull/1842/head
Jae Kwon 8 years ago
parent
commit
5e9c5dc413
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      group.go

+ 8
- 0
group.go View File

@ -107,6 +107,14 @@ func (g *Group) MaxIndex() int {
return g.maxIndex
}
// Auto appends "\n"
// TODO: Make it halt if space is unavailable
func (g *Group) WriteLine(line string) error {
_, err := g.Head.Write([]byte(line + "\n"))
return err
}
// NOTE: g.Head must be closed separately
func (g *Group) Close() error {
g.ticker.Stop()
return nil


Loading…
Cancel
Save