Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed issue where NewEntity wasnt being used and the resulting entity… #11

Merged
merged 1 commit into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.22-alpine as build_env

Check warning on line 1 in Dockerfile

View workflow job for this annotation

GitHub Actions / DockerHub / docker

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

# Copy go mod and sum files
COPY go.mod go.sum ./
Expand All @@ -13,7 +13,7 @@
# Download all dependencies. Dependencies will be cached if the go.mod and go.sum files are not changed
RUN go mod download

FROM build_env as builder

Check warning on line 16 in Dockerfile

View workflow job for this annotation

GitHub Actions / DockerHub / docker

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/
# Copy the source from the current directory to the Working Directory inside the container
COPY layer.go ./
COPY cmd ./cmd
Expand All @@ -28,8 +28,5 @@
COPY --from=builder /filesystem-datalayer .
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/

# Expose port 8090 to the outside world
EXPOSE 8090

# Command to run the executable
CMD ["./filesystem-datalayer"]
2 changes: 1 addition & 1 deletion layer.go
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ func (f *FileCollectionEntityIterator) Next() (*egdm.Entity, cdl.LayerError) {
if item == nil {
return nil, nil
} else {
entity := &egdm.Entity{Properties: make(map[string]any)}
entity := egdm.NewEntity()
err := f.mapper.MapItemToEntity(item, entity)
if err != nil {
return nil, cdl.Err(fmt.Errorf("could not map item to entity because %s", err.Error()), cdl.LayerErrorInternal)
Expand Down
Loading