Jquery中文网 www.jquerycn.cn
Jquery中文网 >  后端编程  >  Go语言  >  正文 golang 面试

golang 面试

发布时间:2021-04-09   编辑:www.jquerycn.cn
jquery中文网为您提供golang 面试等资源,欢迎您收藏本站,我们将为您提供最新的golang 面试资源

1) 基础语言描述理解考察
https://www.tutorialspoint.com/go/go_interview_questions.htm
这里有一栏、全面的问答,并且非常基础
也包括golang的一些开放性话题的讨论

基础语言代码考察
http://www.golangpro.com/2015/08/golang-interview-questions-answers.html

10个基本问题考察
https://www.toptal.com/go/interview-questions

(2)代码工程考察
https://yushuangqi.com/blog/2017/golang-mian-shi-ti-da-an-yujie-xi.html?from=groupmessage&isappinstalled=0
这里有代码题的分析,直接面向工程和原理。看似简单、简短,从候选人的回答入口、思路,基本可以探测到候选人的语言理解和运用经验信息。

(3) 其他 从网上爬的
What is good code design?
What version control tools did you use so far? (I just want to know about his/her experience)
How do you approach a new problem?
How to you test your software? (a bad answer here is a deal breaker for me)
(In case of server software) How do you deploy your applications?
How would you setup the authentication e.g. in a microservice environment?
Then some Go specific questions:

What are Go routines?
What are channels and how can you use them?
How can you distribute tasks in Go to different machines? (this is a pro question)

    1. Give a summary of Golang.
      A system programming language developed at Google. It has inbuilt garbage collection and supports concurrency. The code can be compiled into a single executable binary and don't need addition library or runtime to execute it on server.

    2. Can you declare a class in Golang?
      Yes, Golang has a unique way of implementing class with the type interface.
      See here on how to declare class in Golang

    3. Does Go supports generic? ( trick question )
      No (as of 2015)

    4. What are the commands available in Golang to import codes from repositories such as GitHub or BitBucket?
      go get and go install commands

    5. A buffer was created with make() function and Go allocated some memory for the buffer. How do you destroy the buffer to reclaim back the memory?
      buffer = nil
      During runtime, buffer = nil will cause it to be garbage collected.

    6. What are these ? (trick question)
      var num int ( integer variable)
      var ptr *int (a pointer)
      num = 10 (assign value of 10 to variable num)
      ptr = &num (pointer holding the memory address of variable num)

    7. What are the notable differences between a slice and array ?
      Array size is fixed, slice size is not. Can dynamically increase or decrease a slice's size during runtime but not for array. Slice is similar to a linked list, can do push, pop, FIFO, LIFO on slice. Use builtin append, copy functions to manipulate slice.

    8. What's the difference between cap() and len()?
      Len() - gives the number of elements inside a slice.
      Cap() - gives the capacity of the slice. Number of elements the slice can accommodate.

    9. Hash table or hash map allows fast lookup. How does Go implements hash map? (trick question)
      The equivalent of hash table in Golang is map.
      hash-table := make(map[string]string)

    10. Which of the following functions, variables or identifiers that are exportable or can be invoked from another function externally and why? (trick question)

转载于:https://www.cnblogs.com/diegodu/p/9244218.html

到此这篇关于“golang 面试”的文章就介绍到这了,更多文章或继续浏览下面的相关文章,希望大家以后多多支持JQ教程网!

您可能感兴趣的文章:
golang基础教程
PHP7 Swoole/Nginx/Golang 数字货币交易所通信方式
golang 面试
golang面试经之笔试1
Golang 高频面试题七问
使用golang做http接口压力测试并输出到echarts散点图中
php和golang怎么配合
Golang-性能监控及调优
Golang 微服务 - 01 环境和工具
Golang创建httpServer多路复用处理函数(Golang Web .NewServerMux())

[关闭]