Skip to content

What's the point of having a lot of this kind of writing in the code? #3419

Answered by andydotxyz
junmaqiang asked this question in Q&A
Discussion options

You must be logged in to vote

It is to declare that a type conforms to an interface - so you get compile errors if the object fails to implement a method of the interface.
Normally in Fyne code you will see a comment with it like:

// Declare conformity with CanvasObject interface

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Jacalz
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #3418 on November 21, 2022 13:22.