Issue 1:
Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go 1.6.1

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"

GOBIN=""

GOEXE=""

GOHOSTARCH="amd64"

GOHOSTOS="darwin"

GOOS="darwin"

GOPATH="/Users/bo/GOPATH"

GORACE=""

GOROOT="/usr/local/go"

GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"

GO15VENDOREXPERIMENT="1"

CC="clang"

GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common"

CXX="clang++"

CGO_ENABLED="1"

What did you do?

init go mobile development environment

my xcode version is 6.4

What did you expect to see?

go mobile tool chain installed successfully

What did you see instead?

data:~ bo$ gomobile init

gomobile: go install -p=8 golang.org/x/mobile/app failed: exit status 2

golang.org/x/mobile/app

In file included from GOPATH/src/golang.org/x/mobile/app/darwin_amd64.go:16:

In file included from /System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:29:

In file included from /System/Library/Frameworks/Carbon.framework/Frameworks/HIToolbox.framework/Headers/HIToolbox.h:240:

In file included from /System/Library/Frameworks/Carbon.framework/Frameworks/HIToolbox.framework/Headers/IMKInputSession.h:23:

In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10:

In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:6:

/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:7:15: error: expected ';' after @Class

@Class NSArray;

^

/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:7:16: error: cannot find protocol declaration for 'ObjectType'

@Class NSArray;

^

/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:34:25: error: cannot find protocol declaration for 'ObjectType'

@interface NSEnumerator : NSObject

^

/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:34:37: error: expected identifier or '('

@interface NSEnumerator : NSObject

^

/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:36:13: error: expected ')'

(nullable ObjectType)nextObject;

^

/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:36:3: note: to match this '('

(nullable ObjectType)nextObject;

^

/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:40:25: error: cannot find protocol declaration for 'ObjectType'

@interface NSEnumerator (NSExtendedEnumerator)

^

/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:40:1: error: duplicate interface definition for class 'NSEnumerator'

@interface NSEnumerator (NSExtendedEnumerator)

^

/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:34:12: note: previous definition is here

@interface NSEnumerator : NSObject

^

/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:40:37: error: method type specifier must start with '-' or '+'

@interface NSEnumerator (NSExtendedEnumerator)

^

/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:40:38: error: expected a type

@interface NSEnumerator (NSExtendedEnumerator)

^

/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:42:1: error: expected selector for Objective-C method

@Property (readonly, copy) NSArray *allObjects;

^

/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:42:36: error: cannot find protocol declaration for 'ObjectType'

@Property (readonly, copy) NSArray *allObjects;

^

In file included from GOPATH/src/golang.org/x/mobile/app/darwin_amd64.go:16:

In file included from /System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:29:

In file included from /System/Library/Frameworks/Carbon.framework/Frameworks/HIToolbox.framework/Headers/HIToolbox.h:240:

In file included from /System/Library/Frameworks/Carbon.framework/Frameworks/HIToolbox.framework/Headers/IMKInputSession.h:23:

In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10:

/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:16:32: error: cannot find protocol declaration for 'ObjectType'

@interface NSArray<__covariant ObjectType> : NSObject <NSCopying, NSMutableCopying, NSSecureCoding, NSFastEnumeration>

^

/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:16:44: error: expected identifier or '('

@interface NSArray<__covariant ObjectType> : NSObject <NSCopying, NSMutableCopying, NSSecureCoding, NSFastEnumeration>

^

/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:19:4: error: expected a type

(ObjectType)objectAtIndex:(NSUInteger)index;

^

/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:21:40: error: expected ')'

(instancetype)initWithObjects:(const ObjectType [])objects count:(NSUInteger)cnt NS_DESIGNATED_INITIALIZER;

^

/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:21:33: note: to match this '('

(instancetype)initWithObjects:(const ObjectType [])objects count:(NSUInteger)cnt NS_DESIGNATED_INITIALIZER;

^

/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:26:20: error: cannot find protocol declaration for 'ObjectType'

@interface NSArray (NSExtendedArray)

^

/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:26:1: error: duplicate interface definition for class 'NSArray'

@interface NSArray (NSExtendedArray)

^

/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:16:12: note: previous definition is here

@interface NSArray<__covariant ObjectType> : NSObject <NSCopying, NSMutableCopying, NSSecureCoding, NSFastEnumeration>

^

/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:26:32: error: method type specifier must start with '-' or '+'

@interface NSArray (NSExtendedArray)

^

/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:26:33: error: expected a type

@interface NSArray (NSExtendedArray)

^

/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:28:1: error: expected selector for Objective-C method

(NSArray *)arrayByAddingObject:(ObjectType)anObject;

^

/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:29:12: error: cannot find protocol declaration for 'ObjectType'

(NSArray *)arrayByAddingObjectsFromArray:(NSArray *)otherArray;

^

/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:29:65: error: cannot find protocol declaration for 'ObjectType'

(NSArray *)arrayByAddingObjectsFromArray:(NSArray *)otherArray;

^

/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:31:25: error: expected a type

(BOOL)containsObject:(ObjectType)anObject;

^

/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:35:13: error: expected ')'

(nullable ObjectType)firstObjectCommonWithArray:(NSArray *)otherArray;

^

/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:35:3: note: to match this '('

(nullable ObjectType)firstObjectCommonWithArray:(NSArray *)otherArray;

^

/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:35:60: error: cannot find protocol declaration for 'ObjectType'

(nullable ObjectType)firstObjectCommonWithArray:(NSArray *)otherArray;

^

/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:36:21: error: expected a type

(void)getObjects:(ObjectType __unsafe_unretained [])objects range:(NSRange)range;

^

/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:37:30: error: expected a type

(NSUInteger)indexOfObject:(ObjectType)anObject;

^

/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:38:30: error: expected a type

(NSUInteger)indexOfObject:(ObjectType)anObject inRange:(NSRange)range;

^

/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:39:41: error: expected a type

(NSUInteger)indexOfObjectIdenticalTo:(ObjectType)anObject;

^

/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:40:41: error: expected a type

(NSUInteger)indexOfObjectIdenticalTo:(ObjectType)anObject inRange:(NSRange)range;

^

/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:41:33: error: cannot find protocol declaration for 'ObjectType'

(BOOL)isEqualToArray:(NSArray *)otherArray;

^

/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:42:43: error: unknown type name 'ObjectType'

@Property (nullable, nonatomic, readonly) ObjectType firstObject NS_AVAILABLE(10_6, 4_0);

^

/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:42:20: error: nullability specifier 'nullable' cannot be applied to non-pointer type 'int'

@Property (nullable, nonatomic, readonly) ObjectType firstObject NS_AVAILABLE(10_6, 4_0);

^

/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:43:43: error: unknown type name 'ObjectType'

@Property (nullable, nonatomic, readonly) ObjectType lastObject;

^

/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:43:20: error: nullability specifier 'nullable' cannot be applied to non-pointer type 'int'

@Property (nullable, nonatomic, readonly) ObjectType lastObject;

^

/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:44:17: error: cannot find protocol declaration for 'ObjectType'

(NSEnumerator *)objectEnumerator;

^

/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:45:17: error: cannot find protocol declaration for 'ObjectType'

(NSEnumerator *)reverseObjectEnumerator;

Issue 2:
by islandberry23:

I am filing this issue as requested at
https://groups.google.com/forum/#!topic/golang-nuts/8D_tno7WxaY

The transferWriter decides if it should write the content-length header at:
https://code.google.com/p/go/source/browse/src/pkg/net/http/transfer.go?name=release&;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.