<p dir="auto">Please answer these questions before submitting your issue. Thanks!</p>
<ol dir="auto">
<li>
<p dir="auto">What version of Go are you using (<code class="notranslate">go version</code>)?<br>
go 1.6.1</p>
</li>
<li>
<p dir="auto">What operating system and processor architecture are you using (<code class="notranslate">go env</code>)?<br>
GOARCH="amd64"<br>
GOBIN=""<br>
GOEXE=""<br>
GOHOSTARCH="amd64"<br>
GOHOSTOS="darwin"<br>
GOOS="darwin"<br>
GOPATH="/Users/bo/GOPATH"<br>
GORACE=""<br>
GOROOT="/usr/local/go"<br>
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"<br>
GO15VENDOREXPERIMENT="1"<br>
CC="clang"<br>
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common"<br>
CXX="clang++"<br>
CGO_ENABLED="1"</p>
</li>
<li>
<p dir="auto">What did you do?<br>
init go mobile development environment<br>
my xcode version is 6.4</p>
</li>
<li>
<p dir="auto">What did you expect to see?<br>
go mobile tool chain installed successfully</p>
</li>
<li>
<p dir="auto">What did you see instead?<br>
data:~ bo$ gomobile init<br>
gomobile: go install -p=8 golang.org/x/mobile/app failed: exit status 2</p>
<h1 dir="auto">golang.org/x/mobile/app</h1>
<p dir="auto">In file included from GOPATH/src/golang.org/x/mobile/app/darwin_amd64.go:16:<br>
In file included from /System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:29:<br>
In file included from /System/Library/Frameworks/Carbon.framework/Frameworks/HIToolbox.framework/Headers/HIToolbox.h:240:<br>
In file included from /System/Library/Frameworks/Carbon.framework/Frameworks/HIToolbox.framework/Headers/IMKInputSession.h:23:<br>
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10:<br>
In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:6:<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:7:15: error: expected ';' after <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Class/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Class">@Class</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Class/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Class">@Class</a> NSArray;<br>
^<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:7:16: error: cannot find protocol declaration for 'ObjectType'<br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Class/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Class">@Class</a> NSArray;<br>
^<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:34:25: error: cannot find protocol declaration for 'ObjectType'<br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/interface/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/interface">@interface</a> NSEnumerator : NSObject <br>
^<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:34:37: error: expected identifier or '('<br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/interface/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/interface">@interface</a> NSEnumerator : NSObject <br>
^<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:36:13: error: expected ')'</p>
</li>
<li>
<p dir="auto">(nullable ObjectType)nextObject;<br>
^<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:36:3: note: to match this '('</p>
</li>
<li>
<p dir="auto">(nullable ObjectType)nextObject;<br>
^<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:40:25: error: cannot find protocol declaration for 'ObjectType'<br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/interface/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/interface">@interface</a> NSEnumerator (NSExtendedEnumerator)<br>
^<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:40:1: error: duplicate interface definition for class 'NSEnumerator'<br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/interface/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/interface">@interface</a> NSEnumerator (NSExtendedEnumerator)<br>
^<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:34:12: note: previous definition is here<br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/interface/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/interface">@interface</a> NSEnumerator : NSObject <br>
^<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:40:37: error: method type specifier must start with '-' or '+'<br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/interface/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/interface">@interface</a> NSEnumerator (NSExtendedEnumerator)<br>
^<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:40:38: error: expected a type<br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/interface/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/interface">@interface</a> NSEnumerator (NSExtendedEnumerator)<br>
^<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:42:1: error: expected selector for Objective-C method<br>
<a class="user-mention notranslate" data-hovercard-type="organization" data-hovercard-url="/orgs/Property/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Property">@Property</a> (readonly, copy) NSArray *allObjects;<br>
^<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:42:36: error: cannot find protocol declaration for 'ObjectType'<br>
<a class="user-mention notranslate" data-hovercard-type="organization" data-hovercard-url="/orgs/Property/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Property">@Property</a> (readonly, copy) NSArray *allObjects;<br>
^<br>
In file included from GOPATH/src/golang.org/x/mobile/app/darwin_amd64.go:16:<br>
In file included from /System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:29:<br>
In file included from /System/Library/Frameworks/Carbon.framework/Frameworks/HIToolbox.framework/Headers/HIToolbox.h:240:<br>
In file included from /System/Library/Frameworks/Carbon.framework/Frameworks/HIToolbox.framework/Headers/IMKInputSession.h:23:<br>
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10:<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:16:32: error: cannot find protocol declaration for 'ObjectType'<br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/interface/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/interface">@interface</a> NSArray&lt;__covariant ObjectType&gt; : NSObject &lt;NSCopying, NSMutableCopying, NSSecureCoding, NSFastEnumeration&gt;<br>
^<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:16:44: error: expected identifier or '('<br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/interface/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/interface">@interface</a> NSArray&lt;__covariant ObjectType&gt; : NSObject &lt;NSCopying, NSMutableCopying, NSSecureCoding, NSFastEnumeration&gt;<br>
^<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:19:4: error: expected a type</p>
</li>
<li>
<p dir="auto">(ObjectType)objectAtIndex:(NSUInteger)index;<br>
^<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:21:40: error: expected ')'</p>
</li>
<li>
<p dir="auto">(instancetype)initWithObjects:(const ObjectType [])objects count:(NSUInteger)cnt NS_DESIGNATED_INITIALIZER;<br>
^<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:21:33: note: to match this '('</p>
</li>
<li>
<p dir="auto">(instancetype)initWithObjects:(const ObjectType [])objects count:(NSUInteger)cnt NS_DESIGNATED_INITIALIZER;<br>
^<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:26:20: error: cannot find protocol declaration for 'ObjectType'<br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/interface/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/interface">@interface</a> NSArray (NSExtendedArray)<br>
^<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:26:1: error: duplicate interface definition for class 'NSArray'<br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/interface/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/interface">@interface</a> NSArray (NSExtendedArray)<br>
^<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:16:12: note: previous definition is here<br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/interface/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/interface">@interface</a> NSArray&lt;__covariant ObjectType&gt; : NSObject &lt;NSCopying, NSMutableCopying, NSSecureCoding, NSFastEnumeration&gt;<br>
^<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:26:32: error: method type specifier must start with '-' or '+'<br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/interface/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/interface">@interface</a> NSArray (NSExtendedArray)<br>
^<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:26:33: error: expected a type<br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/interface/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/interface">@interface</a> NSArray (NSExtendedArray)<br>
^<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:28:1: error: expected selector for Objective-C method</p>
</li>
<li>
<p dir="auto">(NSArray *)arrayByAddingObject:(ObjectType)anObject;<br>
^<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:29:12: error: cannot find protocol declaration for 'ObjectType'</p>
</li>
<li>
<p dir="auto">(NSArray *)arrayByAddingObjectsFromArray:(NSArray *)otherArray;<br>
^<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:29:65: error: cannot find protocol declaration for 'ObjectType'</p>
</li>
<li>
<p dir="auto">(NSArray *)arrayByAddingObjectsFromArray:(NSArray *)otherArray;<br>
^<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:31:25: error: expected a type</p>
</li>
<li>
<p dir="auto">(BOOL)containsObject:(ObjectType)anObject;<br>
^<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:35:13: error: expected ')'</p>
</li>
<li>
<p dir="auto">(nullable ObjectType)firstObjectCommonWithArray:(NSArray *)otherArray;<br>
^<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:35:3: note: to match this '('</p>
</li>
<li>
<p dir="auto">(nullable ObjectType)firstObjectCommonWithArray:(NSArray *)otherArray;<br>
^<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:35:60: error: cannot find protocol declaration for 'ObjectType'</p>
</li>
<li>
<p dir="auto">(nullable ObjectType)firstObjectCommonWithArray:(NSArray *)otherArray;<br>
^<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:36:21: error: expected a type</p>
</li>
<li>
<p dir="auto">(void)getObjects:(ObjectType __unsafe_unretained [])objects range:(NSRange)range;<br>
^<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:37:30: error: expected a type</p>
</li>
<li>
<p dir="auto">(NSUInteger)indexOfObject:(ObjectType)anObject;<br>
^<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:38:30: error: expected a type</p>
</li>
<li>
<p dir="auto">(NSUInteger)indexOfObject:(ObjectType)anObject inRange:(NSRange)range;<br>
^<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:39:41: error: expected a type</p>
</li>
<li>
<p dir="auto">(NSUInteger)indexOfObjectIdenticalTo:(ObjectType)anObject;<br>
^<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:40:41: error: expected a type</p>
</li>
<li>
<p dir="auto">(NSUInteger)indexOfObjectIdenticalTo:(ObjectType)anObject inRange:(NSRange)range;<br>
^<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:41:33: error: cannot find protocol declaration for 'ObjectType'</p>
</li>
<li>
<p dir="auto">(BOOL)isEqualToArray:(NSArray *)otherArray;<br>
^<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:42:43: error: unknown type name 'ObjectType'<br>
<a class="user-mention notranslate" data-hovercard-type="organization" data-hovercard-url="/orgs/Property/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Property">@Property</a> (nullable, nonatomic, readonly) ObjectType firstObject NS_AVAILABLE(10_6, 4_0);<br>
^<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:42:20: error: nullability specifier 'nullable' cannot be applied to non-pointer type 'int'<br>
<a class="user-mention notranslate" data-hovercard-type="organization" data-hovercard-url="/orgs/Property/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Property">@Property</a> (nullable, nonatomic, readonly) ObjectType firstObject NS_AVAILABLE(10_6, 4_0);<br>
^<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:43:43: error: unknown type name 'ObjectType'<br>
<a class="user-mention notranslate" data-hovercard-type="organization" data-hovercard-url="/orgs/Property/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Property">@Property</a> (nullable, nonatomic, readonly) ObjectType lastObject;<br>
^<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:43:20: error: nullability specifier 'nullable' cannot be applied to non-pointer type 'int'<br>
<a class="user-mention notranslate" data-hovercard-type="organization" data-hovercard-url="/orgs/Property/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Property">@Property</a> (nullable, nonatomic, readonly) ObjectType lastObject;<br>
^<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:44:17: error: cannot find protocol declaration for 'ObjectType'</p>
</li>
<li>
<p dir="auto">(NSEnumerator *)objectEnumerator;<br>
^<br>
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:45:17: error: cannot find protocol declaration for 'ObjectType'</p>
</li>
<li>
<p dir="auto">(NSEnumerator *)reverseObjectEnumerator;</p>
</li>
</ol>
<p dir="auto">by <strong>islandberry23</strong>:</p>
<pre class="notranslate">I am filing this issue as requested at
<a href="https://groups.google.com/forum/#" rel="nofollow">https://groups.google.com/forum/#</a>!topic/golang-nuts/8D_tno7WxaY

The transferWriter decides if it should write the content-length header at:
<a href="https://code.google.com/p/go/source/browse/src/pkg/net/http/transfer.go?name=release&amp;" rel="nofollow">https://code.google.com/p/go/source/browse/src/pkg/net/http/transfer.go?name=release&amp;</a>;r=63dcf9ca33a74dec605f6156393d719150ad6e2e#116

This function returns false for a Content-Length: 0 response unless the transfer
encoding is explicitly set to identity.  

If a response has a content length header and the transfer encoding is not explicitly
set to chunked, then the content length header should be written to the output. This is
true even of the content length is zero. Zero is a valid response body size.</pre>