bingohuang
Effective Go 中英双语版

Updated 9 days ago

jane1993 (@jane1993) started discussion #26

2 years ago · 0 comments

Open

For obvious reasons this is called the “comma ok” idiom. In this example, if tz is present, seconds will be set appropriately and ok will be true; if not, seconds will be set to zero and ok will be false. Here's a function that puts it together with a nice error report:

数据 (Edit this file)

Nice!!!

No description provided.

No comments on this discussion.


to join this conversation on GitBook. Already have an account? Sign in to comment
Notifications

You’re not receiving notifications from this thread.


1 participant