~gjabell/mfn

7eaf9032bc8817241052b6ce09ffe131f2b9f21d — Galen Abell 1 year, 4 months ago 7fe5077
Fix null-pointer exception
2 files changed, 4 insertions(+), 2 deletions(-)

M config.go
M main.go
M config.go => config.go +3 -1
@@ 2,6 2,7 @@ package main

import (
	"fmt"
	"reflect"

	"github.com/BurntSushi/toml"
)


@@ 161,7 162,8 @@ func (c *Config) validate() error {
		"gotify":  c.GotifyConfig,
		"webhook": c.WebhookConfig,
	} {
		if v != nil {
		// interfaces + nil have an interesting interaction...
		if !reflect.ValueOf(v).IsNil() {
			if err := v.validate(); err != nil {
				return fmt.Errorf("invalid %s config: %s", k, err)
			}

M main.go => main.go +1 -1
@@ 13,7 13,7 @@ import (
	mf "miniflux.app/client"
)

var version = "0.1.0"
var version = "0.2.1"

type Mfn struct {
	conf      *Config