Add Role constructor
This commit is contained in:
parent
d0f7047fcf
commit
2f5421a5c9
|
@ -18,6 +18,11 @@ type Role struct {
|
||||||
Object string
|
Object string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// R is shorthand for creating a Role structure.
|
||||||
|
func R (pack, object string) Role {
|
||||||
|
return Role { Package: pack, Object: object }
|
||||||
|
}
|
||||||
|
|
||||||
// Theme is an object that can apply a visual style to different objects.
|
// Theme is an object that can apply a visual style to different objects.
|
||||||
type Theme interface {
|
type Theme interface {
|
||||||
// Apply applies the theme to the given object, according to the given
|
// Apply applies the theme to the given object, according to the given
|
||||||
|
|
Loading…
Reference in New Issue