// Path: src/main/java/org/echocat/gradle/plugins/golang/utils/Executor.java
// @Nonnull
// public static Executor executor(@Nonnull String executable) {
//     return executor(Paths.get(executable).toAbsolutePath());
// }
// 
// Path: src/main/java/org/echocat/gradle/plugins/golang/utils/FileUtils.java
// @Nullable
// public static Path toPath(@Nullable String plain) {
//     return plain != null ? Paths.get(plain) : null;
// }


import org.gradle.api.Project;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.inject.Inject;
import java.io.IOException;
import java.net.URI;
import java.nio.file.Path;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static java.nio.file.Files.isExecutable;
import static java.util.regex.Pattern.compile;
import static org.echocat.gradle.plugins.golang.model.OperatingSystem.WINDOWS;
import static org.echocat.gradle.plugins.golang.model.OperatingSystem.currentOperatingSystem;
import static org.echocat.gradle.plugins.golang.utils.Executor.executor;
import static org.echocat.gradle.plugins.golang.utils.FileUtils.toPath;
    }

    public void setBootstrapGoroot(Path bootstrapGoroot) {
        _bootstrapGoroot = bootstrapGoroot;
    }

    public void setBootstrapGoroot(String bootstrapGoroot) {
        setBootstrapGoroot(toPath(bootstrapGoroot));
    }

    public URI getDownloadUriRoot() {
        return _downloadUriRoot;
    }

    public void setDownloadUriRoot(URI downloadUriRoot) {
        _downloadUriRoot = downloadUriRoot;
    }

    public void setDownloadUriRoot(String downloadUriRoot) {
        setDownloadUriRoot(downloadUriRoot != null ? URI.create(downloadUriRoot) : null);
    }

    @Nullable
    public String goBinaryVersionOf(Path goroot) {
        final Path goBinary = goBinaryOf(goroot);
        if (!isExecutable(goBinary)) {
            return null;
        }
        final String stdout;
        try {
// Path: src/main/java/org/echocat/gradle/plugins/golang/utils/Executor.java
// @Nonnull
// public static Executor executor(@Nonnull String executable) {
//     return executor(Paths.get(executable).toAbsolutePath());
// }
// 
// Path: src/main/java/org/echocat/gradle/plugins/golang/utils/FileUtils.java
// @Nullable
// public static Path toPath(@Nullable String plain) {
//     return plain != null ? Paths.get(plain) : null;
// }


// Path: src/main/java/org/echocat/gradle/plugins/golang/model/ToolchainSettings.java
import org.gradle.api.Project;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.inject.Inject;
import java.io.IOException;
import java.net.URI;
import java.nio.file.Path;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static java.nio.file.Files.isExecutable;
import static java.util.regex.Pattern.compile;
import static org.echocat.gradle.plugins.golang.model.OperatingSystem.WINDOWS;
import static org.echocat.gradle.plugins.golang.model.OperatingSystem.currentOperatingSystem;
import static org.echocat.gradle.plugins.golang.utils.Executor.executor;
import static org.echocat.gradle.plugins.golang.utils.FileUtils.toPath;

    }

    public void setBootstrapGoroot(Path bootstrapGoroot) {
        _bootstrapGoroot = bootstrapGoroot;
    }

    public void setBootstrapGoroot(String bootstrapGoroot) {
        setBootstrapGoroot(toPath(bootstrapGoroot));
    }

    public URI getDownloadUriRoot() {
        return _downloadUriRoot;
    }

    public void setDownloadUriRoot(URI downloadUriRoot) {
        _downloadUriRoot = downloadUriRoot;
    }

    public void setDownloadUriRoot(String downloadUriRoot) {
        setDownloadUriRoot(downloadUriRoot != null ? URI.create(downloadUriRoot) : null);
    }

    @Nullable
    public String goBinaryVersionOf(Path goroot) {
        final Path goBinary = goBinaryOf(goroot);
        if (!isExecutable(goBinary)) {
            return null;
        }
        final String stdout;
        try {
            stdout = executor(goBinary)