1/*
2 * Copyright (c) 2016-2017, Randy Westlund. All rights reserved.
3 * This code is under the BSD-2-Clause license.
4 *
5 * This file contains general utility functions.
6 */
7
8package main
9
10// Return true if the first arg slice contains the second arg.
11func contains(haystack []string, needle string) bool {
12	for _, v := range haystack {
13		if v == needle {
14			return true
15		}
16	}
17	return false
18}
19