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
 | 
			
		||||
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")
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user