Skip to content

Return error if setting an empty value to a MultiStringFlag

Jaime Martinez requested to merge fix-multistringflag-split into master

Encountered an issue when following the instructions on how to run it in the README where passing an empty -listen-https flag on run will not allow the service to start. This is because an empty string is added to the result of Split method of MultiStringFlag. So eventually, when listenAndServeTLS is called, the service fails to start because it can't find a CERT for an empty string "" with error error="tls: failed to find any PEM data in certificate input"

Added a check on Set to return an error when the value is an empty string Updated documentation to reflect how to run it

Edited by Jaime Martinez

Merge request reports