summaryrefslogtreecommitdiff
path: root/cleanup.go
blob: 81af5661eb3b81cce355764fe0fc33c5c651d935 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
package gomplate

var cleanupHooks = make([]func(), 0)

func addCleanupHook(hook func()) {
	cleanupHooks = append(cleanupHooks, hook)
}

func runCleanupHooks() {
	for _, hook := range cleanupHooks {
		hook()
	}
}