Checking if an Element or Item exists in Slice/Array or List is not built-in Golang language but we can easily write a function which can perform the same task.
But, Bear in mind, this method need to be re-written if Slice is going to be huge as it is traversing through all the element to check if item is exists or not.
No comments:
Post a Comment