some debugging code for preparing dev

This commit is contained in:
2024-02-20 22:13:34 +01:00
parent b6072c46db
commit e06a85360f
3 changed files with 103 additions and 0 deletions

33
main.go Normal file
View File

@@ -0,0 +1,33 @@
package main
import (
"code.gitea.io/sdk/gitea"
"fmt"
"os"
"strings"
)
func main() {
fmt.Println("hello")
client, err := gitea.NewClient("https://gitea.champs-libres.be")
if nil != err {
fmt.Println("could not create a client, {}", err)
}
repos, _, err := client.ListOrgRepos("Chill-project", gitea.ListOrgReposOptions{})
if nil != err {
fmt.Printf("could not list repos, %#v\n", err.Error())
}
for _, repo := range repos {
fmt.Printf("repository: %v\n", repo.FullName)
}
for _, e := range os.Environ() {
pair := strings.SplitN(e, "=", 2)
fmt.Println(pair[0])
}
}