initial import

This commit is contained in:
Helmut Merz 2023-05-31 22:38:48 +02:00
commit c42569e7b0
7 changed files with 55 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
bin*

13
examples/demo/etc/etc.go Normal file
View file

@ -0,0 +1,13 @@
package etc
import "git.sr.ht/~cco/go-scopes"
func Config() *scopes.Config {
return &scopes.Config{
Name: "dummy",
}
}
const (
NAME = "name"
)

View file

@ -0,0 +1,7 @@
package etc
func Override() map[string]string {
return map[string]string{
NAME: "overridden",
}
}

7
examples/demo/go.mod Normal file
View file

@ -0,0 +1,7 @@
module demo
go 1.20
require git.sr.ht/~cco/go-scopes v0.1.20
replace git.sr.ht/~cco/go-scopes => ../../../go-scopes

16
examples/demo/main.go Normal file
View file

@ -0,0 +1,16 @@
package main
import (
"fmt"
"demo/etc"
"git.sr.ht/~cco/go-scopes"
)
func main() {
fmt.Println("vim-go")
scopes.Setup()
fmt.Println(etc.Config().Name)
fmt.Println(etc.Override()["name"])
}

3
go.mod Normal file
View file

@ -0,0 +1,3 @@
module git.sr.ht/~cco/go-scopes
go 1.20

8
scopes.go Normal file
View file

@ -0,0 +1,8 @@
package scopes
type Config struct {
Name string
}
func Setup() {
}