Fix godoc style comments (#356)

This commit is contained in:
Christian Muehlhaeuser
2020-11-13 00:14:59 +01:00
committed by GitHub
parent 8f921fbfde
commit 2e1f8d29b5
59 changed files with 147 additions and 147 deletions

View File

@@ -10,7 +10,7 @@ import (
log "github.com/sirupsen/logrus"
)
// ChangeExtraPageContent will change the optional page content
// ChangeExtraPageContent will change the optional page content.
func ChangeExtraPageContent(w http.ResponseWriter, r *http.Request) {
if r.Method != "POST" {
controllers.WriteSimpleResponse(w, false, r.Method+" not supported")

View File

@@ -10,7 +10,7 @@ import (
log "github.com/sirupsen/logrus"
)
// ChangeStreamKey will change the stream key (in memory)
// ChangeStreamKey will change the stream key (in memory).
func ChangeStreamKey(w http.ResponseWriter, r *http.Request) {
if r.Method != "POST" {
controllers.WriteSimpleResponse(w, false, r.Method+" not supported")

View File

@@ -9,7 +9,7 @@ import (
"github.com/owncast/owncast/core/rtmp"
)
// DisconnectInboundConnection will force-disconnect an inbound stream
// DisconnectInboundConnection will force-disconnect an inbound stream.
func DisconnectInboundConnection(w http.ResponseWriter, r *http.Request) {
if !core.GetStatus().Online {
controllers.WriteSimpleResponse(w, false, "no inbound stream connected")

View File

@@ -7,7 +7,7 @@ import (
"github.com/owncast/owncast/metrics"
)
// GetHardwareStats will return hardware utilization over time
// GetHardwareStats will return hardware utilization over time.
func GetHardwareStats(w http.ResponseWriter, r *http.Request) {
m := metrics.Metrics

View File

@@ -11,7 +11,7 @@ import (
log "github.com/sirupsen/logrus"
)
// ServeAdmin will return admin web assets
// ServeAdmin will return admin web assets.
func ServeAdmin(w http.ResponseWriter, r *http.Request) {
// Set a cache control max-age header
middleware.SetCachingHeaders(w, r)

View File

@@ -9,7 +9,7 @@ import (
"github.com/sirupsen/logrus"
)
// GetLogs will return all logs
// GetLogs will return all logs.
func GetLogs(w http.ResponseWriter, r *http.Request) {
logs := logging.Logger.AllEntries()
response := make([]logsResponse, 0)
@@ -22,7 +22,7 @@ func GetLogs(w http.ResponseWriter, r *http.Request) {
json.NewEncoder(w).Encode(response)
}
// GetWarnings will return only warning and error logs
// GetWarnings will return only warning and error logs.
func GetWarnings(w http.ResponseWriter, r *http.Request) {
logs := logging.Logger.WarningEntries()
response := make([]logsResponse, 0)

View File

@@ -7,7 +7,7 @@ import (
"github.com/owncast/owncast/config"
)
// GetServerConfig gets the config details of the server
// GetServerConfig gets the config details of the server.
func GetServerConfig(w http.ResponseWriter, r *http.Request) {
var videoQualityVariants = make([]config.StreamQuality, 0)
for _, variant := range config.Config.GetVideoStreamQualities() {

View File

@@ -9,7 +9,7 @@ import (
"github.com/owncast/owncast/models"
)
// Status gets the details of the inbound broadcaster
// Status gets the details of the inbound broadcaster.
func Status(w http.ResponseWriter, r *http.Request) {
broadcaster := core.GetBroadcaster()
status := core.GetStatus()

View File

@@ -7,7 +7,7 @@ import (
"github.com/owncast/owncast/metrics"
)
// GetViewersOverTime will return the number of viewers at points in time
// GetViewersOverTime will return the number of viewers at points in time.
func GetViewersOverTime(w http.ResponseWriter, r *http.Request) {
viewersOverTime := metrics.Metrics.Viewers
w.Header().Set("Content-Type", "application/json")