contains checks whether a slice contains a specific string. Parameters: - slice: The slice to check. - item: The item to look for in the slice. Returns: - bool: True if the item is found in the slice, otherwise false.
(slice []string, item string)
| 79 | // Returns: |
| 80 | // - bool: True if the item is found in the slice, otherwise false. |
| 81 | func contains(slice []string, item string) bool { |
| 82 | for _, a := range slice { |
| 83 | if a == item { |
| 84 | return true |
| 85 | } |
| 86 | } |
| 87 | return false |
| 88 | } |
| 89 | |
| 90 | // UploadExternalData handles the process of uploading external data by detecting file type, parsing, and storing it. |
| 91 | // Parameters: |
no outgoing calls