type issue with EditIssueOption #282
Labels
No Label
has/backport
has/pull
in progress
invalid
kind/breaking
kind/bug
kind/build
kind/deployment
kind/docs
kind/enhancement
kind/feature
kind/lint
kind/proposal
kind/question
kind/refactor
kind/security
kind/testing
kind/translation
kind/ui
need/backport
priority/critical
priority/low
priority/maybe
priority/medium
reviewed/duplicate
reviewed/invalid
reviewed/wontfix
skip-changelog
status/blocked
status/needs-feedback
status/needs-reviews
status/wip
upstream/gitea
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: gitea/go-sdk#282
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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?
https://gitea.com/gitea/go-sdk/src/branch/master/gitea/issue.go#L172-L180
Is there a reason the string fields are pointers? This makes it hard / impossible to work with literals (I might be missing some golang syntax here?)
A pointer of string means it's optional, it maybe
nil
if there is no content.Okay makes sense.
But how do I populate such a field? Creating a string pointer seems impossible:
gives
cannot use "foo" (type string) as type *string in assignment
gives
invalid indirect of "foo" (type untyped string)
gives
cannot use "foo" (type string) as type *string in assignment
...
It's not very convenient, but you can do like this.
@noerw or if you have to use this more often create a simple helper function:
https://play.golang.org/p/tzAdTv_Jn0U