-
Notifications
You must be signed in to change notification settings - Fork 296
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
codecgen: Use build tags to determine whether vendoring is enabled or…
… not. Defaults genCheckVendor to false. For 1.5 and 1.6, set genCheckVendor appropriately using the environmental variable GO15VENDOREXPERIMENT. Also, support "interface {}" as synonym for "interface{}" to accomodate some changes seen in tip. Fixes #147
- Loading branch information
Showing
3 changed files
with
27 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. | ||
// Use of this source code is governed by a MIT license found in the LICENSE file. | ||
|
||
// +build go1.5,!go1.6 | ||
|
||
package codec | ||
|
||
import "os" | ||
|
||
func init() { | ||
genCheckVendor = os.Getenv("GO15VENDOREXPERIMENT") == "1" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. | ||
// Use of this source code is governed by a MIT license found in the LICENSE file. | ||
|
||
// +build go1.6 | ||
|
||
package codec | ||
|
||
import "os" | ||
|
||
func init() { | ||
genCheckVendor = os.Getenv("GO15VENDOREXPERIMENT") != "0" | ||
} |