Logo
Explore Help
Sign In
status-im/consul
2
0
Fork 0
You've already forked consul
mirror of https://github.com/status-im/consul.git synced 2025-01-11 22:34:55 +00:00
Code Issues Projects Releases Wiki Activity
consul/lib/math.go

23 lines
215 B
Go
Raw Normal View History

Allow adjusting the number of DNS records in a response... Based on work done by @fusiondog in #1583, extend the concept to use an integer instead of a boolean. Fixes: #1583 && #1481
2016-02-11 23:58:48 -08:00
package lib
Add lib.AbsInt() helper function
2016-03-30 11:47:37 -07:00
func AbsInt(a int) int {
if a > 0 {
return a
}
return a * -1
}
Allow adjusting the number of DNS records in a response... Based on work done by @fusiondog in #1583, extend the concept to use an integer instead of a boolean. Fixes: #1583 && #1481
2016-02-11 23:58:48 -08:00
func MaxInt(a, b int) int {
if a > b {
return a
}
return b
}
func MinInt(a, b int) int {
if a > b {
return b
}
return a
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.0 Page: 1036ms Template: 6ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API