Created
October 22, 2020 19:43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
load("@io_bazel_rules_go//go:def.bzl", "go_binary") | |
go_binary( | |
name = "hello", | |
srcs = ["hello.go"], | |
deps = ["@com_github_mattn_go_sqlite3//:go_default_library"] | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
_ "github.com/mattn/go-sqlite3" | |
) | |
func main() { | |
fmt.Println("vim-go") | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
workspace(name = "test") | |
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | |
http_archive( | |
name = "io_bazel_rules_go", | |
sha256 = "ac03931e56c3b229c145f1a8b2a2ad3e8d8f1af57e43ef28a26123362a1e3c7e", | |
urls = [ | |
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.24.4/rules_go-v0.24.4.tar.gz", | |
"https://github.com/bazelbuild/rules_go/releases/download/v0.24.4/rules_go-v0.24.4.tar.gz", | |
], | |
) | |
http_archive( | |
name = "bazel_gazelle", | |
sha256 = "b85f48fa105c4403326e9525ad2b2cc437babaa6e15a3fc0b1dbab0ab064bc7c", | |
urls = [ | |
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.22.2/bazel-gazelle-v0.22.2.tar.gz", | |
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.22.2/bazel-gazelle-v0.22.2.tar.gz", | |
], | |
) | |
load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies") | |
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository") | |
go_rules_dependencies() | |
go_register_toolchains() | |
gazelle_dependencies() | |
go_repository( | |
name = "com_github_mattn_go_sqlite3", | |
importpath = "github.com/mattn/go-sqlite3", | |
sum = "h1:jbhqpg7tQe4SupckyijYiy0mJJ/pRyHvXf7JdWK860o=", | |
version = "v1.10.0", | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Related issue bazel-contrib/rules_go#2685