Home >Common Problem >How many keywords are there in golang?
There are 25 golang keywords, namely: 1. break; 2. default; 3. func; 4. interface; 5. select; 6. case; 7. chan; 8. const; 9. continue; 10, defer; 11, go; 12, map; 13, struct; 14, else; 15, goto; 16, package; 17, switch; 18, fallthrough, etc.
The operating environment of this article: Windows 10 system, go1.20 version, dell g3 computer.
There are 25 golang keywords, which are:
break: exit the loop
default: select the structure default item (switch, select)
func: Define function
interface: Define interface
select :channel
case: select structure tag
chan: define channel
const: constant
continue: skip this loop
defer: delay execution content (finishing work)
go: Concurrent execution
map: map type
struct: define structure
else: select structure
goto: jump statement
package: package
The above is the detailed content of How many keywords are there in golang?. For more information, please follow other related articles on the PHP Chinese website!