如何停止执行使用HTTPClient创建的请求

How to stop perform request for example with audio or video stream by some condition like callback or similar like it doing in cURL?

I believe what you are looking for is the context package. There is a good blog article on golang.org explaining how to use it here.

The gist of it is, you create a context object, and pass it to your goroutine that is performing streaming. In your caller goroutine you can cancel the context or set a timeout. In the streaming goroutine you have to check for context.Done() and act accordingly.

If the action is actually an http request that you want to cancel, you can do it at the transport level (when you get a message on context.Done())