golang离线环境依赖包问题
妙音
posted @ 2021年8月21日 17:06
in golang
, 869 阅读
问题描述
在一个win10虚拟机中安装了go(go1.16.4)的开发环境, 其中有自己的项目,此时正常编译。
然后将这个虚拟机放到内网,内网网络受限,不允许访问外网
如果新一个依赖包,该怎么办呢?
方法一: 拷贝vendor目录(推荐)
1. 在外网环境项目目录,生成vendor
go mod vendor
2. 将vendor拷贝进内网,放在内网项目目录
缺点:只能当前项目使用
优点:体积小
类似python的pip download -r requipment.txt,将包下载后放到一个目录
方法二: 拷贝$GOPATH/pkg/mod目录
1. 外在更新全局依赖
go mod download
2.拷贝进入内网,替换mod目录
优点:可以被所有项目公用
缺点:有可能会比较大
方法三: 使用自己的goproxy
详细见
https://github.com/goproxyio/goproxy
吐槽
不少资料都是介绍GO111MODULE=on/off/auto之类的查找顺序,看得云山雾绕
假如GO111MODULE=on,并且在内网,此时无法访问网络,难道它不会找一下当前目录中的vendor?
2021年9月03日 00:28
I wanted to thank you for this excellent read!! I definitely loved every little bit of it. I have you bookmarked your site to check out the new stuff you post. магазин интернет магазин
2021年9月11日 18:27
i really like this article please keep it up. lions breath carts
2021年9月12日 21:40
I haven’t any word to appreciate this post.....Really i am impressed from this post....the person who create this post it was a great human..thanks for shared this with us. https://barowatt.com
2021年9月14日 18:41
I was reading some of your content on this website and I conceive this internet site is really informative ! Keep on putting up. Blackpods pro
2021年9月21日 15:55
Wow, excellent post. I'd like to draft like this too - taking time and real hard work to make a great article. This post has encouraged me to write some posts that I am going to write soon. https://muabannhadat.tv/bat-dong-san/tra-vinh
2021年9月21日 22:16
Thanks for providing recent updates regarding the concern, I look forward to read more. blackpods
2021年9月24日 14:46
Thanks for sharing this valuable content. In my view, if all webmasters and bloggers made good content as you did, the web will be a lot more useful than ever before. Buy Organic Seeds
2021年9月27日 16:09
Awesome article, it was exceptionally helpful! I simply began in this and I'm becoming more acquainted with it better! Cheers, keep doing awesome! Buy marijuana hash Online UK
2021年9月28日 00:31
Just admiring your work and wondering how you managed this blog so well. It’s so remarkable that I can't afford to not go through this valuable information whenever I surf the internet! Packing Tips: The Complete List of Dos And Don’ts For Long-Distance Moving
2021年9月28日 00:52
You’ve got some interesting points in this article. I would have never considered any of these if I didn’t come across this. Thanks!. What Is the Average Cost of Moving an Apartment?
2021年9月28日 22:43
Below you will understand what is important, the idea provides one of the links with an exciting site: <a href="https://www.thenewcanadians.com/?fbclid=IwAR3_6ZAviXa01yzNp94ajApHUvZANDZL3ENoZO1NTM26P0DbmDHzOqTs7eg">situs idn poker</a>
2021年10月01日 22:19
I wanted to thank you for this excellent read!! I definitely loved every little bit of it. I have you bookmarked your site to check out the new stuff you post. Webdesign Limburg
2021年10月01日 22:23
Attractive, post. I just stumbled upon your weblog and wanted to say that I have liked browsing your blog posts. After all, I will surely subscribe to your feed, and I hope you will write again soon! Vakantiewoning Limburg
2021年10月01日 22:28
This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value. Im glad to have found this post as its such an interesting one! I am always on the lookout for quality posts and articles so i suppose im lucky to have found this! I hope you will be adding more in the future... Zonnepanelen installateur Oost-vlaanderen
2021年10月01日 22:32
I love visiting sites in my free time. I have visited many sites but did not find any site more efficient than yours. Thanks for the nudge! Warmtepompen
2021年10月01日 22:37
I definitely enjoying every little bit of it. It is a great website and nice share. I want to thank you. Good job! You guys do a great blog, and have some great contents. Keep up the good work. Warmtepompen Oost-Vlaanderen
2021年10月01日 22:43
You have done a great job on this article. It’s very readable and highly intelligent. You have even managed to make it understandable and easy to read. You have some real writing talent. Thank you. Terrasoverkappingen op maat
2021年10月01日 22:48
Thank you because you have been willing to share information with us. we will always appreciate all you have done here because I know you are very concerned with our. Airconditioning Oost-Vlaanderen
2021年10月01日 22:53
It is included in my habit that I often visit blogs in my free time, so after landing on your blog. I have thoroughly impressed with it and decided to take out some precious time to visit it again and again. Thanks. Pergola bouwen
2021年10月01日 22:57
Great post but I was wondering if you could write a little more on this subject? I’d be very thankful if you could elaborate a little bit further. Thanks in advance! Web design Limburg
2021年10月01日 23:01
It is truly a well-researched content and excellent wording. I got so engaged in this material that I couldn’t wait reading. I am impressed with your work and skill. Thanks. Webdesign bureau
2021年10月01日 23:09
I got too much interesting stuff on your blog. I guess I am not the only one having all the enjoyment here! Keep up the good work. Zonnepanelen installateurs
2021年10月02日 18:09
There are various dissertation internet websites on the net when you attain definitely reported with your web page. sash windows
2021年12月01日 01:08
You know your projects stand out of the herd. There is something special about them. It seems to me all of them are really brilliant!
2021年12月02日 20:26
สล็อต เครดิตฟรี here are both card games OnlineSlot Games
2021年12月09日 02:58
You understand your projects stand out of the crowd. There is something unique about them. It seems to me all of them are brilliant. 먹튀검증
2021年12月09日 03:09
I know this is one of the most meaningful information for me. And I'm animated reading your article. But should remark on some general things, the website style is perfect; the articles are great. Thanks for the ton of tangible and attainable help. 안전놀이터
2021年12月09日 03:14
Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with extra information? It is extremely helpful for me. 토토사이트
2021年12月09日 03:19
Thanks for sharing the post.. parents are worlds best person in each lives of individual..they need or must succeed to sustain needs of the family. 토토사이트
2021年12月09日 03:24
This particular papers fabulous, and My spouse and i enjoy each of the perform that you have placed into this. I’m sure that you will be making a really useful place. I has been additionally pleased. Good perform! 토토사이트
2021年12月09日 03:33
I am incapable of reading articles online very often, but I’m happy I did today. It is very well written, and your points are well-expressed. I request you warmly, please, don’t ever stop writing. 오피사이트
2021年12月11日 05:56
Thanks for the marvelous post! ✅ I really enjoyed reading it, you might be a great author. I will certainly bookmark your blog and definitely will come back sometime soon. I want to encourage you to continue your great writing 온라인바카라
2021年12月24日 23:57
Such a informative article thanks for sharing.
2021年12月29日 06:11 Wonderful blog! Do you have any tips and hints for aspiring writers? Because I’m going to start my website soon, but I’m a little lost on everything. Many thanks! minecraft servers
2022年1月12日 05:48
Everything is very open with a very clear description of the challenges. It was definitely informative. Your website is very helpful. Thanks for sharing On that website page, you'll see your description, why not read through this nclex review
2022年1月28日 07:20 Wow! This could be one of the most useful blogs we have ever come across on thesubject. Actually excellent info! I’m also an expert in this topic so I can understand your effort. TOP Models Karachi
2022年1月28日 07:33
I just found this blog and have high hopes for it to continue. Keep up the great work, its hard to find good ones. I have added to my favorites. Thank You. VIP Pakistani Escorts Dubai
2022年1月28日 07:36
This is very educational content and written well for a change. It's nice to see that some people still understand how to write a quality post.! Indian & Pakistani Escorts in Dubai
2022年1月28日 07:39
The article looks magnificent, but it would be beneficial if you can share more about the suchlike subjects in the future. Keep posting. Lahore Escorts
2022年1月28日 07:42
I have read your article couple of times because your views are on my own for the most part. It is great content for every reader. Models in Islamabad
2022年1月28日 07:44
It is truly a well-researched content and excellent wording. I got so engaged in this material that I couldn’t wait reading. I am impressed with your work and skill. Thanks. Escorts in Karachi
2022年1月28日 07:47
Really I enjoy your site with effective and useful information. It is included very nice post with a lot of our resources.thanks for share. i enjoy this post. Escorts in Lahore
2022年1月28日 07:50
If more people that write articles involved themselves with writing great content like you, more readers would be interested in their writings. I have learned too many things from your article. Sex in Islamabad
2022年1月28日 07:53
I found your this post while searching for some related information on blog search...Its a good post..keep posting and update the information. Pakistan Escorts
2022年1月28日 07:56
Pretty good post. I have just stumbled upon your blog and enjoyed reading your blog posts very much. I am looking for new posts to get more precious info. Big thanks for the useful info. Karachi Call Girls
2022年1月28日 08:02
I recently came across your blog and have been reading along. I thought I would leave my first comment. I don’t know what to say except that I have enjoyed reading. Models in Lahore
2022年1月28日 08:05
I am incapable of reading articles online very often, but I’m happy I did today. It is very well written, and your points are well-expressed. I request you warmly, please, don’t ever stop writing. Islamabad Escorts
2022年1月28日 08:08
You made such an interesting piece to read, giving every subject enlightenment for us to gain knowledge. Thanks for sharing the such information with us to read this... Islamabad Escorts
2022年1月28日 08:10
Great job here on _______ I read a lot of blog posts, but I never heard a topic like this. I Love this topic you made about the blogger's bucket list. Very resourceful. Call Girls in Karachi
2022年1月28日 08:13
It is a good site post without fail. Not too many people would actually, the way you just did. I am impressed that there is so much information about this subject that has been uncovered and you’ve defeated yourself this time, with so much quality. Good Works! Call Girls In Lahore
2022年1月28日 08:16
Hello I am so delighted I located your blog, I really located you by mistake, while I was watching on google for something else, Anyways I am here now and could just like to say thank for a tremendous post and a all round entertaining website. Please do keep up the great work. Islamabad Call Girls
2022年1月28日 08:19
I really loved reading your blog. It was very well authored and easy to undertand. Unlike additional blogs I have read which are really not tht good. I also found your posts very interesting. In fact after reading, I had to go show it to my friend and he ejoyed it as well! Pakistan Escorts
2022年1月28日 08:21
Pretty nice post. I just stumbled upon your weblog and wanted to say that I have really enjoyed browsing your blog posts. After all I’ll be subscribing to your feed and I hope you write again soon! Escort in Lahore
2022年1月28日 08:24
Great job here on _______ I read a lot of blog posts, but I never heard a topic like this. I Love this topic you made about the blogger's bucket list. Very resourceful. Escorts In Islamabad
2022年1月28日 08:27
This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. Escorts in Pakistan
2022年1月28日 08:30
Positive site, where did u come up with the information on this posting?I have read a few of the articles on your website now, and I really like your style. Thanks a million and please keep up the effective work. Islamabad Call Girl
2022年1月28日 08:33
You have performed a great job on this article. It’s very precise and highly qualitative. You have even managed to make it readable and easy to read. You have some real writing talent. Thank you so much. Escorts In Islamabad
2022年1月28日 08:36
nice post, keep up with this interesting work. It really is good to know that this topic is being covered also on this web site so cheers for taking time to discuss this! Escorts in Karachi
2022年2月18日 04:59
Online Hold'em Community in Korea 홀덤사이트
2022年2月23日 12:05
Bolaku Situs Bandar Bola Agen Judi Online Terpercaya , Bolaku merupakan situs bandar bola resmi yang telah diakui berbagai agen dunia asia tepatnya di Indonesia dengan menyediakan pasaran taruhan judi online hingga puluhan tipe game terlengkap. bolaku
2022年3月01日 23:08
Are you having trouble loading mywifiext.netYou have come to the right place if 192.168.1.250is not working or you receive an error message saying that mywlfiext cannot be connected to. This page attempts to connect to the mywifiext.net web server in order to conduct a network independent down/not test. You can try the following troubleshooting tips if the site appears to be up. However, if the site is down there is nothing you can do. Learn more about our work and how we do it. 192.168.1.250
2022年3月15日 10:26
Nice and interesting post, I was looking for this kind of information and enjoyed reading this ดาวน์โหลดpg slot
2022年3月17日 15:22
This particular is usually apparently essential and moreover outstanding truth along with for sure fair-minded and moreover admittedly useful My business is looking to find in advance designed for this specific useful stuffs… how does the image above fit within the modernist mold
2022年3月18日 07:38
I’m happy to find so many useful info here in the post, thanks for sharing. I’ll bookmark your blog and take the feeds also! joker slot
2022年3月22日 01:51
You make so many great points here that I read your article a couple of times. This is great content for your readers. ufabet เข้าสู่ระบบ
2022年4月14日 05:35
Thanks for the marvelous post! ✅ I really enjoyed reading it, you might be a great author. I will certainly bookmark your blog and definitely will come back sometime soon. I want to encourage you to continue your great writing 작업대출사이트
2022年5月04日 06:00
สล็อต สล็อตออนไลน์ เกมสล็อต เว็บสล็อต สล็อต เล่น ฟรี สล็อต 888 สล็อตออนไลน์ มือ ถือ เกมสล็อต ทดลองเล่นสล็อต สล็อต
2022年5月10日 19:51
Nice and interesting post, I was looking for this kind of information and enjoyed reading this 토토사이트 순위
2022年6月03日 04:58
This Post is providing valuable and unique information✅ I know that you take a time and effort to make a awesome article 꽁머니
2022年6月10日 05:13
mtpolice.kr provides sports betting information, sports analysis, and sports tips as a sports community.검증사이트
2022年6月15日 20:36
Superior post keeps up with this exceptional work✅. It's nice to know that this topic is being also covered on this web site so cheers for taking the time to discuss this! Thanks again and again! เน็ตทรู
2022年6月16日 10:20
There are baby fleece blankets that have hoods and pockets. custom fleece blankets
2022年6月17日 09:54
You amazingly have terrific article content. Cheers for sharing your blog site. Thank you for sharing this เน็ตทรูรายวัน ไม่ลดสปีด
2022年6月18日 21:45
Definitely a fantastic publish✅. The information you have provided is actually very worthwhile. aw8
You make so many great points here that I read your article a couple of times. This is great content for your readers. aw8
This is a great article and great read for me✅. It's my first visit to your blog ut9winth
I am hoping that you will continue writing this kind of blog. Thanks for sharing this information. ut9winth
This Post is providing valuable and unique information✅ I know that you take a time and effort to make a awesome article ut9winth
I enjoyed reading this post such an interesting info post. Thanks for providing good info on the topic of happyluke
Everything has its own value, but this is really precious information✅ shared by Author of happyluke
I appreciate your efforts in preparing this post. I really like your blog articles on happyluke
What a fantabulous post ✅. Never seen this kind of useful post. I am grateful to you and expect more number of posts like these. Thank you very much jbo
Fabulous post✅ you have denoted out some fantastic points regarding jbo
2022年6月26日 22:08
Online poker information community in Korea 홀덤
2022年6月27日 05:44
Where ideas and insights are shared Trending Chefs
2022年6月30日 21:57
These very small facts are produced using wide range of qualifications✅ I favor the idea such a good deal. This specific seems to be definitely excellent University of Chester
2022年7月03日 19:51
You should also keep in mind that there are other programs that you can run on the server that will block the web sites that the web browser tries to visit.
2022年7月03日 20:13
Changing your passwords can be one of the best things that you can do because it will make it harder for the hacker to access any information that is on your computer.
2022年7月03日 20:29
Therefore, you should change your password on a regular basis and use a new email address that is not the same as the one that you use for work.
2022年7月03日 20:43
Also, you should make sure that you always keep your antivirus running in order to protect yourself from any viruses or worms that are sent by hackers online.
2022年7月03日 20:56
Anyone who has ever wanted to look up information on a product, a person, or something in order to make an informed decision about it knows how difficult it can be when you want to get information that is quick and easy.
2022年7月07日 23:42
It’s really a fantastic website ✅ thanks for sharing. There's no doubt I would fully rate it after i read what the idea about this article is 바둑이게임
2022年7月30日 11:11
Nice post. I find out some thing tougher on different blogs everyday. Most commonly it is stimulating you just read content off their writers and use a little at their store. I’d would prefer to apply certain using the content in my small weblog no matter whether you don’t mind. Natually I’ll offer you a link with your internet blog. Thanks for sharing. 바카라사이트 카지노사이트
2022年8月03日 03:34
Wow that was unusual. I just wrote an incredibly long comment but after I clicked submit my comment didn’t appear. Grrrr… well I’m not writing all that over again. Anyway, just wanted to say wonderful blog! https://totoworld24.com
2022年8月06日 22:59
These websites are characterized by poor security practices, including user generated content and a lot of it being spam. dark web links
2022年8月06日 23:34
When it comes to the Dark Web though, there is nothing illegal or unethical about any of the links that you discover. There are plenty of people linking to your site via these dark web links; they are simply doing so in a different fashion. deep web
2022年8月06日 23:52
Finally, make sure you do not link to any CVS or FTP site until you have done the appropriate research for doing so. dark web links
2022年8月07日 00:11
Therefore, if you visit any web site that has a lot of links pointing to it, then you are at high risk. dark web sites
2022年8月07日 00:29
Most people have become accustomed to clicking on links that appear to be legitimate and then being redirected to a site that is phony. If you get a warning message saying that your download is fraudulent, then don't proceed and contact the site operator. dark web
2022年8月07日 00:58
If you haven't heard already, ClickBank is a digital marketplace where you can find all sorts of items such as e-books, software, electronics, cell phones, music, video games, and other things that people sell or simply want to sell. work from home jobs
2022年8月07日 01:20
One way to do this is to write articles about the products that you're promoting. The information you provide needs to be factual and truthful. affiliate marketing success
2022年8月09日 06:59
I enjoyed reading this post such an interesting info post. Thanks for providing good info on the topic of 메이저카지노
2022年8月09日 07:49
Royalgreen by Allgreen Properties Limited. Hotline 61004343. Get Discounts, Direct Developer Price, Floor Plan, Price List, Brochure & More. royalgreen condo
2022年8月14日 04:52
This is a great article and great read for me✅. It's my first visit to your blog 파라오카지노
2022年8月19日 01:38
I was seeking this particular information for a very long time. ✅ I also have some information related to this Topic on my website Selling Credit Card Processing
2022年8月19日 04:16
Excellent article. I want to thank you for this informative read; I really appreciate sharing this great post. Keep up your work! Pyrodex RS
2022年8月21日 04:42
You amazingly have terrific article content. Cheers for sharing your blog site. Thank you for sharing this buy ultracet online
2022年8月22日 20:10
Startupo.fr est un site web qui propose des formations en ligne pour les entrepreneurs. Les cours sont divisés en trois niveaux : débutant, intermédiaire et expert. Chaque niveau contient plusieurs modules, et chaque module contient plusieurs leçons. Le niveau débutant est destiné aux personnes qui découvrent le monde de l'entrepreneuriat et aborde des sujets tels que le business plan et le marketing. Le niveau intermédiaire s'adresse à ceux qui ont une certaine expérience dans ce domaine et couvre des sujets tels que la planification financière et la gestion d'équipe. Le niveau expert est conçu pour ceux qui sont déjà des entrepreneurs expérimentés, et il couvre des sujets tels que le pitching aux investisseurs et la mise à l'échelle d'une entreprise. Startupo.fr propose également un cours sur Enlign, qui est un outil utilisé par les entrepreneurs pour gérer leur entreprise. Enlign est un logiciel qui aide les utilisateurs à suivre leurs progrès, à fixer des objectifs et à gérer leur temps. Il est disponible en version française et anglaise. Startupo.fr propose un essai gratuit d'Enlign afin que les utilisateurs puissent l'essayer avant de décider de l'acheter. Startupo.fr
2022年8月24日 21:54
I prefer merely excellent resources and you can see these in 인터넷바카라
Everything has its own value, but this is really precious information✅ shared by Author of 메이저사이트
2022年8月27日 02:48
Hyll On Holland is located at 91-95 Holland Road, District 10 of Singapore. The condo is freehold tenure, providing 319 units developed by Far East Consortium International Limited (FEC). hyll on holland condo
2022年12月27日 15:37
Of course, your article is good enough, but I thought it would be much better to see professional photos and videos together. There are articles and photos on these topics on my homepage, so please visit and share your opinions.
사설 카지노 제이나인
제이나인 소셜 카지노
카지노 게임 종류 제이나인
제이나인 카지노 먹튀 검증
호텔 카지노 제이나인
https://www.j9korea.com/
2023年2月07日 18:31
Hi there, I found your blog via Google while searching for such kinda informative post and your post looks very interesting for me. SEO