actions/checkout-go/main.go

28 lines
419 B
Go
Raw Normal View History

2024-12-30 12:40:05 +00:00
package main
import (
"fmt"
"os"
)
type Config struct {
Repository string
Ref string
Token string
Path string
}
func getConfig() Config {
return Config{
Repository: os.Getenv("INPUT_REPOSITORY"),
Ref: os.Getenv("INPUT_REF"),
Token: os.Getenv("INPUT_TOKEN"),
Path: os.Getenv("INPUT_PATH"),
}
}
func main() {
cfg := getConfig()
fmt.Printf("Config: %+v\n", cfg)
}