Skip to content

Instantly share code, notes, and snippets.

@zhangwebb
zhangwebb / gist:f9b81cf3c79891618cf921a813f1b389
Created March 11, 2017 11:40 — forked from yangyuqian/gist:7158b4ff25524c3de6dde978a45bd882
Go Vendoring源码阅读笔记与用法分析

为什么引入Vendoring机制?

Go1.5之后有一些比较重要的改动,其中包含Vendoring的支持,本文从使用和源码实现整理了一些备忘录,难免有疏漏,各位看官多指教。

没有引入Vendoring机制时,Go项目组织主要有两种方案:

  • 直接把项目放到GOPATH下面[详见: 附录1]
  • 项目放到GOPATH外,修改GOPATH来使用Go Command[详见: 附录2]

第三方依赖管理的灵活性和便捷性要求Go加入一种新机制,在不打破现有GOPATH假设的情况下,扩展GOPATH的package查找能力,这就是本文中介绍的Vendoring机制.

@zhangwebb
zhangwebb / index.ios.js
Created March 28, 2016 05:12 — forked from Jpoliachik/index.ios.js
ReactNative LayoutAnimation Example
'use strict';
import React, {
AppRegistry,
Component,
StyleSheet,
Text,
View,
TouchableOpacity,
LayoutAnimation,
} from 'react-native';