{{- $stage := .Get "stage" | default "alpha-beta" -}} {{- $stageMap := dict "alpha-beta" (slice "Alpha" "Beta") "ga-deprecated" (slice "GA" "Deprecated") -}} {{- $selectedStages := index $stageMap $stage -}} {{- if not $selectedStages -}} {{- errorf "feature-gates-table: unsupported stage %q" $stage -}} {{- end -}} {{- $features := hugo.Data.featuregates.versioned_feature_list -}} {{- range $features }} {{- $featureName := .name -}} {{- $specs := .versionedSpecs -}} {{- range $i, $spec := $specs }} {{- if in $selectedStages $spec.preRelease }} {{- $nextIndex := add $i 1 -}} {{- $until := "" -}} {{- if lt $nextIndex (len $specs) -}} {{- $until = (index $specs $nextIndex).version -}} {{- end -}} {{- end -}} {{- end -}} {{- end -}}
Feature Default Stage Since Until
{{ $featureName }} {{ if $spec.default }}true{{ else }}false{{ end }} {{ $spec.preRelease }} {{ $spec.version }} {{ if $until }}{{ $until }}{{ else }}—{{ end }}