From 01b488092aa58f69a4342b4c5d5b9bcc563ba707 Mon Sep 17 00:00:00 2001 From: Chris Gianelloni Date: Sat, 17 May 2025 15:44:12 -0400 Subject: [PATCH] fix: use slices.Contains instead of for loop Signed-off-by: Chris Gianelloni --- internal/config/profile.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/internal/config/profile.go b/internal/config/profile.go index edfe890..52edf85 100644 --- a/internal/config/profile.go +++ b/internal/config/profile.go @@ -6,6 +6,8 @@ package config +import "slices" + type Profile struct { Network string // Cardano network name Tld string // Top-level domain @@ -19,11 +21,8 @@ type Profile struct { func GetProfiles() []Profile { var ret []Profile for k, profile := range Profiles { - for _, tmpProfile := range globalConfig.Profiles { - if k == tmpProfile { - ret = append(ret, profile) - break - } + if slices.Contains(globalConfig.Profiles, k) { + ret = append(ret, profile) } } return ret