From c35f8dc30792d162abb4bf062f79d1a45d6290df Mon Sep 17 00:00:00 2001 From: pluja Date: Mon, 30 Oct 2023 23:33:14 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(database.go):=20use=20string?= =?UTF-8?q?s.Join=20to=20concatenate=20attributes=20with=20a=20comma=20sep?= =?UTF-8?q?arator=20for=20better=20readability=20and=20maintainability=20i?= =?UTF-8?q?n=20AddFakeData=20function?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/database/database.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/database/database.go b/src/database/database.go index 621f2fa..9102471 100644 --- a/src/database/database.go +++ b/src/database/database.go @@ -3,6 +3,7 @@ package database import ( "context" "os" + "strings" _ "github.com/mattn/go-sqlite3" "github.com/rs/zerolog/log" @@ -39,7 +40,7 @@ func AddFakeData() { SetFiat(true). SetCash(true). SetType(service.TypeExchange). - SetAttributes([]string{AttributeNonCustodialWallet, AttributeOpenSource, AttributeNoPersonalInfoNeeded, AttributeP2P}). + SetAttributes(strings.Join([]string{AttributeNonCustodialWallet, AttributeOpenSource, AttributeNoPersonalInfoNeeded, AttributeP2P, AttributeAPIAvailable, AttributePartnersMayEnforceKYC, AttributeBlockFundsIfFlagged, AttributeKYCForSomeFeatures}, ",")). SetTosHighlights(&[]schema.TosHighlight{sampleTosHighlight}). Save(context.Background()) if err != nil { @@ -64,7 +65,7 @@ func AddFakeData() { SetFiat(true). SetCash(true). SetType(service.TypeExchange). - SetAttributes([]string{AttributeNonCustodialWallet, AttributeOpenSource, AttributeNoPersonalInfoNeeded, AttributeP2P}). + SetAttributes(strings.Join([]string{AttributeNonCustodialWallet, AttributeOpenSource, AttributeNoPersonalInfoNeeded, AttributeP2P}, ",")). SetTosHighlights(&[]schema.TosHighlight{sampleTosHighlight}). Save(context.Background()) if err != nil {