Skip to content

Commit

Permalink
Add missing godocs
Browse files Browse the repository at this point in the history
  • Loading branch information
muesli committed Jun 8, 2021
1 parent 787c979 commit 4529324
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ func (c DeckConfig) Save(filename string) error {
return ioutil.WriteFile(filename, b.Bytes(), 0600)
}

// ConfigValue tries to convert an interface{} to the desired type.
func ConfigValue(v interface{}, dst interface{}) error {
switch d := dst.(type) {
case *string:
Expand Down
1 change: 1 addition & 0 deletions widget_button.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ type ButtonWidget struct {
fontsize float64
}

// NewButtonWidget returns a new ButtonWidget.
func NewButtonWidget(bw BaseWidget, opts WidgetConfig) (*ButtonWidget, error) {
bw.setInterval(opts.Interval, 0)

Expand Down
1 change: 1 addition & 0 deletions widget_recent_window.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ type RecentWindowWidget struct {
lastClass string
}

// NewRecentWindowWidget returns a new RecentWindowWidget.
func NewRecentWindowWidget(bw BaseWidget, opts WidgetConfig) (*RecentWindowWidget, error) {
var window int64
if err := ConfigValue(opts.Config["window"], &window); err != nil {
Expand Down

0 comments on commit 4529324

Please sign in to comment.