Golang Local Build Package

Source: Internet
Author: User
This is a created article in which the information may have evolved or changed.

Talk a little nonsense.

For the small fat to do a warm hint of the function, ideas have been sorted out. Today, when using Goquery, the discovery has been modified. One of them needs a golang.org/x/net/html this package, but the official website has been GFW to the wall by the evil. Here are the following solutions, as well as a record of Golang's package management.

Begin

Golang package Management, mid-gauge pitch. After you set up Gopath, you only need to build bin,pkg,src three directories. SRC put the main source code.

As previously reported errors, cannot import golang.org/x/html, so we can only get this part of the package from GitHub, put into the project. To avoid get goquery time, and go to Golang official website to find.

Command:

 git clone  https://github.com/PuerkitoBio/goquery.git  golang.org/x/net

If you need to import a package command, go to build the package you just imported.
Then go get Github.com/puerkitobio/goquery is normal.

Write a piece of code in SRC and you can import the Goquery package normally.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.