{{ $api := "https://api.github.com" }} {{ with try (resources.GetRemote $api) }} {{ with .Err }} {{ errorf "failed to get remote %s: %s." $api . }} {{ else }} {{ if not .Value }} {{ errorf "failed to get remote: %s" $api }} {{ end }} {{ end }} {{ end }}