<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>FAQ on Producthunt daily</title>
        <link>https://producthunt.programnotes.cn/en/tags/faq/</link>
        <description>Recent content in FAQ on Producthunt daily</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en</language>
        <lastBuildDate>Sun, 14 Sep 2025 15:24:41 +0800</lastBuildDate><atom:link href="https://producthunt.programnotes.cn/en/tags/faq/index.xml" rel="self" type="application/rss+xml" /><item>
        <title>grpc-go</title>
        <link>https://producthunt.programnotes.cn/en/p/grpc-go/</link>
        <pubDate>Sun, 14 Sep 2025 15:24:41 +0800</pubDate>
        
        <guid>https://producthunt.programnotes.cn/en/p/grpc-go/</guid>
        <description>&lt;img src="https://images.unsplash.com/photo-1748717111733-272c531d716d?ixid=M3w0NjAwMjJ8MHwxfHJhbmRvbXx8fHx8fHx8fDE3NTc4MzQ2NTB8&amp;ixlib=rb-4.1.0" alt="Featured image of post grpc-go" /&gt;&lt;h1 id=&#34;grpcgrpc-go&#34;&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/grpc/grpc-go&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;grpc/grpc-go&lt;/a&gt;
&lt;/h1&gt;&lt;h1 id=&#34;grpc-go&#34;&gt;gRPC-Go
&lt;/h1&gt;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://pkg.go.dev/google.golang.org/grpc&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;&lt;img src=&#34;https://pkg.go.dev/badge/google.golang.org/grpc&#34;
	
	
	
	loading=&#34;lazy&#34;
	
		alt=&#34;GoDoc&#34;
	
	
&gt;&lt;/a&gt;
&lt;a class=&#34;link&#34; href=&#34;https://goreportcard.com/report/github.com/grpc/grpc-go&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;&lt;img src=&#34;https://goreportcard.com/badge/grpc/grpc-go&#34;
	
	
	
	loading=&#34;lazy&#34;
	
		alt=&#34;GoReportCard&#34;
	
	
&gt;&lt;/a&gt;
&lt;a class=&#34;link&#34; href=&#34;https://codecov.io/gh/grpc/grpc-go&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;&lt;img src=&#34;https://codecov.io/gh/grpc/grpc-go/graph/badge.svg&#34;
	
	
	
	loading=&#34;lazy&#34;
	
		alt=&#34;codecov&#34;
	
	
&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The &lt;a class=&#34;link&#34; href=&#34;https://golang.org&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Go&lt;/a&gt; implementation of &lt;a class=&#34;link&#34; href=&#34;https://grpc.io&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;gRPC&lt;/a&gt;: A high performance, open source, general
RPC framework that puts mobile and HTTP/2 first. For more information see the
&lt;a class=&#34;link&#34; href=&#34;https://grpc.io/docs/languages/go&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Go gRPC docs&lt;/a&gt;, or jump directly into the &lt;a class=&#34;link&#34; href=&#34;https://grpc.io/docs/languages/go/quickstart&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;quick start&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;prerequisites&#34;&gt;Prerequisites
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;a class=&#34;link&#34; href=&#34;https://golang.org&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Go&lt;/a&gt;&lt;/strong&gt;: any one of the &lt;strong&gt;two latest major&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://golang.org/doc/devel/release.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;releases&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;installation&#34;&gt;Installation
&lt;/h2&gt;&lt;p&gt;Simply add the following import to your code, and then &lt;code&gt;go [build|run|test]&lt;/code&gt;
will automatically fetch the necessary dependencies:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-go&#34; data-lang=&#34;go&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;google.golang.org/grpc&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; If you are trying to access &lt;code&gt;grpc-go&lt;/code&gt; from &lt;strong&gt;China&lt;/strong&gt;, see the
&lt;a class=&#34;link&#34; href=&#34;#FAQ&#34; &gt;FAQ&lt;/a&gt; below.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&#34;learn-more&#34;&gt;Learn more
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://grpc.io/docs/languages/go&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Go gRPC docs&lt;/a&gt;, which include a &lt;a class=&#34;link&#34; href=&#34;https://grpc.io/docs/languages/go/quickstart&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;quick start&lt;/a&gt; and &lt;a class=&#34;link&#34; href=&#34;https://pkg.go.dev/google.golang.org/grpc&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;API
reference&lt;/a&gt; among other resources&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;Documentation&#34; &gt;Low-level technical docs&lt;/a&gt; from this repository&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://performance-dot-grpc-testing.appspot.com/explore?dashboard=5180705743044608&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Performance benchmark&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;examples&#34; &gt;Examples&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;CONTRIBUTING.md&#34; &gt;Contribution guidelines&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;faq&#34;&gt;FAQ
&lt;/h2&gt;&lt;h3 id=&#34;io-timeout-errors&#34;&gt;I/O Timeout Errors
&lt;/h3&gt;&lt;p&gt;The &lt;code&gt;golang.org&lt;/code&gt; domain may be blocked from some countries. &lt;code&gt;go get&lt;/code&gt; usually
produces an error like the following when this happens:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;gp&#34;&gt;$&lt;/span&gt; go get -u google.golang.org/grpc
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;package google.golang.org/grpc: unrecognized import path &amp;#34;google.golang.org/grpc&amp;#34; (https fetch: Get https://google.golang.org/grpc?go-get=1: dial tcp 216.239.37.1:443: i/o timeout)
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;To build Go code, there are several options:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Set up a VPN and access google.golang.org through that.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;With Go module support: it is possible to use the &lt;code&gt;replace&lt;/code&gt; feature of &lt;code&gt;go mod&lt;/code&gt; to create aliases for golang.org packages.  In your project&amp;rsquo;s directory:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;go mod edit -replace&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;google.golang.org/grpc&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;github.com/grpc/grpc-go@latest
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;go mod tidy
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;go mod vendor
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;go build -mod&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;vendor
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Again, this will need to be done for all transitive dependencies hosted on
golang.org as well. For details, refer to &lt;a class=&#34;link&#34; href=&#34;https://github.com/golang/go/issues/28652&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;golang/go issue
#28652&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;compiling-error-undefined-grpcsupportpackageisversion&#34;&gt;Compiling error, undefined: grpc.SupportPackageIsVersion
&lt;/h3&gt;&lt;p&gt;Please update to the latest version of gRPC-Go using
&lt;code&gt;go get google.golang.org/grpc&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;how-to-turn-on-logging&#34;&gt;How to turn on logging
&lt;/h3&gt;&lt;p&gt;The default logger is controlled by environment variables. Turn everything on
like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;gp&#34;&gt;$&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;export&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;GRPC_GO_LOG_VERBOSITY_LEVEL&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;99&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;gp&#34;&gt;$&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;export&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;GRPC_GO_LOG_SEVERITY_LEVEL&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;info
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id=&#34;the-rpc-failed-with-error-code--unavailable-desc--transport-is-closing&#34;&gt;The RPC failed with error &lt;code&gt;&amp;quot;code = Unavailable desc = transport is closing&amp;quot;&lt;/code&gt;
&lt;/h3&gt;&lt;p&gt;This error means the connection the RPC is using was closed, and there are many
possible reasons, including:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;mis-configured transport credentials, connection failed on handshaking&lt;/li&gt;
&lt;li&gt;bytes disrupted, possibly by a proxy in between&lt;/li&gt;
&lt;li&gt;server shutdown&lt;/li&gt;
&lt;li&gt;Keepalive parameters caused connection shutdown, for example if you have
configured your server to terminate connections regularly to &lt;a class=&#34;link&#34; href=&#34;https://github.com/grpc/grpc-go/issues/3170#issuecomment-552517779&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;trigger DNS
lookups&lt;/a&gt;.
If this is the case, you may want to increase your
&lt;a class=&#34;link&#34; href=&#34;https://pkg.go.dev/google.golang.org/grpc/keepalive?tab=doc#ServerParameters&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;MaxConnectionAgeGrace&lt;/a&gt;,
to allow longer RPC calls to finish.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;It can be tricky to debug this because the error happens on the client side but
the root cause of the connection being closed is on the server side. Turn on
logging on &lt;strong&gt;both client and server&lt;/strong&gt;, and see if there are any transport
errors.&lt;/p&gt;
</description>
        </item>
        
    </channel>
</rss>
