func (auth BasicAuth) IsValid(user, password string) bool {
	return auth.Username == user && auth.Password == password
}
IsValid returns true if provided username and password matches
package main
import (
	"sync"
	"sync/atomic"
	"time"
)
type BasicAuth struct {
	Username string
	Password string
}