Category:Golang

  • Channel details in go language

    Time:2022-5-20

    catalogue 1、 Basic concepts of go language channel 1. Background of channel generation 2. Channel working mode 2、 Channel usage syntax 1. Declaration and initialization of channels 2. Put the data into the channel 3. Take out data from the channel 4. Close the channel 3、 State analysis of single channel and channel 1. Single […]

  • Data structure and algorithm go implementation heap

    Time:2022-5-20

    Series articles: Go realize one-way linked list Go implements bubble sorting and insert sorting Go to realize merging and sorting Go to realize quick sorting Data structure algorithm go implementation of dichotomy Data structure and algorithm -go implementation hash table Data structure and algorithm – binary tree, AVL, red black tree Data structure and algorithm […]

  • [issue 26] 123hr experience of Tencent TEG + operation development

    Time:2022-5-20

    Maybe it’s because my previous internship and face-to-face evaluation on wechat were very good, so the process goes very fast, and the problem is not very difficult? It was invested in background development, which was profited by operation development 1. Technical side: 40min 1. Self introduction 2. How to fuse and limit current in the […]

  • An example of modifying the traversed object during golang traversal

    Time:2022-5-20

    catalogue preface Traversal slice Traversal map summary preface Many times, you need to remove some elements from the traversal object or add elements to the traversal object. At this time, you need to be careful.For some precautions in go language, I made a summary and examples, and left some notes. Traversal slice 1. Remove elements […]

  • On the way to learn go, PHPer feels the most

    Time:2022-5-19

    As a developer of PHP for four years, of course, I’ve learned a little about Python crawling. I’ve been self-taught in golang for nearly a month. What I feel most is the reference data types inside. For pure PHPer, reference types are rarely used, and I don’t know much about these reference data types. Here’s […]

  • Mutually exclusive lock and read-write lock of thread safety in go language

    Time:2022-5-19

    catalogue 1、 What is a mutex? 1. Concept 2. Unlocked 3. After locking 2、 Read write lock [efficiency revolution] 1. Why is the efficiency of read-write lock high 2. Usage 3、 Sync once 1.sync. Once generation background 2.sync. Overview of once mechanism 3.sync. Once pay attention 4. Usage 4、 Atomic packet operation preface: In a […]

  • Websocket: II Golang implements websocket message notification

    Time:2022-5-19

    When designing products, we usually encounter message notification, such as the successful payment of the user‘s order, for example, the user can notify in real time when he has an on-site letter. HTTP is one-way. The client requests and the server returns. This request has ended. Websocket can maintain the connection and realize the long […]

  • Go implementation bubble sort example code

    Time:2022-5-19

    Bubble sorting: the basic idea of bubble sorting is to compare the sorting codes of adjacent elements from the back to the front (starting from the element with larger subscript) of the sequence to be sorted. If the reverse order is found, it will be exchanged, so that the element with smaller sorting code will […]

  • MixGo V1. 1.17 release and add Viper configuration library for selection

    Time:2022-5-18

    Mixgo is a go rapid development standard Toolkit; The internal modules are highly decoupled, and the overall code is built based on multiple independent modules. Users can use these independent modules even if they do not use our mixcli scaffold to quickly generate code. For example: you can only use xcli to build your command […]

  • Super parsing language

    Time:2022-5-18

    catalogue 1、 Unit test classification and its concept 1. Basic classification 2. Describe the classification of unit test in detail 2、 Describe each test in detail in combination with the code 1. Benchmark test 2. Group test and sub test 3、 Pprof debugging tool 1. Transfer parameters to the main function 2. Pprof performance tuning […]

  • Go slice full resolution

    Time:2022-5-18

    Go slice full resolution Directory structure: array section Bottom structure establish General statement Make mode intercept Boundary problem Add Extended expression Capacity expansion mechanism Slice transfer pit Copy of slice Shallow copy Deep copy array var n [4]int fmt. Println (n) // output: [0] n[0] = 1 n[3] = 2 fmt. Println (len (n)) // […]

  • Detailed explanation of gorang slice interception parameter method

    Time:2022-5-18

    Take s: = [] int {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} as an example 0. Suggestion: it is recommended to use two parameters during slice interception, especially when slicing from the underlying array, because this will reallocate space for the slice during the first append operation, so as to reduce the […]