EntityAndAttributeToString converts an entity and attribute to a single string.
(entity *base.Entity, attr string)
| 146 | |
| 147 | // EntityAndAttributeToString converts an entity and attribute to a single string. |
| 148 | func EntityAndAttributeToString(entity *base.Entity, attr string) string { |
| 149 | // Convert the entity to string format |
| 150 | strEntity := EntityToString(entity) |
| 151 | |
| 152 | // Combine the entity string with the attribute using a dollar sign as the separator |
| 153 | result := fmt.Sprintf("%s$%s", strEntity, attr) |
| 154 | |
| 155 | // Return the combined string |
| 156 | return result |
| 157 | } |
| 158 | |
| 159 | // EntityToString function takes an Entity object and converts it into a string. |
| 160 | func EntityToString(entity *base.Entity) string { |
no test coverage detected