Fix bad example for boolean options
This commit is contained in:
		@@ -17,13 +17,13 @@ Just replace `http.ListenAndServe` with `anyhttp.ListenAndServe`.
 | 
			
		||||
 | 
			
		||||
Syntax
 | 
			
		||||
 | 
			
		||||
    unix?path=<socket_path>&mode=<socket file mode>&remove_existing=<yes|no>
 | 
			
		||||
    unix?path=<socket_path>&mode=<socket file mode>&remove_existing=<true|false>
 | 
			
		||||
 | 
			
		||||
Examples
 | 
			
		||||
 | 
			
		||||
    unix?path=relative/path.sock
 | 
			
		||||
    unix?path=/var/run/app/absolutepath.sock
 | 
			
		||||
    unix?path=/run/app.sock&mode=600&remove_existing=no
 | 
			
		||||
    unix?path=/run/app.sock&mode=600&remove_existing=false
 | 
			
		||||
 | 
			
		||||
| option          | description                                    | default  |
 | 
			
		||||
|-----------------|------------------------------------------------|----------|
 | 
			
		||||
@@ -35,7 +35,7 @@ Examples
 | 
			
		||||
 | 
			
		||||
Syntax
 | 
			
		||||
 | 
			
		||||
    sysd?idx=<fd index>&name=<fd name>&check_pid=<yes|no>&unset_env=<yes|no>&idle_timeout=<duration>
 | 
			
		||||
    sysd?idx=<fd index>&name=<fd name>&check_pid=<true|false>&unset_env=<true|false>&idle_timeout=<duration>
 | 
			
		||||
 | 
			
		||||
Only one of `idx` or `name` has to be set
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -72,6 +72,20 @@ func Test_parseAddress(t *testing.T) {
 | 
			
		||||
			wantSysc:     nil,
 | 
			
		||||
			wantErr:      true,
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			name:         "systemd address with check_pid and unset_env",
 | 
			
		||||
			addr:         "sysd?idx=0&check_pid=false&unset_env=f",
 | 
			
		||||
			wantAddrType: SystemdFD,
 | 
			
		||||
			wantUsc:      nil,
 | 
			
		||||
			wantSysc: &SysdConfig{
 | 
			
		||||
				FDIndex:     ptr(0),
 | 
			
		||||
				FDName:      nil,
 | 
			
		||||
				CheckPID:    false,
 | 
			
		||||
				UnsetEnv:    false,
 | 
			
		||||
				IdleTimeout: nil,
 | 
			
		||||
			},
 | 
			
		||||
			wantErr: false,
 | 
			
		||||
		},
 | 
			
		||||
	}
 | 
			
		||||
	for _, tt := range tests {
 | 
			
		||||
		t.Run(tt.name, func(t *testing.T) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user