From 374ed5e1a4dc635c42e33e4133729d40cf3e0e35 Mon Sep 17 00:00:00 2001 From: ewy Date: Wed, 22 Apr 2026 18:29:37 +0200 Subject: work on tests also replace the annoying search return with a struct --- runner/stub.go | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 runner/stub.go (limited to 'runner') diff --git a/runner/stub.go b/runner/stub.go new file mode 100644 index 0000000..e1fd8ed --- /dev/null +++ b/runner/stub.go @@ -0,0 +1,56 @@ +//go:build test + +package runner + +import ( + "os/exec" + "pik/model" +) + +// Stub is the most minimal and useless implementation of the target interface. It only panics. Use if you need a target-compliant struct. +type Stub struct { +} + +func (s Stub) Matches(input string) bool { + //TODO implement me + panic("implement me") +} + +func (s Stub) Create(src *model.Source) *exec.Cmd { + //TODO implement me + panic("implement me") +} + +func (s Stub) Sub() []string { + //TODO implement me + panic("implement me") +} + +func (s Stub) Label() string { + //TODO implement me + panic("implement me") +} + +func (s Stub) Hydrate(src *model.Source) (model.HydratedTarget, error) { + //TODO implement me + panic("implement me") +} + +func (s Stub) Tags() model.Tags { + return nil +} + +func (s Stub) ShortestId() string { + //TODO implement me + panic("implement me") +} + +func (s Stub) Visible() bool { + //TODO implement me + panic("implement me") +} + +func (s Stub) Invocation(src *model.Source) []string { + //TODO implement me + panic("implement me") +} -- cgit v1.3.1