     if editor and editor.getPath()
       scope = editor.getCursorScopes()[0]
       if scope is 'source.go'
-        exec 'go fmt ' + editor.getPath(), (err, stderr, stdout) =>
+        cmd = atom.config.get('go-format.executable')
+        exec cmd + ' ' + editor.getPath(), (err, stderr, stdout) =>
           if not err or err.code is 0
             text = 'Saved.'
           else


module.exports =
  view: null

  activate: (state) ->
    @view = new GoFormatStatusView(state.viewState)


  attachEditor: (editor) ->
    atom.subscribe editor.getBuffer(), 'reloaded saved', =>
      if atom.config.get('go-format.formatOnSave')
        @format(editor)
    atom.subscribe editor.getBuffer(), 'destroyed', =>
      atom.unsubscribe(editor.getBuffer())

