Expanded linting + fix warnings (#1396)
* Expand the linters and types of warnings to improve consistency and safety * Fail lint workflow if there are errors * golint has been replaced by revive * Hand-pick some of the default exclude list * Ignore error when trying to delete preview gif * Ignore linter warning opening playlist path * Rename user field Id -> ID * A bunch of renames to address linter warnings * Rename ChatClient -> Client per linter suggestion best practice * Rename ChatServer -> Server per linter suggestion best practice * More linter warning fixes * Add missing comments to all exported functions and properties
This commit is contained in:
@@ -22,7 +22,7 @@ var VersionNumber = StaticVersionNumber
|
||||
// WebServerPort is the port for Owncast's webserver that is used for this execution of the service.
|
||||
var WebServerPort = 8080
|
||||
|
||||
// Bind WebServer to this IP address. Be secure by default.
|
||||
// WebServerIP is the IP address to bind the web server to. All interfaces by default.
|
||||
var WebServerIP = "0.0.0.0"
|
||||
|
||||
// InternalHLSListenerPort is the port for HLS writes that is used for this execution of the service.
|
||||
@@ -34,6 +34,7 @@ var GitCommit = ""
|
||||
// BuildPlatform is the optional platform this release was built for.
|
||||
var BuildPlatform = "dev"
|
||||
|
||||
// GetCommit will return an identifier used for identifying the point in time this build took place.
|
||||
func GetCommit() string {
|
||||
if GitCommit == "" {
|
||||
GitCommit = time.Now().Format("20060102")
|
||||
@@ -42,11 +43,12 @@ func GetCommit() string {
|
||||
return GitCommit
|
||||
}
|
||||
|
||||
// DefaultForbiddenUsernames are a list of usernames forbidden from being used in chat.
|
||||
var DefaultForbiddenUsernames = []string{
|
||||
"owncast", "operator", "admin", "system",
|
||||
}
|
||||
|
||||
// The maximum payload we will allow to to be received via the chat socket.
|
||||
// MaxSocketPayloadSize is the maximum payload we will allow to to be received via the chat socket.
|
||||
const MaxSocketPayloadSize = 2048
|
||||
|
||||
// GetReleaseString gets the version string.
|
||||
|
||||
Reference in New Issue
Block a user