Add content-type header to json responses

This commit is contained in:
2014-09-25 17:19:45 +04:00
parent 611393956d
commit ee34e14320
3 changed files with 14 additions and 12 deletions
+3 -3
View File
@@ -22,11 +22,11 @@ type (
}
)
func newCounter(wi, ri uint) (c *counter) {
func newCounter(wi, ri uint) *counter {
m := &sync.Mutex{}
m.Lock()
c = &counter{
c := &counter{
write: wi,
read: ri,
stream: make(chan uint),
@@ -35,7 +35,7 @@ func newCounter(wi, ri uint) (c *counter) {
go c.increment()
return
return c
}
func (c *counter) tryWrite(fn func(i uint) bool) {