Add comments for exported functions

This commit is contained in:
9seconds
2018-10-17 10:51:16 +03:00
parent 358d42ec61
commit 3aec9657d7
3 changed files with 4 additions and 0 deletions
+2
View File
@@ -89,6 +89,7 @@ func (s speed) MarshalJSON() ([]byte, error) {
return json.Marshal(value)
}
// Stats represents a statistics of the proxy.
type Stats struct {
URLs config.IPURLs `json:"urls"`
Connections connections `json:"connections"`
@@ -165,6 +166,7 @@ func (s *Stats) handleCrash() {
s.Crashes++
}
// NewStats creates a new instance of Stats structure.
func NewStats(conf *config.Config) *Stats {
return &Stats{
URLs: conf.GetURLs(),