1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2025-01-31 19:39:09 +00:00
mycorrhiza/hyphae/empty_hypha.go

29 lines
533 B
Go
Raw Normal View History

2022-02-04 11:14:53 +00:00
package hyphae
import "sync"
type EmptyHypha struct {
sync.RWMutex
canonicalName string
}
func (e *EmptyHypha) CanonicalName() string {
return e.canonicalName
}
2022-02-19 08:26:38 +00:00
func ExtendEmptyToTextual(e *EmptyHypha, mycoFilePath string) *TextualHypha {
return &TextualHypha{
canonicalName: e.CanonicalName(),
mycoFilePath: mycoFilePath,
}
}
2022-02-06 13:09:56 +00:00
2022-02-19 08:26:38 +00:00
func ExtendEmptyToMedia(e *EmptyHypha, mediaFilePath string) *MediaHypha {
return &MediaHypha{
canonicalName: e.CanonicalName(),
mycoFilePath: "",
mediaFilePath: mediaFilePath,
2022-02-06 13:09:56 +00:00
}
}