mirror of
https://gitlab.crans.org/nounous/ghostream.git
synced 2024-12-22 09:12:19 +00:00
Remove ineffectual assignments
This commit is contained in:
parent
e53d5a02ab
commit
c3629bdbb5
@ -26,7 +26,7 @@ type Backend interface {
|
||||
|
||||
// New initialize authentification backend
|
||||
func New(cfg *Options) (Backend, error) {
|
||||
var backend Backend = nil
|
||||
var backend Backend
|
||||
var err error
|
||||
|
||||
if !cfg.Enabled {
|
||||
|
@ -85,6 +85,9 @@ func Load() (*Config, error) {
|
||||
configuro.WithLoadFromConfigFile("/etc/ghostream/ghostream.yml", false),
|
||||
configuro.WithEnvConfigPathOverload("GHOSTREAM_CONFIG"),
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Load default configuration
|
||||
cfg := New()
|
||||
|
@ -28,13 +28,13 @@ func TestSplitHostPort(t *testing.T) {
|
||||
}
|
||||
|
||||
// Split demo, should fail
|
||||
host, port, err = splitHostPort("demo")
|
||||
_, _, err = splitHostPort("demo")
|
||||
if err == nil {
|
||||
t.Errorf("splitHostPort managed to split unsplitable hostport")
|
||||
}
|
||||
|
||||
// Split demo:port, should fail
|
||||
host, port, err = splitHostPort("demo:port")
|
||||
_, _, err = splitHostPort("demo:port")
|
||||
if err == nil {
|
||||
t.Errorf("splitHostPort managed to split unsplitable hostport")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user