From 2afd11581ce8d48ec1bac04963fb5dcaceea129e Mon Sep 17 00:00:00 2001 From: Niklas Fasching Date: Tue, 8 Oct 2019 22:25:35 +0200 Subject: [PATCH] Use document.ReadFile to read #+SETUPFILE Now that we allow providing a custom ReadFile implementation we should use it everywhere we read files. --- org/keyword.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/org/keyword.go b/org/keyword.go index 785b04a..6909630 100644 --- a/org/keyword.go +++ b/org/keyword.go @@ -2,7 +2,6 @@ package org import ( "bytes" - "io/ioutil" "path/filepath" "regexp" "strings" @@ -143,7 +142,7 @@ func (d *Document) loadSetupFile(k Keyword) (int, Node) { if !filepath.IsAbs(path) { path = filepath.Join(filepath.Dir(d.Path), path) } - bs, err := ioutil.ReadFile(path) + bs, err := d.ReadFile(path) if err != nil { d.Log.Printf("Bad setup file: %#v: %s", k, err) return 1, k