mirror of
https://github.com/anchore/syft.git
synced 2026-11-01 15:06:36 +01:00
add analysis coordination (with dummy analyzer)
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package internal
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"text/template"
|
||||
)
|
||||
|
||||
// Tprintf renders a string from a given template string and field values
|
||||
func Tprintf(tmpl string, data map[string]interface{}) string {
|
||||
t := template.Must(template.New("").Parse(tmpl))
|
||||
buf := &bytes.Buffer{}
|
||||
if err := t.Execute(buf, data); err != nil {
|
||||
return ""
|
||||
}
|
||||
return buf.String()
|
||||
}
|
||||
Reference in New Issue
Block a user