Our website uses cookies to enhance your browsing experience.
Accept
to the top
>
>
>
V8032. The return value of the...
menu mobile close menu
Additional information
toggle menu Contents

V8032. The return value of the function is required to be used.

Jun 22 2026

The analyzer has detected a method or function call whose return value is not used. Calling certain methods does not make sense without using their return values.

Look at the example:

req, err := http.NewRequest(....)
....
req.WithContext(ctx)

In this code, the WithContext method is called from the req variable of the http.Request type. This method returns a copy of the request with a modified context. So, calling WithContext without saving the http.Request returned by the method makes no sense.

The fixed code:

req, err := http.NewRequest(....)
....
req = req.WithContext(ctx)