%% Listings definition for Go language
%% Go language reference : http://www.golang.org
%% Author : Uriel Corfa <uriel@corfa.fr>
%% Project home: https://bitbucket.org/korfuri/golang-latex-listings

\ProvidesFile{lstlang0.sty}
             [2012/04/13 1.1 listings language file for GoLang]
\lst@definelanguage{Go}{
  % Keywords as defined in the BNF
  morekeywords=[1]{break,default,func,interface,%
    case,defer,go,map,struct,chan,else,goto,package,%
    switch,const,fallthrough,if,range,type,continue,%
    for,import,return,var,select},
  % Special identifiers, builtin functions
  morekeywords=[2]{make,new,nil,len,cap,copy,complex,%
    real,imag,panic,recover,print,println,iota,close,%
    closed,_,true,false,append,delete},
  % Basic types
  morekeywords=[3]{%
    string,int,uint,uintptr,double,float,byte,%
    int8,int16,int32,int64,int128,%
    uint8,uint16,uint32,uint64,uint128,%
    float32,float64,complex64,complex128,%
    rune},
  % Strings : "toto", 'toto', `toto`
  morestring=[b]{"},
  morestring=[b]{'},
  morestring=[b]{`},
  % Comments : /* comment */ and // comment
  comment=[l]{//},
  morecomment=[s]{/*}{*/},
  % Options
  sensitive=true
}
\endinput
