some debugging code for preparing dev
This commit is contained in:
33
main.go
Normal file
33
main.go
Normal 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])
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user