diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 49cff20..da0f063 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,5 +16,5 @@ linters: stage: quality-assurance script: - go get -u golang.org/x/lint/golint - - golint -min_confidence 0.3 -set_exit_status ./... + - golint -min_confidence 0.2 -set_exit_status ./... allow_failure: true diff --git a/auth/auth.go b/auth/auth.go index da66090..9652e3c 100644 --- a/auth/auth.go +++ b/auth/auth.go @@ -1,3 +1,4 @@ +// Package auth manages backends to auth incoming streams package auth import ( diff --git a/auth/basic/basic.go b/auth/basic/basic.go index 5b035fd..00df8cd 100644 --- a/auth/basic/basic.go +++ b/auth/basic/basic.go @@ -1,3 +1,4 @@ +// Package basic provides a basic authentification backend package basic import ( diff --git a/auth/ldap/ldap.go b/auth/ldap/ldap.go index 657bb10..c027fce 100644 --- a/auth/ldap/ldap.go +++ b/auth/ldap/ldap.go @@ -1,3 +1,4 @@ +// Package ldap provides a LDAP authentification backend package ldap import ( diff --git a/internal/monitoring/monitoring.go b/internal/monitoring/monitoring.go index 309f7a9..40b160d 100644 --- a/internal/monitoring/monitoring.go +++ b/internal/monitoring/monitoring.go @@ -1,3 +1,4 @@ +// Package monitoring serves Prometheus monitoring endpoints package monitoring import ( diff --git a/main.go b/main.go index 8e9e0a9..8944379 100644 --- a/main.go +++ b/main.go @@ -1,5 +1,7 @@ //go:generate pkger +// Package main provides the full-featured server with configuration loading +// and communication between routines. package main import ( diff --git a/stream/forwarding/forwarding.go b/stream/forwarding/forwarding.go index 2fe5b94..b45a445 100644 --- a/stream/forwarding/forwarding.go +++ b/stream/forwarding/forwarding.go @@ -1,3 +1,4 @@ +// Package forwarding forwards incoming stream to other streaming services package forwarding import ( diff --git a/stream/srt/handler.go b/stream/srt/handler.go index 84b784e..51fc10a 100644 --- a/stream/srt/handler.go +++ b/stream/srt/handler.go @@ -1,3 +1,4 @@ +// Package srt serves a SRT server package srt import ( diff --git a/stream/srt/srt.go b/stream/srt/srt.go index b47f6ba..0eafb1d 100644 --- a/stream/srt/srt.go +++ b/stream/srt/srt.go @@ -1,3 +1,4 @@ +// Package srt serves a SRT server package srt // #include diff --git a/stream/webrtc/ingest.go b/stream/webrtc/ingest.go index 83e0385..840879d 100644 --- a/stream/webrtc/ingest.go +++ b/stream/webrtc/ingest.go @@ -1,14 +1,15 @@ +// Package webrtc provides the backend to simulate a WebRTC client to send stream package webrtc import ( "bufio" - "github.com/pion/webrtc/v3" "io" "log" "net" "os/exec" "github.com/pion/rtp" + "github.com/pion/webrtc/v3" "gitlab.crans.org/nounous/ghostream/stream/srt" ) diff --git a/stream/webrtc/webrtc.go b/stream/webrtc/webrtc.go index 585c4d1..eaf0d7c 100644 --- a/stream/webrtc/webrtc.go +++ b/stream/webrtc/webrtc.go @@ -1,3 +1,4 @@ +// Package webrtc provides the backend to simulate a WebRTC client to send stream package webrtc import ( diff --git a/web/handler.go b/web/handler.go index f27dd74..d3963d8 100644 --- a/web/handler.go +++ b/web/handler.go @@ -1,9 +1,9 @@ +// Package web serves the JavaScript player and WebRTC negociation package web import ( "bytes" "encoding/json" - "gitlab.crans.org/nounous/ghostream/stream/srt" "html/template" "log" "net" @@ -12,6 +12,7 @@ import ( "github.com/markbates/pkger" "gitlab.crans.org/nounous/ghostream/internal/monitoring" + "gitlab.crans.org/nounous/ghostream/stream/srt" "gitlab.crans.org/nounous/ghostream/stream/webrtc" ) diff --git a/web/web.go b/web/web.go index 8c5af5c..6265c2a 100644 --- a/web/web.go +++ b/web/web.go @@ -1,3 +1,4 @@ +// Package web serves the JavaScript player and WebRTC negociation package web import (