--
官网: http://golang-china.org/
IRC: irc.freenode.net #golang-china
@golangchina
>
> 在 2012年5月22日 上午9:43,lake liu <liujian...@gmail.com>写道:
>
>> 我也只写了个hello world. 而且我自己绑定的域名好像不起作用。
>> 我是基于windowns 平台的,用Python来上传
>>
>>
>> 2012/5/21 南海 <viney...@gmail.com>
>>>
>>> hello world算不算?
>>>
>>>
>>> 2012/5/18 Alex Xu <justa...@googlemail.com>
>>>>
>>>> my sample fyi
>>>> http://blog.sina.com.cn/s/blog_5385acc20100xvjv.html
>>>>
>>>>
>>>>
>>>> _Joe_
>>>> 网络回复已停用
>>>>
>>>> --
>>>> 官网: http://golang-china.org/
>>>> IRC: irc.freenode.net #golang-china
>>>> @golangchina
>>>
>>>
>>> --
>>> 官网: http://golang-china.org/
>>> IRC: irc.freenode.net #golang-china
>>> @golangchina
>>
>>
>>
>>
>> --
>> Lake.Liu
>>
>> --
>> 官网: http://golang-china.org/
>> IRC: irc.freenode.net #golang-china
>> @golangchina
>
>
> --
> 官网: http://golang-china.org/
> IRC: irc.freenode.net #golang-china
> @golangchina
--
人生苦短, Pythonic! 冗余不做,日子甭过!备份不做,十恶不赦!
俺: http://about.me/zoom.quiet
文字协议: http://creativecommons.org/licenses/by-sa/2.5/cn/
P, P will
be initialized only once.在一个包中,包级变量或常量值会根据数据依赖的顺序初始化或决定:若A的初始化器依赖于B的值,则A将在B之后设置。若这种依赖形成一个循环, 则会产生一个错误。依赖分析根据词法完成:若A的值涉及到B, 或包含一个初始化器涉及到B的值,或递归地涉及一个涉及到B的函数,则A依赖于B。若两项并不互相依赖,它们将按照其出现在源里的顺序初始化。 在按包的依赖分析结束后,若A的初始化器调用另一个引用了B的包中定义的函数,它会产生不确定的结果。
If a package has imports, the imported packages are initialized before initializing the package itself. If multiple packages import a packageP,Pwill be initialized only once.
The importing of packages, by construction, guarantees that there can be no cyclic dependencies in initialization.
假设package A导入了package B, 则B在A之前初始化. 如果package B也导入了package A, 则A在B前初始化...
为什么go_spec中指出package初始化过程中不会出现循环依赖? 就算真的不会出现循环依赖, 那么package A和B到底哪个先进行初始化?
If a package has imports, the imported packages are initialized before initializing the package itself. If multiple packages import a packageP,Pwill be initialized only once.
The importing of packages, by construction, guarantees that there can be no cyclic dependencies in initialization.
假设package A导入了package B, 则B在A之前初始化. 如果package B也导入了package A, 则A在B前初始化...
为什么go_spec中指出package初始化过程中不会出现循环依赖? 就算真的不会出现循环依赖, 那么package A和B到底哪个先进行初始化?
�ҷ��������������ʵ��, ��Ϊ�����package A������package B, �����package A��ʱ��package B�����Ѿ��������. ����A��B֮�以����������������ܷ���. ��������go_spec��ԭ��:
The importing of packages, by construction, guarantees that there can be no cyclic dependencies in initialization.
�������, ��л@Oling Cat�Ļظ��ˡ�
--Hello! This is Oling Cat!
--
����: http://golang-china.org/
IRC: irc.freenode.net #golang-china
@golangchina
package (
a
b
c
)
这时先导入a,然后解析a,发现需要b, 导入b,解析b,导入c,这个时候c依赖a,但a己结导入,所以没有任何问题的;
另一种解析方法是直接导入a,b,c然后依次解析并导入,但不管怎么样都不会循环
�Ҹо��ǿ��Ե�.����:��һ���汾, abc����, �����װ��gopath.�ڶ����汾, a����b, ���±��밲װa.������汾, b����c, ���±��밲װb...
��ѭ������û���κ����Ⱑ.
��Ϊ��a����b,b����c,c����aʱ,ʵ���ϻ����������,
package (
a
b
c
)
��ʱ�ȵ���a,Ȼ�����a,������Ҫb, ����b,����b,����c,���ʱ��c����a,��a���ᵼ��,����û���κ������;
��һ�ֽ���������ֱ�ӵ���a,b,cȻ�����ν���������,��������ô����ѭ��
û��������ɶ��˼��a����b��b����c��c����a��ʱ�����벻�˵ġ���Ϊgo tool����topology sort����ȡ�����˳���κ�ѭ��������û�취ͨ��go tool�ļ��ġ��������ֹ�����Ҳ���У�ǰ���Ѿ�����˵�ˣ�gc����һ�����ʱ��Ҫ��ȡ�����������İ�ı�����
--
����: http://golang-china.org/
IRC: irc.freenode.net #golang-china
@golangchina
1。这怎么吃
2。干嘛要吃
3。这回去哪吃
fango
最近在看monnand 开源的uniqush项目.
monnand的push包由很多源文件组成, 我看到一个function或者package level的变量/常量的时候, 总是不知道怎样快速定位到定义的地方. 如此下来, 感觉思路总是被打断, 非常的不顺利.
各位大大有什么好的方法?
最近在看monnand 开源的uniqush项目.
monnand的push包由很多源文件组成, 我看到一个function或者package level的变量/常量的时候, 总是不知道怎样快速定位到定义的地方. 如此下来, 感觉思路总是被打断, 非常的不顺利.
各位大大有什么好的方法?