首页 > 技术文章 > 给go添加各种package

x-radish 2013-09-26 12:57 原文

go version 1.1.2

  For example you need to install the webscoket pakeage

  try 
         go get code.google.com/p/go.net/websocket
  catch

         $GOPATH no set? 
              that you need set the GOPATH in the system environment variables and this path should in golang directory

         no Mercurial?

              download it

   now try go get ... again.

   find the file in your GOPATH and make it like golang original file structure  src->pkg->*  (pkg is added by myself)

  

推荐阅读