Skip to content

Commit

Permalink
Remove deprecated cleanup hooks (#1972)
Browse files Browse the repository at this point in the history
Signed-off-by: Dave Henderson <[email protected]>
  • Loading branch information
hairyhenderson authored Jan 22, 2024
1 parent 35a865b commit 0ce4a4e
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 32 deletions.
13 changes: 0 additions & 13 deletions cleanup.go

This file was deleted.

15 changes: 0 additions & 15 deletions data/datasource.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,6 @@ type fileContent struct {
b []byte
}

// Cleanup - clean up datasources before shutting the process down - things
// like Logging out happen here
func (d *Data) Cleanup() {
for _, s := range d.Sources {
s.cleanup()
}
}

// NewData - constructor for Data
//
// Deprecated: will be replaced in future
Expand Down Expand Up @@ -98,13 +90,6 @@ type Source struct {
mediaType string
}

// Deprecated: no-op
func (s *Source) cleanup() {
// if s.kv != nil {
// s.kv.Logout()
// }
}

// String is the method to format the flag's value, part of the flag.Value interface.
// The String method's output will be used in diagnostics.
func (s *Source) String() string {
Expand Down
1 change: 0 additions & 1 deletion gomplate.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ func RunTemplates(o *Config) error {
// Run all gomplate templates specified by the given configuration
func Run(ctx context.Context, cfg *config.Config) error {
Metrics = newMetrics()
defer runCleanupHooks()

// apply defaults before validation
cfg.ApplyDefaults()
Expand Down
3 changes: 0 additions & 3 deletions render.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,6 @@ func NewRenderer(opts Options) *Renderer {
Sources: sources,
}

// make sure data cleanups are run on exit
addCleanupHook(d.Cleanup)

if opts.Funcs == nil {
opts.Funcs = template.FuncMap{}
}
Expand Down

0 comments on commit 0ce4a4e

Please sign in to comment.