标签 Linux 下的文章

Unix Shell Scripting之'扫盲篇'

俗话说:"工欲善其事,必先利其器"。在Unix/Linux上做开发,这里的’器’也同样包括Unix Shell Script,遗憾亚,虽然自己在Unix上开发已经快2年了,但是对Unix Shell Script可以说是’Script盲’一个,很多稍微复杂些的Script自己根本都看不懂。其实这也是自己栽下的’苦果’,因为以前我一直’歧视’Script language,认为那不是真正程序员该精通的,所以也就没有认真钻研过。目前认识到了解一定的Script技术,可以很大程度提高自己的工作效率,有些小工具用Script实现方便极了。这里’扫盲’一是给自己’扫盲’,二是把这些基础的Script技术和那些对和我一样对Script不熟悉的人一起分享。这篇中的所涉及的Shell语法均为符合POSIX标准的语法,可能很多Shell不能与该语法完全相吻合。自己感觉Bash与POSIX Shell语法最为接近。

首先我们要知道Script Language属于’解释型’语言,其性能要逊于像C、C++这类的编译型语言。但是Script Language由于站在更高的层次,它编写相对简单,编写效率要高于编译型语言,用它来做一些系统管理和辅助性的工作绰绰有余。还有一点值得注意的是Shell script已经被标准化,这就意味着其可移植性相对较好,基本上是’Write Once, Run Everywhere’!

当你打开一个后缀为.sh的文件时,在文件的第一行一般有这样格式的字符串"#!usr/bin/xx",这种script文件叫’Self-Contained Script’,也就是说它可以像可执行程序那样被执行而不用你输入额外的字符,比如有这样的一个简单的’Self-Contained Script’:
/* helloworld.sh */
#! /usr/bin/bash
echo "hello world"
我们编辑完后,再赋予helloworld.sh可执行权限属性,这样我们就可以在命令行上敲入’helloworld’,’hello world’就输出到屏幕上了,更准确的说是标准输出上^_^。

Shell Script实际上是一组’命令’序列,它支持三种基本的命令:
内置命令 — 像cd、read、echo、printf等shell自己使用的一些命令;
Shell函数 — 用Shell Language写的函数,调用方式与外部命令相同;
外部命令 — Shell通过创建一个新的进程来运行这个命令,典型的’spawn’模式 — ‘fork + exec’.

既然Shell Script被称为一门语言,那么它也自然也不例外的拥有变量和相关的控制语句,我们逐一来学习一下。

[Shell变量]
1、定义变量:例如YOUR_VAR1=this_is_my_first_shell_var、YOUR_VAR2="this is my first shell var",对于变量值中间含有空格的,就按照YOUR_VAR2的定义方式,用双引号括上即可。注意在’='两边不允许有空格,否则会解释出错。
2、引用变量:例如echo $YOUR_VAR1、printf "${YOUR_VAR1} ${YOUR_VAR2}\n"、MY_VAR1=$YOUR_VAR1。在引用变量时最好用’{}’将你的变量括起来,否则当Shell解释器遇到这样的语句echo $YOUR_VAR1is,它就不认识了,修改成echo ${YOUR_VAR1}is后,则一切正常了。

[Shell环境变量]
每种Shell都有自己的环境变量,这些变量被该Shell下执行的程序所继承和共享,那我们如何定义环境变量呢?使用export命令。
export varname=value
或者
varname=value
export varname

例如:
/* 在环境变量文件中, Bash中为.bashrc,C Shell中为.cshrc */
hours_per_day=24
seconds_per_hour=3600
export hours_per_day
export seconds_per_hour

这样我们在命令行上敲入echo $hours_per_day后,我们就可以看到24输出在标准输出上了。

[条件分支判断]
Shell条件判断的语句格式:
if condition1
then
 statement1
 statement2
 ……….
elif condition2
then
 statement3
 statement4
 ……..   
else
 statement5
 ……..
fi

Shell Script支持多种判断condition的方法,如果在condition处是一个command, 那么如果该command执行成功,其退出状态(exit status)为0,否则为不等于0的值。当你既要获取command退出状态,而又不想要该command的输出时,有一个常用的技巧,那就是使用’/dev/null’文件设备。熟悉Unix编程的人都知道’/dev/null’文件的作用,这里不多说。看下面的例子:
#! /usr/bin/bash
if ls -l|grep myfile > /dev/null
then
        echo "myfile exists"
else
        echo "myfile doesn’t exist"
fi

在condition处我们大多数情况下都会利用test命令来判断condition,test命令有两种使用方式:
test operand1 operator operand2
或者是
[ operand1 operator operand2 ](省略test)

我们举例说明:

X=3
Y=6
if [ ${X} -lt ${Y} ]
then
        echo "${X} < ${Y}"
else
        echo "${X} > ${Y}"
fi

if test ${X} -lt ${Y}
then
        echo "${X} < ${Y}"
else
        echo "${X} > ${Y}"
fi

test命令提供的operator很是丰富,其中一目operator包括:
-n — operand non zero length
-z — operand has zero length
-d — there exists a directory whose name is operand
-f — there exists a file whose name is operand
二目operator包括:
-eq — the operands are integers and they are equal
-neq — the opposite of -eq
= — the operands are equal (as strings)
!= — opposite of =
-lt — operand1 is strictly less than operand2 (both operands should be integers)
-gt — operand1 is strictly greater than operand2 (both operands should be integers)
-ge — operand1 is greater than or equal to operand2 (both operands should be integers)
-le — operand1 is less than or equal to operand2 (both operands should be integers)

[循环语句]
和C语言类似,Shell也支持for、do..while loop,而且还支持break、continue这样的跳转语句。有了上面的基础理解这两组语句就不难了,看看例子一切都明白了。
e.g.-1
X=0
while [ $X -le 20 ]
do
        echo $X
        X=$((X+1))
done

e.g.-2
colour1="red"
colour2="blue"
colour3="green"
for X in "$colour1" "$colour2" "$colour3"
do
        echo $X
done

e.g.-3
colour4="red blue green"
for Y in $colour4
do
        echo $Y
done

这里e.g.-2和e.g.-3的输出是一样的。

[Shell函数]
Shell函数的定义与C语言也类似,格式如下:
[function] name ()
{
 command-list;
}
Shell Function的使用和外部command一样,不同的是Shell Fucntion运行在Shell进程上下文中,Shell在执行Shell Function时不另外启动一个新的进程。在Shell Function内部,Shell Fucntion参数屏蔽了其Parent Script的参数,见下面的例子:
/* test.sh */
#! /usr/bin/bash
printarglist ()
{
        echo ${1}
        echo ${2}
}
printarglist ${1} upload

执行:test.sh go download
输出:go upload

以上是Shell Script的基本语法结构,权当给自己’扫盲’了,当然Shell Script编程又很多经验和技巧,这需要在以后不断的实践中慢慢摸索了。

GCC警告选项例解

程序员是追求完美的一族,即使是一般的程序员大多也都不想看到自己的程序中有甚至那么一点点的瑕疵。遇到任意一条编译器警告都坚决不放过。有人会说:我们可以使用比编译器更加严格的静态代码检查工具,如splint。这个建议也很不错。不过lint工具使用起来较繁琐,有时候还需要记住一些特定符号并插入到你自己的代码中才行,门槛较高,这也让很多人止步于此。那么我们就从此放弃么?不,如今的编译器做得都很好,它可以帮助我们的找到绝大多数可能出现问题的代码,前提是你要学会控制编译器去找到这些问题代码,而熟悉编译器的警告选项恰恰是体现控制力的好方法。当你可以自如控制编译器警告输出的时候,你就算是'入道'了,同时你对语言的理解也更进一步了。

有人说:我就是用一个-Wall选项就可以了,一般选手可以这么做,而且他可以不知道-Wall会跟踪哪些类型的问题;但是高级选手是不会只使用-Wall的,他会把每条警告都研究的很透彻,会在Makefile中列出他想让编译器输出哪些类型的警告以替代-Wall,他会屏蔽掉那些对他的代码'毫无用处'的警告(很可能他使用了编译器对语言的扩展功能),他会有个和编译器交流的过程。

俗话说:'工欲善其事,必先利其器',一直在工作中使用GNU C编译器(以下简称GCC),这里对GCC的一些警告选项细致的分析,并列举几个简单的例子[注1]供分析参考。

1. -Wall集合警告选项
我们平时可能大多数情况只使用-Wall编译警告选项,实际上-Wall选项是一系列警告编译选项的集合。下面逐一分析这一集合中的各个选项:

[-Wchar-subscripts]
如果数组使用char类型变量做为下标值的话,则发出警告。因为在某些平台上char可能默认为signed char,一旦溢出,就可能导致某些意外的结果。

e.g.
/* test_signed_char.c */
#include

int main () {
        char    c       = 255; // 我们以为char是无符号的,其范围应该是[0,255]
        int     i       = 0;
        int     a[256];

        for (i = 0; i < 256; i++) {
                a[i] = 1;
        }

        printf("%d\n", c); // 我们期待输出255
        printf("%d\n", a[c][/c][/c]); // 我们期待输出1
        printf("%d\n", a[255]);
        return 0;
}

gcc -Wchar-subscripts test_signed_char.c
test_signed_char.c: In function `main':
test_signed_char.c:13: warning: array subscript has type `char'

其输出结果:
-1
-4197476
1
从输出结果来看Solaris 9/gcc 3.2上char默认实现类型为signed char;在Windows XP/gcc-3.4.2上也是一样。
Windows上的输出结果:
-1
16 (随机值)
1

[-Wcomment]
当'/*'出现在 '/* … */'注释中,或者'\'出现在'// …'注释结尾处时,使用-Wcomment会给出警告。不要小觑这些马虎代码,它很可能会影响程序的运行结果。如下面的例子:

e.g.
/*
 * test_comment.c
 * gcc -Wcomment test_comment.c
 */
#include

int main() {
        int     a       = 1;
        int     b       = 2;
        int     c       = 0; // ok just test\
        c = a + b;

        /*
         * 这里我们期待c = 3
         * /* 但实际上输出c = 0
         */
        printf("the c is %d\n", c);
        return 0;
}

gcc -Wcomment test_comment.c
test_comment.c:10:30: warning: multi-line comment
test_comment.c:15:12: warning: "/*" within comment

输出:
the c is 0

[-Wformat]
检查printf和scanf等格式化输入输出函数的格式字符串与参数类型的匹配情况,如果发现不匹配则发出警告。某些时候格式字符串与参数类型的不匹配会导致程序运行错误,所以这是个很有用的警告选项。

e.g.
/*
 * test_format.c
 */
#include

int main() {
        long    l       = 1;
        double  d       = 55.67;
        printf("%d\n", l);
        printf("%d\n", d);
        return 0;
}

gcc -Wformat test_format.c
test_format.c: In function `main':
test_format.c:10: warning: int format, long int arg (arg 2)
test_format.c:11: warning: int format, double arg (arg 2)

输出:
1
1078711746

[-Wimplicit]
该警告选项实际上是-Wimplicit-int和-Wimplicit-function-declaration两个警告选项的集合。前者在声明函数却未指明函数返回类型时给出警告,后者则是在函数声明前调用该函数时给出警告。

e.g.
/*
 * test_implicit.c
 */
#include

add(int a, int b) { //函数没有声明返回类型
        return a + b;
}

int test() {
        int     a       = 0;
        int     b       = 0;
        int     c       = 0;
        int     d       = 0;

        c = add(a, b);
        d = sub(a, b); //未声明sub的函数原型
        return 0;
}

gcc -Wimplicit -c test_implicit.c
test_implicit.c:7: warning: return type defaults to `int'
test_implicit.c: In function `test':
test_implicit.c:18: warning: implicit declaration of function `sub'

[-Wmissing-braces]
当聚合类型或者数组变量的初始化表达式没有'充分'用括号{}括起时,给出警告。文字表述很难理解,举例说明则清晰些。看下面的例子:

e.g.
/*
 * test_missing_braces.c
 */
struct point {
        int     x;
        int     y;
};

struct line {
        struct point start;
        struct point end;
};

typedef struct line line;

int main() {
        int     array1[2][2]    = {11, 12, 13, 14};
        int     array2[2][2]    = {{11, 12}, {13, 14}}; // ok
        line    l1              = {1, 1, 2, 2};
        line    l2              = {{2, 2}, {3, 3}}; // ok

        return 0;
}

gcc -Wmissing-braces test_missing_braces.c
test_missing_braces.c: In function `main':
test_missing_braces.c:19: warning: missing braces around initializer
test_missing_braces.c:19: warning: (near initialization for `array1[0]')
test_missing_braces.c:21: warning: missing braces around initializer
test_missing_braces.c:21: warning: (near initialization for `l1.start')

[-Wparentheses]
这是一个很有用的警告选项,它能帮助你从那些看起来语法正确但却由于操作符优先级或者代码结构'障眼'而导致错误运行的代码中解脱出来。好长的一个长句,还是看例子理解吧!:)

e.g.
/*
 * test_parentheses.c
 * gcc -Wparentheses  test_parentheses.c
 */
#include

int main() {
        int     a       = 1;
        int     b       = 1;
        int     c       = 1;
        int     d       = 1;

        if (a && b || c) { // 人们很难记住逻辑操作符的操作顺序,所以编译器建议加上()
                ;
       
}

        if (a == 12)
                if (b)
                        d = 9; 
        else
                d = 10; //从代码的缩进上来看,这句仿佛是if (a == 12)的else分支

        printf("the d is %d\n", d); //期待d = 10, 而结果却是1
        return 0;
}

gcc -Wparentheses test_parentheses.c
test_parentheses.c: In function `main':
test_parentheses.c:13: warning: suggest parentheses around && within ||
test_parentheses.c:17: warning: suggest explicit braces to avoid ambiguous `else'

输出:
the d is 1

[-Wsequence-point]
关于顺序点(sequence point),在C标准中有解释,不过很晦涩。我们在平时编码中尽量避免写出与实现相关、受实现影响的代码便是了。而-Wsequence-point选项恰恰可以帮我们这个忙,它可以帮我们查出这样的代码来,并给出其警告。

e.g.
/*
 * test_sequence_point.c
 * gcc -Wsequence-point test_sequence_point.c
 */

#include

int main() {
        int     i = 12;
        i = i–;
        printf("the i is %d\n", i);
        return 0;
}

gcc -Wsequence-point test_sequence_point.c
test_sequence_point.c: In function `main':
test_sequence_point.c:10: warning: operation on `i' may be undefined

在两个平台上给出的编译警告都是一致的,但是输出结果却大相径庭。

Solaris输出:
the i is 11

Windows输出:
the i is 12

类似的像这种与顺序点相关的代码例子有:
i = i++;
a[i] = b[i++]
a[i++] = i
等等…

[-Wswitch]
这个选项的功能浅显易懂,通过文字描述也可以清晰的说明。当以一个枚举类型(enum)作为switch语句的索引时但却没有处理default情况,或者没有处理所有枚举类型定义范围内的情况时,该选项会给处警告。

e.g.
/*
 * test_switch1.c
 */
enum week {
        SUNDAY,
        MONDAY,
        TUESDAY /* only an example , we omitted the others */
};

int test1() {
        enum week       w       = SUNDAY;
        switch(w) {
                case SUNDAY:
                        break; // without default or the other case handlings
        };

        return 0;
}

int test2() { // Ok, won't invoke even a warning
        enum week       w       = SUNDAY;
        switch(w) {
                case SUNDAY:
                        break;
                default:
                        break;               
        };

        return 0;
}

int test3() { // Ok, won't invoke even a warning
        enum week       w       = SUNDAY;
        switch(w) {
                case SUNDAY:
                        break;
                case MONDAY:
                        break;
                case TUESDAY:
                        break;            
        };

        return 0;
}

gcc -Wswitch -c test_switch.c
test_switch.c: In function `test1':
test_switch.c:16: warning: enumeration value `MONDAY' not handled in switch
test_switch.c:16: warning: enumeration value `TUESDAY' not handled in switch

[-Wunused]
-Wunused是-Wunused-function、-Wunused-label、-Wunused-variable、-Wunused-value选项的集合,-Wunused-parameter需单独使用。
(1) -Wunused-function用来警告存在一个未使用的static函数的定义或者存在一个只声明却未定义的static函数,参见下面例子中的func1和func2;
(2) -Wunused-label用来警告存在一个使用了却未定义或者存在一个定义了却未使用的label,参加下面例子中的func3和func7;
(3) -Wunused-variable用来警告存在一个定义了却未使用的局部变量或者非常量static变量;参见下面例子中func5和var1;
(4) -Wunused-value用来警告一个显式计算表达式的结果未被使用;参见下面例子中func6
(5) -Wunused-parameter用来警告一个函数的参数在函数的实现中并未被用到,参见下面例子中func4。

下面是一个综合的例子
e.g.
/*
 * test_unused.c
 */
static void func1(); //to prove function used but never defined
static void func2(); //to prove function defined but not used
static void func3(); //to prove label used but never defined
static void func7(); //to prove label defined but never used
static void func4(int a); //to prove parameter declared but not used
static void func5(); //to prove local variable defined but not used
static void func6(); //to prove value evaluated but not used

static int var1;

void test() {
        func1();
        func3();
        func4(4);
        func5();
        func6();
}

static void func2() {
        ; // do nothing
}

static void func3() {
        goto over;
}

static void func4(int a) {
        ; // do nothing
}

static void func5() {
        int     a = 0;
}

static void func6() {
        int     a = 0;
        int     b = 6;
        a + b;
}

gcc -Wunused-parameter -c test_unused.c //如果不是用-Wunused-parameter,则func4函数将不被警告。
test_unused.c: In function `func3':
test_unused.c:30: label `over' used but not defined
test_unused.c: In function `func7':
test_unused.c:35: warning: deprecated use of label at end of compound statement
test_unused.c:34: warning: label `over' defined but not used
test_unused.c: In function `func4':
test_unused.c:37: warning: unused parameter `a'
test_unused.c: In function `func5':
test_unused.c:42: warning: unused variable `a'
test_unused.c: In function `func6':
test_unused.c:48: warning: statement with no effect
test_unused.c: At top level:
test_unused.c:6: warning: `func1' used but never defined
test_unused.c:25: warning: `func2' defined but not used
test_unused.c:14: warning: `var1' defined but not used

[-Wuninitialized]
该警告选项用于检查一个局部自动变量在使用之前是否已经初始化了或者在一个longjmp调用可能修改一个non-volatile automatic variable时给出警告。目前编译器还不是那么smart,所以对有些可以正确按照程序员的意思运行的代码还是给出警告。而且该警告选项需要和'-O'选项一起使用,否则你得不到任何uinitialized的警告。

e.g.
/*
 * test_uninitialized.c
 */
int test(int y) {
        int     x;

        switch (y) {
                case 1:
                        x = 11;
                        break;
                case 2:
                        x = 22;
                        break;
                case 3:
                        x = 33;
                        break;
        }

        return x;
}

gcc -Wuninitialized -O -c test_uninitialized.c
test_uninitialized.c: In function `test':
test_uninitialized.c:6: warning: `x'
might be used uninitialized in this function

2、非-Wall集合警告选项
以下讨论的这些警告选项并不包含在-Wall中,需要程序员显式添加。

[-Wfloat-equal]
该项用来检查浮点值是否出现在相等比较的表达式中。

e.g.
/*
 * test_float_equal.c
 */

void test(int i) {
        double  d = 1.5;
        if (d == i) {
                ;
        }
}

gcc -Wfloat-equal -c test_float_equal.c
test_float_equal.c: In function `test':
test_float_equal.c:8: warning: comparing floating point with == or != is unsafe

[-Wshadow]
当局部变量遮蔽(shadow)了参数、全局变量或者是其他局部变量时,该警告选项会给我们以警告信息。

e.g.
/*
 * test_shadow.c
 */
int     g;

void test(int i) {
        short   i;
        double  g;
}

gcc -Wshadow -c test_shadow.c
test_shadow.c: In function `test':
test_shadow.c:9: warning: declaration of `i' shadows a parameter
test_shadow.c:10: warning: declaration of `g' shadows a global declaration
test_shadow.c:6: warning: shadowed declaration is here

[-Wbad-function-cast]
当函数(准确地说应该是函数返回类型)被转换为非匹配类型时,均产生警告。

e.g.
/*
 * test_bad_func_case.c
 */
int add(int a, int b) {
        return a+b;
}

void test() {
        char *p = (char*)add(1, 13);
}

gcc -Wbad-function-cast -c test_bad_func_case.c
test_bad_func_case.c: In function `test':
test_bad_func_case.c:11: warning: cast does not match function type

[-Wcast-qual]
当去掉修饰源Target的限定词(如const)时,给出警告。

e.g.
/*
 * test_cast_qual.c
 */
void test() {
        char            c       = 0;
        const char      *p      = &c;
        char            *q;

        q = (char*)p;
}

gcc -Wcast-qual -c test_cast_qual.c
test_cast_qual.c: In function `test':
test_cast_qual.c:10: warning: cast discards qualifiers from pointer target type

[-Wcast-align]
这是个非常有用的选项,特别是对于在Solaris这样的对内存对齐校验的平台尤其重要。它用于在从对齐系数小的地址(如char*)转换为对齐系数大的地址(如int*)转换时给出警告。

e.g.
/*
 * test_cast_align.c
 */
#include
int main() {
        char    c = 1;
        char    *p = &c; //ok
        int     *q = (int*)p; //bad align-cast
        printf("the *q is %d\n", *q);
        return 0;
}

gcc -Wcast-align test_cast_align.c
test_cast_align.c: In function `main':
test_cast_align.c:9: warning: cast increases required alignment of target type

输出:
总线错误 ((主存储器)信息转储) //on Solaris 9

[-Wsign-compare]
在有符号数和无符号数进行值比较时,有符号数可能在比较之前被转换为无符号数而导致结果错误。使用该选项会对这样的情况给出警告。

e.g.
/*
 * test_sign_compare.c
 */
#include

int main() {
        unsigned int    i = 128;
        signed int      j = -1;
        if (i < j) {
                printf("i < j\n");
        } else {
                printf("i > j\n");
        }
        return 0;
}

gcc -Wsign-compare test_sign_compare.c
test_sign_compare.c: In function `main':
test_sign_compare.c:10: warning: comparison between signed and unsigned

输出:
i < j

[-Waggregate-return]
如果一个函数返回一个聚合类型,如结构体、联合或者数组,该选项就会给出警告信息。较简单不举例了。

[-Wmultichar]
当我们写下如此代码时:char c = 'peter', 使用该选项会给出警告。这个选项是默认选项,你无需单独使用该选项,不过你可以使用-Wno-multichar来关闭这些警告信息,但是这可是不建议你去做的。对于char c = 'peter'这样的代码的处理是与平台相关,不可移植的。

e.g.
/*
 * test_multichar.c
 */
int main() {
        char c = 'peter';
        printf("c is %c\n", c);
        return 0;
}
但这里在Windows和Solaris平台输出的结果却一致:
c is r

[-Wunreachable-code]
这个选项是一个检查冗余代码或疏忽代码好办法。它一旦检查到你的代码中有不可达的代码,就会发出警告。这些代码往往会存在潜在的危机。

e.g.
/*
 * test_unreachable.c
 */
int test(char c) {
        if (c < 256) {
                return 0;
        } else {
                return 1;
        }
}

gcc -Wunreachable-code -c test_unreachable.c
test_unreachable.c: In function `test':
test_unreachable.c:6: warning: comparison is always true due to limited range of data type
test_unreachable.c:9: warning: will never be executed

[-Wconvertion]
由于原型定义而引起的定点和浮点数之间的隐式转换(强制转换)或者由有符号数和无符号数之间隐式转换转换引起的警告。

e.g.
/*
 * test_conversion.c
 */
#include

void getdouble(double d) {
        ;       // do nothing
}

int main() {
        unsigned int    k;
        int             n       = 12;

        k = -1;
        k = (unsigned int)-1; // ok, explicit conversion ,no warning

        getdouble(n);
        return 0;
}

gcc -Wconversion test_conversion.c
test_conversion.c: In function `main':
test_conversion.c:15: warning: negative integer implicitly converted to unsigned type
test_conversion.c:18: warning: passing arg 1 of `getdouble' as floating rather than integer due to prototype

3、-Wtraditional和-W
这两个警告选项其实也都是一些组合(大部分都在上面提到过),前者用来在代码中使用了标准C不同于传统C的特性时,发出警告;后者也是针对一些事件打开一个警告集合。关于它们的说明具体可参见'Using the GNU Compiler Collection'。

[注1]
本文中的例子的测试环境为Solaris 9 SPARC平台,GCC-3.2和Windows XP Intel x86平台,mingw32 gcc3.4.2,如无特殊差异,所有注释均针对这两个测试环境。

如发现本站页面被黑,比如:挂载广告、挖矿等恶意代码,请朋友们及时联系我。十分感谢! Go语言第一课 Go语言进阶课 Go语言精进之路1 Go语言精进之路2 Go语言第一课 Go语言编程指南
商务合作请联系bigwhite.cn AT aliyun.com

欢迎使用邮件订阅我的博客

输入邮箱订阅本站,只要有新文章发布,就会第一时间发送邮件通知你哦!

这里是 Tony Bai的个人Blog,欢迎访问、订阅和留言! 订阅Feed请点击上面图片

如果您觉得这里的文章对您有帮助,请扫描上方二维码进行捐赠 ,加油后的Tony Bai将会为您呈现更多精彩的文章,谢谢!

如果您希望通过微信捐赠,请用微信客户端扫描下方赞赏码:

如果您希望通过比特币或以太币捐赠,可以扫描下方二维码:

比特币:

以太币:

如果您喜欢通过微信浏览本站内容,可以扫描下方二维码,订阅本站官方微信订阅号“iamtonybai”;点击二维码,可直达本人官方微博主页^_^:
本站Powered by Digital Ocean VPS。
选择Digital Ocean VPS主机,即可获得10美元现金充值,可 免费使用两个月哟! 著名主机提供商Linode 10$优惠码:linode10,在 这里注册即可免费获 得。阿里云推荐码: 1WFZ0V立享9折!


View Tony Bai's profile on LinkedIn
DigitalOcean Referral Badge

文章

评论

  • 正在加载...

分类

标签

归档



View My Stats