import "fmt"       The most commonly used form

import "./test"   Import into the same directory test Contents of the package

import f "fmt"     Import fmt, And give him a nickname f

import . "fmt"     take fmt Enable alias ".", So you can use the content directly , Instead of adding fmt, Such as fmt.Println It can be written directly as Println

import  _ "fmt"   Indicates that the package is not used , Just using the package init function , Don't show other content using the package .

Be careful : In this form import, When import It was carried out at the end of the day fmt In bag init function , You can't use other functions of the package .

go import More related articles recorded by using methods

  1. EF Check it out / Modify the current value of the entity 、 Raw and database values and rewriting SaveChanges Method to record the entity state

    Contents of this article View the current . Raw and database values :DbEntityEntry View an attribute value of an entity :GetValue<TValue> Method Copy DbPropertyValues To the entity :ToObject ...

  2. 64 position SQL Server2008 A link to access Oracle Process summary solution record

    64 position SQL Server2008 A link to access Oracle Process summary solution record After days of searching for information on the Internet , experiment , Finally connected . Environmental Science : System :win 2008 ,SqlServer2008 R2, Connect O ...

  3. js Practical methods record -js Dynamic loading css、js Script files

    js Practical methods record - Dynamic loading css/js A load is attached iframe,h5 open app Code 1. Dynamic loading js File to head Tag and execute the callback Method call :dynamicLoadJs('http://www.yi ...

  4. js Practical methods record - Simple cookie operation

    js Practical methods record - Simple cookie operation Set up cookie:setCookie( name , value , Storage time , Save domain ); obtain cookie:setCookie( name ); remove cookie:setCookie( name ...

  5. js Practical methods record - I don't know when it will be used js Method

    js Practical methods record - I don't know when it will be used js Method It's common or not Judge whether it is in wechat browser Test code :isWeiXin()==false /** * Whether in wechat */ function isWeix ...

  6. Give Way node Support es modularization (export、import) Methods

    node edition v7.9.0, Supported most of es6 The function of , But not yet es6 modularization (export.import). testing ES6 have access to es-checker To detect the current Node.js Yes ES6 Support for . Use life ...

  7. Thinkphp Of import Usage method

    Thinkphp Of import The main methods of use are as follows 4 Kind of , Write it down here for your reference . Link to the original text :http://www.jb51.net/article/51765.htm     thank . 1. Use a import( ...

  8. Java Record the execution time for each method

    Java Record the execution time for each method long startTime = System.currentTimeMillis();...// The way to test time LoggerFactory.getLogger(Bas ...

  9. Use Android to read sqlite Database method records

    It's going to come true recently android Read sqlite Database files , Here is an example of an English Chinese dictionary . Mainly input English into the database to query the corresponding Chinese meaning , Output the answer . Database adoption sqlite3. Pictured : The implementation process is completely in accordance with the reference ...

Random recommendation

  1. How to be in python Get time from ?

    from time import strftime date = strftime('%y%m%d') hour = strftime('%H%M%S')

  2. touches Get the coordinates of the finger click

    -(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObjec ...

  3. light oj 1116 - Ekka Dokka

    1116 - Ekka Dokka   PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 32 MB Ekka ...

  4. C Language is a computer science Python ( One )

    Python edition :3.6.4 Refer to the online tutorial :http://www.runoob.com/python3/python3-basic-syntax.html Here we go . The old rules of our business , Learning a new language ...

  5. Android by TV End to end assistance EventBus appear has no public methods called onEvent The problem of

    Caused by: de.greenrobot.event.EventBusException: Subscriber class com.hhzt.iptv.lvb_w.socket.MyMsgS ...

  6. MySQL Commonly used date time function

    Date and time functions : MySQL Three time zone settings in the server : ① System time zone --- Stored in system variables system_time_zone ② Server time zone --- Save in global system variables global.time_zone ③ Per client ...

  7. Linux Configure firewall , Turn on 80 port 、3306 port

    Linux Configure firewall , Turn on 80 port .3306 port   The reason is because I want to use Navicat Connect to the database , Found no connection Through consulting a lot of data and many tests, it is found that the firewall is not configured 3306 port Don't talk much , On and off , Empathy , ...

  8. logstash-jdbc-input And mysql Database synchronization

    In most cases, our data is stored in the database , however elasticsearch It has its own index library , So if we are doing a search, we need to synchronize the data in the database to elasticsearch in , Here we use logst ...

  9. Screen Common commands +VNC Start stop command summary

    screen -S name : Create a new session screen -r conversation ID: Restore one Detach State of the conversation screen -xr conversation ID: Force the restoration of a Attach State of the conversation , It's often used when the last conversation is not ...

  10. Mongodb cassandra and Mysql contrast

    MongoDBDB.Cassandra and Mysql contrast 1. Why Nosql? 1.1 Nosql Compared with relational database, big data processing has advantages 1.1.1                  1. Low latency ...