V
V
v- death2015-11-04 19:31:30
go
v- death, 2015-11-04 19:31:30

How to check if a value exists?

Hello. There is an array like

Types = []string{
    "Debug",
    "Info",
    "Warn",
    "Error",
    "Fatal",
}

How can you check if a value exists in an array without using brute force?
Thanks in advance

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey S., 2015-11-04
@vGrabko99

Ok Google
"key value check go"

P
PythonBird, 2020-07-17
@PythonBird

For LL

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question