harbor run -t openthoughts/tasktrove-exp-rpt-stack-go-v4-stack-go-9881harbor download openthoughts/tasktrove-exp-rpt-stack-go-v4-stack-go-9881Task Description: Implement the ExifEditor Functionality
You are required to implement the ExifEditor functionality in Go. The ExifEditor should handle the editing and management of EXIF metadata for JPEG images. The specific requirements to fulfill the tests provided are:
Implementation of the NewExifEditor function:
sl) and return a new ExifEditor instance.dirty field of the ExifEditor should be initialized to false.rootIb field should be initialized to a non-nil value, likely representing the root structure of the EXIF data.sl is nil, the function should return an error.Implementation of the NewExifEditorEmpty function:
ExifEditor.dirty property should be set based on the flag provided.rootIb should not be nil.Implementation of the IsDirty method:
Implementation of methods to set and retrieve EXIF tags:
SetImageDescription, SetUserComment, SetDate, SetIfdExifTag, and SetIfdRootTag with appropriate error handling.dirty state appropriately when tags are modified.Implement functionality for managing image descriptions and comments:
Handle the building mechanism for IFDs (Image File Directories):
IfdBuilder that tracks changes and allows setting various EXIF fields.Testing for various edge cases:
Your code solution should be placed in the /app/ directory of the project. Ensure that all provided tests pass successfully after your implementation.
Important: declare your solution in package metadata (the test file uses package metadata, so the implementation must use the matching package name).