Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This function did not only validate the input but it returned a new value in case the hostname was valid. This simplifies the function by always returning the required value, no matter if it is valid or invalid, so the callee site does not have to check that anymore. On top the function is renamed to `getHostname` to make clear that the function does not only validate the input but it also returns a new value. PR-URL: #26809 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
- Loading branch information