Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What protocol is used in go language

2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces "what protocol is used in go language". In daily operation, I believe many people have doubts about what protocol to use in go language. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts about "what protocol does go language use?" Next, please follow the editor to study!

The go language uses the BSD open source protocol. BSD open source agreement is a protocol that gives users a lot of freedom to use, modify the source code, and redistribute the modified code as open source or proprietary software. BSD code encourages code sharing, but the copyright of the code author must be respected.

The operating environment of this tutorial: windows10 system, GO 1.11.2, Dell G3 computer.

The Go language comes from Bell Labs and is developed from a Limbo language. Limbo is used to develop distributed applications on minicomputers, supporting modular programming, compile-time and run-time strong type detection, in-process based on typed communication channels, atomic garbage collection and simple abstract data types, its purpose is to run safely even on minicomputers without hardware protection. Go and Limbo were developed by the same group of people and have the same excellent features. Go was born in 2007 at Google, which supports the use of 20 per cent free time to develop experimental projects, which were launched in 2009. The Go language is open source and uses the BSD protocol.

BSD open source protocol is a protocol that gives users a lot of freedom. You can use it freely, modify the source code, or redistribute the modified code as open source or proprietary software. When you release code that uses the BSD protocol, or re-develop your own product based on the BSD code, you need to meet three conditions:

If the re-released product contains the source code, the BSD protocol from the original code must be included in the source code.

If only the binary library / software is released, the BSD protocol from the original code needs to be included in the library / software documentation and copyright notice.

You cannot use the name of the author / organization of the open source code and the name of the original product for marketing.

BSD code encourages code sharing, but the copyright of the code author must be respected. BSD is a friendly protocol for commercial integration because it allows users to modify and redistribute code, as well as to use or develop commercial software release and sale on BSD code. Many companies prefer the BSD protocol when choosing open source products because they can have complete control over the third-party code and can modify or redevelop it when necessary.

Extension material: comparison of five open source protocols (BSD,Apache,GPL,LGPL,MIT)

BSD open source protocols (original BSD license, FreeBSD license, Original BSD license)

BSD open source protocol is a protocol that gives users a lot of freedom. Basically, users can "do whatever they want" and are free to use and modify the source code, or redistribute the modified code as open source or proprietary software.

But the premise of "do whatever you want" when you release code that uses the BSD protocol, or re-develop your own product based on the BSD code, you need to meet three conditions:

If the re-released product contains the source code, the BSD protocol from the original code must be included in the source code. If only the binary library / software is released, the BSD protocol from the original code needs to be included in the library / software documentation and copyright notice. You cannot use the name of the author / organization of the open source code and the name of the original product for marketing.

BSD code encourages code sharing, but the copyright of the code author must be respected. BSD is a friendly protocol for commercial integration because it allows users to modify and redistribute code, as well as to use or develop commercial software release and sale on BSD code. However, many companies prefer the BSD protocol when choosing open source products, because they can completely control these third-party code and can modify or redevelop them when necessary.

Apache Licence

Apache Licence is the protocol adopted by Apache, a well-known non-profit open source organization. The agreement, similar to BSD, also encourages code sharing and respect for the copyright of the original author, and also allows code to be modified and redistributed (as open source or commercial software). The conditions that need to be met are similar to BSD:

Need to give the user of the code an Apache Licence if you modify the code, you need to be modified in the file. The extended code (modified and code derived from the source code) needs to be included with the agreement, trademark, patent declaration and other instructions specified by the original author. If the re-released product contains a Notice file, you need to have Apache Licence in the Notice file. You can add your own license to Notice, but it cannot be expressed as a change to the composition of Apache Licence.

Apache Licence is also a business-friendly license. Users can also modify the code when needed to meet their needs and release / sell as open source or commercial products.

GPL (GNU General Public License)

Linux, which we are familiar with, uses GPL. The GPL protocol is very different from the licenses that encourage code reuse, such as BSD, Apache Licence, etc. The starting point of GPL is the open source / free use of code and the open source / free use of referenced / modified / derived code, but modified and derived code is not allowed to be released and sold as a closed source commercial software. That's why we can use all kinds of free linux, including commercial companies' linux and linux's all kinds of free software developed by individuals, organizations, and business software companies.

The main content of the GPL agreement is that as long as a product using the GPL protocol ("using" refers to class library references, modified code or derived code) in a software, the software product must also adopt the GPL protocol, which must also be open source and free. This is called "contagion". There is no problem for GPL products to be used as a separate product, and you can enjoy the advantage of free.

Because GPL strictly requires that software products that use GPL class library must use GPL protocol, for open source code using GPL protocol, commercial software or departments with code confidentiality requirements are not suitable to integrate / adopt as the basis of class library and secondary development.

Other details, such as the need to accompany the GPL protocol when re-released, are similar to those of BSD/Apache.

LGPL (GNU Lesser General Public License)

LGPL is an open source protocol designed by GPL for the use of class libraries. Unlike GPL, any software that uses / modifies / derives the GPL class library must adopt the GPL protocol. LGPL allows commercial software to use LGPL class libraries through class library references (link) without the need for open source commercial software code. This allows open source code using the LGPL protocol to be referenced, published and sold by commercial software as a class library.

However, if you modify the code or derivation of the LGPL protocol, all modified code, the additional code involving the modification and the derived code must use the LGPL protocol. Therefore, the open source code of LGPL protocol is very suitable to be quoted by commercial software as a third-party class library, but it is not suitable for commercial software that wants to do secondary development based on LGPL protocol code by modification and derivation.

GPL/LGPL protects the intellectual property rights of the original authors and prevents people from using open source code to copy and develop similar products.

MIT (MIT)

MIT is a license agreement as broad as BSD, and the author only wants to retain the copyright without any other restrictions. In other words, you must include a declaration of the original license agreement in your distribution, whether you release it in binary or source code.

At this point, the study of "what protocols to use in go language" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report