package tools import ( "amocrm/internal/tools" "fmt" "penahub.gitlab.yandexcloud.net/backend/quiz/common.git/model" "testing" ) func Test_ConstructAmoTags(t *testing.T) { color := "Red" currentTags := []model.Tag{ {ID: 1, Name: "First", Amoid: 111, Color: &color}, {ID: 2, Name: "Iron Man", Amoid: 222, Color: nil}, {ID: 3, Name: "Lionel Messi", Amoid: 333, Color: nil}, } ruleTags := model.TagsToAdd{ Lead: []int64{1}, Contact: []int64{2, 3}, Company: []int64{}, Customer: []int64{}, } fmt.Println(tools.ConstructAmoTags(currentTags, ruleTags)) }