feat(aa-log): format rule before print.
This commit is contained in:
parent
352c444ae6
commit
b99bb8da46
7 changed files with 73 additions and 34 deletions
|
|
@ -19,10 +19,7 @@
|
|||
{{ end -}}
|
||||
|
||||
{{- range .Variables -}}
|
||||
{{ "@{" }}{{ .Name }}{{ "} = " }}
|
||||
{{- range .Values -}}
|
||||
{{ . }}{{ " " }}
|
||||
{{- end }}
|
||||
{{ "@{" }}{{ .Name }}{{ "} = " }}{{ join .Values }}
|
||||
{{ end -}}
|
||||
|
||||
{{- "profile" -}}
|
||||
|
|
@ -43,6 +40,10 @@
|
|||
{{- $oldtype := "" -}}
|
||||
{{- range .Rules -}}
|
||||
{{- $type := typeof . -}}
|
||||
{{- if eq $type "Rule" -}}
|
||||
{{- "\n" -}}
|
||||
{{- continue -}}
|
||||
{{- end -}}
|
||||
{{- if and (ne $type $oldtype) (ne $oldtype "") -}}
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
||||
|
|
@ -217,7 +218,12 @@
|
|||
|
||||
{{- if eq $type "File" -}}
|
||||
{{- template "qualifier" . -}}
|
||||
{{ .Path }}{{ " " }}{{ .Access }}
|
||||
{{- .Path -}}
|
||||
{{- " " -}}
|
||||
{{- with .Padding -}}
|
||||
{{ . }}
|
||||
{{- end -}}
|
||||
{{- .Access -}}
|
||||
{{- with .Target -}}
|
||||
{{ " -> " }}{{ . }}
|
||||
{{- end -}}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
{{- define "qualifier" -}}
|
||||
{{- with .Prefix -}}
|
||||
{{ . }}
|
||||
{{- end -}}
|
||||
{{- if .Owner -}}
|
||||
{{- "owner " -}}
|
||||
{{- end -}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue