Skip to content

Instantly share code, notes, and snippets.

package main
import (
"bufio"
"context"
"flag"
"fmt"
"log"
"net"
"net/url"
func main() {
flag.Parse()
log.Printf("Starting on port %d...", *port)
cli, err := client.NewEnvClient()
if err == nil {
_, err = cli.Ping(context.Background())
}
if err != nil {
@Component
public class FancyClass {
private final DockerClient dockerClient;
@Autowired
public FancyClass(DockerClient dockerClient) {
this.dockerClient = dockerClient;
}
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.sr.bankaccountmanager</groupId>
<artifactId>bankaccountmanager</artifactId>
<version>1.0-SNAPSHOT</version>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.sr.bankaccountmanager</groupId>
<artifactId>bankaccountmanager</artifactId>
<version>1.0-SNAPSHOT</version>