Skip to content
Snippets Groups Projects
classes.go 353 B
package ablib

import "strings"

var classes = map[string]string{
	"sp": "https://i4sp.informatik.uni-erlangen.de/rechneruebung/",
}

// SetupClass TODO
func (api *API) SetupClass(name string) (ok bool) {
	name = strings.TrimSpace(name)
	name = strings.ToLower(name)
	api.Base, ok = classes[name]
	api.Base = strings.TrimSuffix(api.Base, "/")
	return
}