Home > Backend Development > Golang > Do I need to recompile when using a third-party go library?

Do I need to recompile when using a third-party go library?

王林
Release: 2024-02-09 10:21:19
forward
1033 people have browsed it

Do I need to recompile when using a third-party go library?

When using third-party Go libraries, there is no need to recompile the entire project. Go's package management tool can easily import third-party libraries into the project. You only need to import the corresponding package in the code to use its functions and methods. When compiling a project, the Go compiler automatically parses imported packages and compiles them into executable files. Therefore, there is no need to recompile the entire project, only the modified files. This makes the Go language very flexible and efficient when using third-party libraries. Therefore, whether you are adding a new third-party library or updating an existing library, you do not need to recompile the entire project.

Question content

I am a beginner at go. I've found that people just publish go libraries by pushing to github repositories using tags. It doesn't really compile anything when released. There are no build artifacts other than the source code.

When I use a third-party library, the command go get xxx will be called to run. Will the library compile locally with my source code? So doesn't go have any compilation library?

Solution

Does it need to be recompiled to use a third-party go library?

Yes.

Will the library be compiled locally with my source code?

Yes.

So does go not have any compilation library?

Basically not.

The above is the detailed content of Do I need to recompile when using a third-party go library?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:stackoverflow.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template