Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 833497 - go-module.eclass: ego helper function should step in, if '|| die' is missing
Summary: go-module.eclass: ego helper function should step in, if '|| die' is missing
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-16 17:40 UTC by Anna Vyalkova
Modified: 2022-02-25 14:30 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anna Vyalkova 2022-02-16 17:40:54 UTC
I often see people forget to add `|| die` when they call go command.

A helper function (similar to eninja or esetup.py) that:

1) appends default GOFLAGS so they cannot be overwritten
2) dies on errors

would be convenient.
Comment 1 Larry the Git Cow gentoo-dev 2022-02-25 14:30:18 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=647059f7f484488693e7af9b61d5888382123a03

commit 647059f7f484488693e7af9b61d5888382123a03
Author:     William Hubbs <williamh@gentoo.org>
AuthorDate: 2022-02-25 14:29:08 +0000
Commit:     William Hubbs <williamh@gentoo.org>
CommitDate: 2022-02-25 14:30:01 +0000

    go-module.eclass: add helper function to call go
    
    This function will cause the ebuild to die if Go fails.
    Also, it outputs the go command that is being run.
    
    Closes: https://bugs.gentoo.org/833497
    Signed-off-by: William Hubbs <williamh@gentoo.org>

 eclass/go-module.eclass | 13 +++++++++++++
 1 file changed, 13 insertions(+)