GithubHelp home page GithubHelp logo

go-learn's Introduction

this is my go book

go-learn's People

Contributors

christian-health avatar

go-learn's Issues

go install on Linux

(1)在 http://golang.org/dl/下载最新的linux版本,并把它提取到/usr/local目录,在此目录下进行解压缩
$ tar -xvf xxx.tar.gz
然后将/usr/local/go/bin添加到PATH环境变量中,执行
$ export PATH=$PATH:/usr/local/go/bin
(2)export PATH=$PATH:/usr/local/go/bin
(3)root@:/usr/local/go# go version
go version go1.9.2 linux/amd64

Go代码分析

import (
	"encoding/json"
	"flag"
	"fmt"
	"sync" //上面的这些都是go语言系统库的和beego架构没有任何关系
	"github.com/astaxie/beego/logs"//这行是beego框架中的
          在 /项目名/vendor/github.com/astaxie/beego/logs目录下
)

uuid

github.com/satori/go.uuid

goLang 视频讲解

package main

import (
	"fmt"
	"sort"
)

func test_sort()  {
	yang := [5]int{2,1,9,4,5}
	sort.Ints(yang[:])
	fmt.Println(yang)
}
func main() {
	fmt.Printf("%T %T %T\n",'c',string('c'),[]byte(string('c')));
	fmt.Printf("%v %v %v",'c',string('c'),[]byte(string('c')));
    /*
       int32   string   []uint8
       99      c         [99]
    */
    var yang string = "ni hao a "
    for i :=0 ;i < len(yang) ; i++ {
    	fmt.Println("%v",yang[i],string(yang[i]))
	}
	/*
	%v 110 n
	%v 105 i
	%v 32
	%v 104 h
	%v 97 a
	%v 111 o
	%v 32
	%v 97 a
	%v 32
	*/
	test_sort()
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.