Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
github.com/mrojasb2000/hands-on-full-stack-development-with-go
Hands-On Full Stack Development with Go
Preface
The Go programming language has been rapidy adopted by developers for building web applications. With its impressive performance and ease of development,
Chapter 2, h3. Go's Building Blocks.
For you to write Go code on your computer, you need to set up a Go workspace. A Go workspace is a folder where you will write your Go code. Setting up a Go workspace is relatively simple.
1.- First, make sure that you have Go installed. As we mentioned earlier, you can download and install Go site http://golang.org
2.- After installing Go, create a new folder in your computer for Go's workspace. Mine is called GoProjects.
3.- Inside your Go workspace folder, you will have to create three main folders: src, pkg, bin. It is very important to create folders with these exact names inside your Go workspace folder.
4.- You will need to set two environment variables:
The first enviroment variable is called GoRoot, and will include the path to your Go install. GoRoot should tipically be taken care of by the Go installer. Howwever, if it's missing, or you would like to move your Go installation to a different place, then you need to set GoRoot.
The second environment variable is called GoPath. GoPath includes the path to your Go workspace folder. By default, if not set, GoPath is assumed to either to be as $HOME/go on Unix systems or %USERPROFILE%\go Windows.
5.- Create folder $GoPath/example $ mkdir -p $GoPath/example
6.- Create file main.go in $GoPath/example $ touch $GoPath/example/main.go
7.- Edit Go file and add basic code Go.
package main
import "fmt"
func main() { fmt.Println("Hello World!") }
8.- To compile a Go program, you will need to navigate to the folder where your main package lives and the type the following command:
$ cd $GoPath/example $ go install
This command will compile your Go program and then place the resulting binary in the bin folder of youe workspace.
Alternatively, you can run the following command: $ cd $GoPath/example $ go build
This command will compile and then deploy the resulting binary in the current folder.
Chapter 3, h3. Go Concurrency
Chapter 4, h3. Frontend with React.js
Chapter 5, h3. Building a Frontend for GoMusic
Chapter 6, h3. RESTful Web APIs in Go with the Gin
Chapter 7, h3. Advanced Web Go Applications with Gin and React
Chapter 8, h3. Testing and Benchmarking Your Web API
Chapter 9, h3. Introduction to Isomorphic Go with GopherJS
Chapter 10, h3. Where to Go from here?
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.