harbor run -t openthoughts/tasktrove-exp-rpt-stack-go-v4-stack-go-1950harbor download openthoughts/tasktrove-exp-rpt-stack-go-v4-stack-go-1950Implement the Tag struct and its associated methods in Go to fulfill the requirements of the provided test cases. The functionality you need to implement includes the following:
Struct Definition:
Tag struct. Ensure that its size does not exceed 24 bytes, as verified in the TestTagSize test case.Methods:
Tag represents the unspecified language (e.g., und with no script, region, or extension). The test case TestIsRoot should pass.Tag. It’s tested in TestString.TestMarshal test should pass, ensuring that Tags can be correctly serialized and deserialized.TestBase.Tag. It should work as specified in TestRegion.TestScript.Tag based on inherited properties. Follow the testing cases in TestParent.TestContains.TestCanonicalize.Utility Methods:
Parse, ParseBase, ParseScript, and ParseRegion with corresponding error handling.Additional Logic:
TestIsCountry and TestIsGroup.Your implementation should be placed in the /app/ directory, and you must ensure that all test cases pass as expected when running go test.
Important: declare your solution in package language (the test file uses package language, so the implementation must use the matching package name).