Golang Study Notes

Source: Internet
Author: User
This is a created article in which the information may have evolved or changed.

1.GO process oriented

  • Advantages
    速度快,高性能(类似c),开发速度快(类似python),原生并发支持(类似erlang)
  • Process Control
  • Function

2.GO Object Oriented

  • Data
    Array,Slice,Map
  • Packaging
    通过struct类似封装,大小写控制访问权限
  • Structure
  • interface struct
    非侵入式接口

3. Concurrency

  • Co-process
    调度由用户自己控制,本质上有点类似于用户级线程,这些用户级线程的调度也是自己实现的,不需要OS抢占式调度
  • Synchronization mechanism
  • Communication Through (channel)
    1>不带缓冲的channel(同步)
    2>带缓冲的channel(异步)
  • Shared Memory plus lock
    sync.Mutex和sync.RWMutex

4. Network

  • Network protocol
    Dial()函数封装
    http协议接口
  • Json
    编码为JSON func Marshal
    解码JSON数据 func Unmarshal

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.