最新章節(jié)
書友吧品牌:中圖公司
上架時(shí)間:2021-07-02 18:07:33
出版社:Packt Publishing
本書數(shù)字版權(quán)由中圖公司提供,并由其授權(quán)上海閱文信息技術(shù)有限公司制作發(fā)行
- Summary 更新時(shí)間:2021-07-02 18:08:46
- Exercises
- An RPC client
- An RPC server
- Remote procedure call (RPC)
- A concurrent TCP server
- Developing a simple UDP client
- Developing a simple UDP server
- Using alternative functions for the TCP client
- Using other functions for the TCP server
- Developing a simple TCP client
- Developing a simple TCP server
- Getting NS records for a domain
- Using a host name as input
- Using an IP address as input
- Performing DNS lookups
- A Unix socket client
- A Unix socket server
- Unix sockets revisited
- The net Go standard package
- About the netcat utility
- About Wireshark and tshark
- About UDP and IP
- The TCP handshake!
- About TCP
- About TCP/IP
- About network programming
- Network Programming
- Summary
- Exercises
- A handy command-line utility
- Creating an application that displays MySQL data
- Creating a Go application that displays MongoDB data
- Using the MongoDB Go driver
- Basic MongoDB administration
- Using MongoDB
- Using Marshal() and Unmarshal()
- Parsing JSON data
- Saving JSON data
- About JSON
- The html/template package
- Using http.ServeMux
- The http.ServeMux type
- A small web server
- Developing better web clients
- Setting a timeout
- Fetching a single URL
- Developing web clients
- About the net/http Go package
- What is a web application?
- Writing Web Applications in Go
- Summary
- Exercises
- About GOMAXPROCS
- Detecting race conditions
- More benchmarking
- Using shared memory
- Using a buffered channel
- The dWC.go utility revisited
- Using sync.RWMutex
- Using sync.Mutex
- Shared memory
- Nil channels
- Channels of channels
- An alternative way to implement timeouts
- About timeouts
- Buffered channels
- Signal channels
- The select keyword
- The sync Go package
- The Go scheduler
- Goroutines - Advanced Features
- Summary
- Exercises
- Doing some benchmarking
- Calculating totals
- A better version of wc.go
- Pipelines
- Explaining h1s.go
- Reading from a channel
- Writing to a channel
- About channels
- Creating a dynamic number of goroutines
- Waiting for goroutines to finish their jobs
- Creating multiple goroutines
- A simple example
- The sync Go packages
- Concurrency and parallelism
- About goroutines
- Goroutines - Basic Features
- Summary
- Exercises
- Yet another minor Go update
- Programming a Unix shell in Go
- RPC in Go
- Unix sockets in Go
- The plotIP.go utility revisited
- Implementing cat(1) in Go
- Sending data to standard output
- Reading from standard input
- Unix pipes in Go
- Plotting data
- Improving file copying
- Rotating log files revisited!
- Catching every signal that can be handled
- Handling three different signals!
- A simple signal handler in Go
- The kill(1) command
- Unix signals in Go
- About Unix signals
- Process management
- About Unix processes and signals
- Processes and Signals
- Summary
- Exercises
- Another Go update
- Creating good random passwords
- Rotating log files
- Reformatting the times in a log file
- Playing with dates and times
- Date and time operations
- Finding files based on their permissions
- Finding files that belong or do not belong to a given user
- Finding all the groups a user belongs to
- Finding the user ID of a user
- Searching files revisited
- Renaming multiple files using regular expressions
- An advanced example of pattern matching
- A simple pattern matching example
- More pattern matching examples
- Finding other kinds of information about files
- Changing file permissions
- File permissions revisited
- Processing log files
- The syslog Go package
- Logging levels
- Logging facilities
- About logging
- About log files
- Altering existing data
- Putting data at the end of a file
- Logging in Go
- Which files are considered system files?
- Working with System Files
- Summary
- Exercises
- A simplified Go version of the dd utility
- File locking in Go
- Reading and writing data records
- Sparse files in Go
- Interprocess communication
- Doing some file editing!
- Reading a text file character by character
- Comparing the performance of wc.go and wc(1)
- The wc.go code!
- Counting words
- Developing wc(1) in Go
- Benchmarking file copying operations
- An even better file copy program
- Reading a file all at once!
- Using io.Copy
- Copying text files
- There is more than one way to copy a file!
- Copying files in Go
- Finding out the third column of a line
- About io.Writer and io.Reader
- Writing to files using fmt.Fprintf()
- File I/O operations
- The bufio package
- The io package
- Useful I/O packages in Go
- About binary files
- Byte slices
- About file input and output
- File Input and Output
- Summary
- Exercises
- Creating a copy of a directory structure
- Using regular expressions
- Excluding a file extension from the find output
- Excluding filenames from the find output
- Adding some command-line options
- The first version of find(1)
- Visiting directories only!
- Traversing a directory tree
- Developing find(1) in Go
- Renaming and moving files
- Deleting a file
- Dealing with files in Go
- Printing the permission bits of a file or directory
- Developing the which(1) utility in Go
- Implementing the pwd(1) command
- About symbolic links
- Dealing with directories
- The flag package
- Command-line arguments revisited!
- Useful Go packages
- Files and Directories
- Summary
- Exercises
- Go gets updated frequently!
- Your environment
- Garbage collection
- The go clean command
- Using external Go packages
- Using your own Go packages
- The init() function
- Private variables and functions
- Creating your own packages
- Using standard Go packages
- About Go packages
- Developing a hash table in Go
- Trees in Go
- Linked lists in Go
- The sort.Slice() function
- Sorting algorithms
- The Big O notation
- About algorithms
- Go Packages Algorithms and Data Structures
- Summary
- Exercises
- Avoiding common Go mistakes
- Unreachable code
- Disabling System Integrity Protection on macOS
- The DTrace utility
- Using the strace(1) command-line utility
- Analysing software
- Comparing Go to other programming languages
- Unsafe code
- Calling C code from Go
- Reflection
- Find and replace
- Finding the number of occurrences
- Creating summaries
- Printing all the values from a given column of a line
- Pattern matching and regular expressions
- The addCLA.go program revisited
- About error logging
- Functions can return error variables
- Error handling in Go
- Advanced Go Features
- Summary
- Exercises
- Creating random numbers
- Interfaces
- Structures
- Converting an array into a map
- Maps
- Slices
- Arrays
- Go data structures
- Using pointer variables in functions
- The defer keyword
- Illustrating Go functions
- Anonymous functions
- Naming the return values of a Go function
- Go functions
- Printing output
- Getting user input
- User input and output
- Finding the sum of the command-line arguments
- Using command-line arguments
- Go environment variables
- Checking the size of the executable file
- Compiling Go code
- Writing Programs in Go
- Summary
- Exercises
- The various states of a Unix process
- Advantages and disadvantages of Go
- Two useful Go tools
- Getting ready for Go
- About Go
- Learning systems programming
- What is systems programming?
- The structure of the book
- Getting Started with Go and Unix Systems Programming
- Questions
- Piracy
- Errata
- Downloading the color images of this book
- Downloading the example code
- Customer support
- Reader feedback
- Conventions
- Who this book is for
- What you need for this book
- What this book covers
- Preface
- Customer Feedback
- Why subscribe?
- www.PacktPub.com
- About the Reviewer
- About the Author
- Credits
- Go Systems Programming
- Copyright
- Title Page
- cover
- cover
- Title Page
- Copyright
- Go Systems Programming
- Credits
- About the Author
- About the Reviewer
- www.PacktPub.com
- Why subscribe?
- Customer Feedback
- Preface
- What this book covers
- What you need for this book
- Who this book is for
- Conventions
- Reader feedback
- Customer support
- Downloading the example code
- Downloading the color images of this book
- Errata
- Piracy
- Questions
- Getting Started with Go and Unix Systems Programming
- The structure of the book
- What is systems programming?
- Learning systems programming
- About Go
- Getting ready for Go
- Two useful Go tools
- Advantages and disadvantages of Go
- The various states of a Unix process
- Exercises
- Summary
- Writing Programs in Go
- Compiling Go code
- Checking the size of the executable file
- Go environment variables
- Using command-line arguments
- Finding the sum of the command-line arguments
- User input and output
- Getting user input
- Printing output
- Go functions
- Naming the return values of a Go function
- Anonymous functions
- Illustrating Go functions
- The defer keyword
- Using pointer variables in functions
- Go data structures
- Arrays
- Slices
- Maps
- Converting an array into a map
- Structures
- Interfaces
- Creating random numbers
- Exercises
- Summary
- Advanced Go Features
- Error handling in Go
- Functions can return error variables
- About error logging
- The addCLA.go program revisited
- Pattern matching and regular expressions
- Printing all the values from a given column of a line
- Creating summaries
- Finding the number of occurrences
- Find and replace
- Reflection
- Calling C code from Go
- Unsafe code
- Comparing Go to other programming languages
- Analysing software
- Using the strace(1) command-line utility
- The DTrace utility
- Disabling System Integrity Protection on macOS
- Unreachable code
- Avoiding common Go mistakes
- Exercises
- Summary
- Go Packages Algorithms and Data Structures
- About algorithms
- The Big O notation
- Sorting algorithms
- The sort.Slice() function
- Linked lists in Go
- Trees in Go
- Developing a hash table in Go
- About Go packages
- Using standard Go packages
- Creating your own packages
- Private variables and functions
- The init() function
- Using your own Go packages
- Using external Go packages
- The go clean command
- Garbage collection
- Your environment
- Go gets updated frequently!
- Exercises
- Summary
- Files and Directories
- Useful Go packages
- Command-line arguments revisited!
- The flag package
- Dealing with directories
- About symbolic links
- Implementing the pwd(1) command
- Developing the which(1) utility in Go
- Printing the permission bits of a file or directory
- Dealing with files in Go
- Deleting a file
- Renaming and moving files
- Developing find(1) in Go
- Traversing a directory tree
- Visiting directories only!
- The first version of find(1)
- Adding some command-line options
- Excluding filenames from the find output
- Excluding a file extension from the find output
- Using regular expressions
- Creating a copy of a directory structure
- Exercises
- Summary
- File Input and Output
- About file input and output
- Byte slices
- About binary files
- Useful I/O packages in Go
- The io package
- The bufio package
- File I/O operations
- Writing to files using fmt.Fprintf()
- About io.Writer and io.Reader
- Finding out the third column of a line
- Copying files in Go
- There is more than one way to copy a file!
- Copying text files
- Using io.Copy
- Reading a file all at once!
- An even better file copy program
- Benchmarking file copying operations
- Developing wc(1) in Go
- Counting words
- The wc.go code!
- Comparing the performance of wc.go and wc(1)
- Reading a text file character by character
- Doing some file editing!
- Interprocess communication
- Sparse files in Go
- Reading and writing data records
- File locking in Go
- A simplified Go version of the dd utility
- Exercises
- Summary
- Working with System Files
- Which files are considered system files?
- Logging in Go
- Putting data at the end of a file
- Altering existing data
- About log files
- About logging
- Logging facilities
- Logging levels
- The syslog Go package
- Processing log files
- File permissions revisited
- Changing file permissions
- Finding other kinds of information about files
- More pattern matching examples
- A simple pattern matching example
- An advanced example of pattern matching
- Renaming multiple files using regular expressions
- Searching files revisited
- Finding the user ID of a user
- Finding all the groups a user belongs to
- Finding files that belong or do not belong to a given user
- Finding files based on their permissions
- Date and time operations
- Playing with dates and times
- Reformatting the times in a log file
- Rotating log files
- Creating good random passwords
- Another Go update
- Exercises
- Summary
- Processes and Signals
- About Unix processes and signals
- Process management
- About Unix signals
- Unix signals in Go
- The kill(1) command
- A simple signal handler in Go
- Handling three different signals!
- Catching every signal that can be handled
- Rotating log files revisited!
- Improving file copying
- Plotting data
- Unix pipes in Go
- Reading from standard input
- Sending data to standard output
- Implementing cat(1) in Go
- The plotIP.go utility revisited
- Unix sockets in Go
- RPC in Go
- Programming a Unix shell in Go
- Yet another minor Go update
- Exercises
- Summary
- Goroutines - Basic Features
- About goroutines
- Concurrency and parallelism
- The sync Go packages
- A simple example
- Creating multiple goroutines
- Waiting for goroutines to finish their jobs
- Creating a dynamic number of goroutines
- About channels
- Writing to a channel
- Reading from a channel
- Explaining h1s.go
- Pipelines
- A better version of wc.go
- Calculating totals
- Doing some benchmarking
- Exercises
- Summary
- Goroutines - Advanced Features
- The Go scheduler
- The sync Go package
- The select keyword
- Signal channels
- Buffered channels
- About timeouts
- An alternative way to implement timeouts
- Channels of channels
- Nil channels
- Shared memory
- Using sync.Mutex
- Using sync.RWMutex
- The dWC.go utility revisited
- Using a buffered channel
- Using shared memory
- More benchmarking
- Detecting race conditions
- About GOMAXPROCS
- Exercises
- Summary
- Writing Web Applications in Go
- What is a web application?
- About the net/http Go package
- Developing web clients
- Fetching a single URL
- Setting a timeout
- Developing better web clients
- A small web server
- The http.ServeMux type
- Using http.ServeMux
- The html/template package
- About JSON
- Saving JSON data
- Parsing JSON data
- Using Marshal() and Unmarshal()
- Using MongoDB
- Basic MongoDB administration
- Using the MongoDB Go driver
- Creating a Go application that displays MongoDB data
- Creating an application that displays MySQL data
- A handy command-line utility
- Exercises
- Summary
- Network Programming
- About network programming
- About TCP/IP
- About TCP
- The TCP handshake!
- About UDP and IP
- About Wireshark and tshark
- About the netcat utility
- The net Go standard package
- Unix sockets revisited
- A Unix socket server
- A Unix socket client
- Performing DNS lookups
- Using an IP address as input
- Using a host name as input
- Getting NS records for a domain
- Developing a simple TCP server
- Developing a simple TCP client
- Using other functions for the TCP server
- Using alternative functions for the TCP client
- Developing a simple UDP server
- Developing a simple UDP client
- A concurrent TCP server
- Remote procedure call (RPC)
- An RPC server
- An RPC client
- Exercises
- Summary 更新時(shí)間:2021-07-02 18:08:46