1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2025-01-19 15:12:49 +00:00
mycorrhiza/hyphae/empty_hypha.go
2022-02-19 11:31:54 +03:00

29 lines
533 B
Go

package hyphae
import "sync"
type EmptyHypha struct {
sync.RWMutex
canonicalName string
}
func (e *EmptyHypha) CanonicalName() string {
return e.canonicalName
}
func ExtendEmptyToTextual(e *EmptyHypha, mycoFilePath string) *TextualHypha {
return &TextualHypha{
canonicalName: e.CanonicalName(),
mycoFilePath: mycoFilePath,
}
}
func ExtendEmptyToMedia(e *EmptyHypha, mediaFilePath string) *MediaHypha {
return &MediaHypha{
canonicalName: e.CanonicalName(),
mycoFilePath: "",
mediaFilePath: mediaFilePath,
}
}