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