chore: move var to after type definitions

This commit is contained in:
Tom Andrade 2023-02-03 10:39:42 +01:00
parent b3efc0043f
commit b0910cb027
Signed by: wolvie
GPG Key ID: 31AAB07872E82669

View File

@ -14,15 +14,15 @@ import (
"github.com/gorilla/mux"
)
// Global counter
var C counter
// Counter mutex for counter
type counter struct {
mu sync.Mutex
n int
}
// Global counter
var C counter
// Add value to counter
func (c *counter) Add() {
c.mu.Lock()