<commit_before>include "directors.vcl";

backend default {
    .host = "127.0.0.1";
    .port = "65535";
}

sub vcl_recv {
    set req.backend = default;

    {{range .}}
        if (req.http.host == "{{.Name}}") {
            {{range .Paths}}
                if (req.url ~ "^{{.Path}}") {
                    set req.backend = {{.Director}};
                    include "/etc/varnish/vcl/{{.VCL}}/recv.vcl";
                }
            {{end}}
        }
    {{end}}
}

sub vcl_fetch {
    {{range .}}
        if (req.http.host == "{{.Name}}") {
            {{range .Paths}}
                if (req.url ~ "^{{.Path}}") {
                    include "/etc/varnish/vcl/{{.VCL}}/fetch.vcl";
                }
            {{end}}
        }
    {{end}}
}

sub vcl_deliver {
    {{range .}}
        if (req.http.host == "{{.Name}}") {
            {{range .Paths}}
                if (req.url ~ "^{{.Path}}") {
                    include "/etc/varnish/vcl/{{.VCL}}/deliver.vcl";
                }
            {{end}}
        }
    {{end}}
}

sub vcl_hit {
    {{range .}}
        if (req.http.host == "^{{.Name}}") {
            {{range .Paths}}
                if (req.url ~ "^{{.Path}}") {
                    include "/etc/varnish/vcl/{{.VCL}}/hit.vcl";
                }
            {{end}}
        }
    {{end}}
}

sub vcl_miss {
    {{range .}}
        if (req.http.host == "^{{.Name}}") {
            {{range .Paths}}
                if (req.url ~ "^{{.Path}}") {
                    include "/etc/varnish/vcl/{{.VCL}}/miss.vcl";
                }
            {{end}}
        }
    {{end}}
}<commit_msg>Added else keyword to if statements.<commit_after>include "directors.vcl";

backend default {
    .host = "127.0.0.1";
    .port = "65535";
}

sub vcl_recv {
    set req.backend = default;

    {{range $index, $host := .}}
        {{if $index}}else{{end}} if (req.http.host == "{{$host.Name}}") {
            {{range $index, $value := $host.Paths}}
                {{if $index}}else{{end}} if (req.url ~ "^{{$value.Path}}") {
                    set req.backend = {{$value.Director}};
                    include "/etc/varnish/vcl/{{$value.VCL}}/recv.vcl";
                }
            {{end}}
        }
    {{end}}
}

sub vcl_fetch {
    {{range $index, $host := .}}
        {{if $index}}else{{end}} if (req.http.host == "{{$host.Name}}") {
            {{range $index, $value := $host.Paths}}
                {{if $index}}else{{end}} if (req.url ~ "^{{$value.Path}}") {
                    include "/etc/varnish/vcl/{{$value.VCL}}/fetch.vcl";
                }
            {{end}}
        }
    {{end}}
}

sub vcl_deliver {
    {{range $index, $host := .}}
        {{if $index}}else{{end}} if (req.http.host == "{{$host.Name}}") {
            {{range $index, $value := $host.Paths}}
                {{if $index}}else{{end}} if (req.url ~ "^{{$value.Path}}") {
                    include "/etc/varnish/vcl/{{$value.VCL}}/deliver.vcl";
                }
            {{end}}
        }
    {{end}}
}

sub vcl_hit {
    {{range $index, $host := .}}
        {{if $index}}else{{end}} if (req.http.host == "{{$host.Name}}") {
            {{range $index, $value := $host.Paths}}
                {{if $index}}else{{end}} if (req.url ~ "^{{$value.Path}}") {
                    include "/etc/varnish/vcl/{{$value.VCL}}/hit.vcl";
                }
            {{end}}
        }
    {{end}}
}

sub vcl_miss {
    {{range $index, $host := .}}
        {{if $index}}else{{end}} if (req.http.host == "{{$host.Name}}") {
            {{range $index, $value := $host.Paths}}
                {{if $index}}else{{end}} if (req.url ~ "^{{$value.Path}}") {
                    include "/etc/varnish/vcl/{{$value.VCL}}/miss.vcl";
                }
            {{end}}
        }
    {{end}}
}
{'fraction_non_alphanumeric': 0.2278749337572867, 'fraction_numerical': 0.005829358770535241, 'mean_word_length': 1.4029280712921706, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3268562', 'n_tokens_mistral': 1339, 'n_tokens_neox': 1264, 'n_words': 223}