Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Tags pkg #3564

Merged
merged 1 commit into from Dec 23, 2022
Merged

Fix Tags pkg #3564

merged 1 commit into from Dec 23, 2022

Conversation

kobergj
Copy link
Contributor

@kobergj kobergj commented Dec 19, 2022

adds an option to create the tags struct from a []string

@update-docs
Copy link

update-docs bot commented Dec 19, 2022

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@kobergj kobergj changed the base branch from master to edge December 19, 2022 13:39
@kobergj kobergj force-pushed the FixTagsPackage branch 4 times, most recently from f362d95 to 5eafdf2 Compare December 19, 2022 14:02
@fschade
Copy link
Contributor

fschade commented Dec 19, 2022

just a idea:

type Tags struct {
	t       []string
}

func NewTags(in ...string) *Tags {
	t := &Tags{}
	
	for _, tgs := range in {
		t.t = append(t.t, strings.Split(tgs, ",")...)
	}
	
	return t
}

then we do not have to differentiate between string & []string. Same for AddList .
What do you think

@kobergj
Copy link
Contributor Author

kobergj commented Dec 20, 2022

Excellent idea 👍 Just named it New as it will anyway be called as tags.New

Signed-off-by: jkoberg <jkoberg@owncloud.com>
Copy link
Contributor

@fschade fschade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🥳

@kobergj kobergj merged commit 3ae37de into cs3org:edge Dec 23, 2022
@kobergj kobergj deleted the FixTagsPackage branch December 23, 2022 09:33
@micbar micbar mentioned this pull request May 3, 2023
89 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants