Implement the function CheckIfExist(arr []int) bool in Go, located in the /app/ directory. This function should check if there exists any element in the given integer slice arr such that its double exists in the same slice.
Specific Requirements:
The function should return true if there exists at least one integer x in arr for which 2*x is also present in arr.
The function should return false if no such integer exists or if the array is empty.
You may assume the slice can contain both positive and negative integers, and it can also contain duplicate integers.
The implementation should efficiently handle arrays of varying lengths, including edge cases such as arrays with zero length or arrays with all identical elements.
To pass the provided test cases, ensure that:
For the input [10, 2, 5, 3], the function returns true because 2 is in the array and its double 4 is not needed—2 * 2 = 4, but 10 is also eligible (10*2 = 20).
For the input [3, 1, 7, 11], the function returns false because there is no number such that its double exists in the array.
For the input [4, -7, 11, 4, 18], the function returns false because no elements meet the criteria described.
Ensure to consider possible performance optimizations while implementing the function.
Important: declare your solution in package solution (the test file uses package solution, so the implementation must use the matching package name).