Make flags marshallable #2
No reviewers
Labels
No Label
in progress
kind/breaking
kind/bug
kind/deployment
kind/docs
kind/enhancement
kind/feature
kind/lint
kind/proposal
kind/question
kind/security
kind/testing
kind/translation
kind/ui
lgtm/done
lgtm/need
lgtm/need
priority/critical
priority/low
priority/maybe
priority/medium
refactor
reviewed/duplicate
reviewed/invalid
reviewed/wontfix
status/blocked
status/needs-feedback
status/wip
No Milestone
No Assignees
3 Participants
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: gitea/log#2
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "zeripath/log:marshal-flags"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Flags should be marshallable.
@ -35,3 +41,3 @@
)
var flagFromString = map[string]int{
var flagFromString = map[string]Flags{
I think since
flagOrder
is exist, this map is unnecessary. There is no performance difference between traversing map and traversing slice when there are some few items.The index of the flagOrder array is not the value of the flag.
OK. This will not the blocker.
Sorry I was being stupid - So long as we keep orderFlag in the same order as the declaration we can just use
Flags(1<< uint64(i))
to get the flag value.