diff --git a/fileartifactprocessor.go b/fileartifactprocessor.go index 4575421..7c393ae 100644 --- a/fileartifactprocessor.go +++ b/fileartifactprocessor.go @@ -36,6 +36,8 @@ const ( const DefaultWriteMode WriteMode = WriteOnceMode +var _ Artifact = (*FileArtifact)(nil) + // FileArtifact is a data structure that can be used by a SpecificationProcessor to generate file artifacts // that can be written by the FileArtifactProcessor. type FileArtifact struct { @@ -54,11 +56,11 @@ func NewDirectoryArtifact(path string, fileMode os.FileMode, writeMode WriteMode } } -func (a FileArtifact) ID() ArtifactID { +func (a *FileArtifact) ID() ArtifactID { return ArtifactID(a.Path) } -func (a FileArtifact) IsDir() bool { +func (a *FileArtifact) IsDir() bool { return a.FileMode&os.ModeDir != 0 }