Coder Social home page Coder Social logo

note's Introduction

notes

the problems and notes

note's People

Contributors

zuston avatar

Watchers

James Cloos avatar  avatar  avatar

note's Issues

Go Tips

new
用于为值分配内存,返回的是一个指向类型的指针值。返回的是指针
make
只能用于引用类型的值的创建上,并且结果是第一个参数所代表的类型的值,而不是指向这个值的指针值。所以返回并不是指针。

取址操作符 &

普通赋值语句,左边多值返回的情况

  1. v, ok := map["k2"]
  2. v, ok := x.(string)
  3. v, ok := <- channel

常量与变量

常量

  1. 常量在编译期间创建
  2. 布尔常量,rune 常量。。。
  3. const PI = 3.333333
  4. iota 代表了连续的,无类型的整数常量。
const {
    Sunday = iota
    Monday
    Tuesday
}

const {
    Sunday = 1 <<  iota
    Monday
    Tuesday
}

内建函数

  1. close
  2. len, cap
  3. new, make
  4. append, copy
  5. delete

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.