refactor
This commit is contained in:
parent
aa479f5054
commit
e74dcc806d
|
@ -12,7 +12,7 @@
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
// Editor manipulations.
|
// Package editor includes editor related manipulations.
|
||||||
package editor
|
package editor
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@ -224,9 +224,9 @@ func GetExprInfoHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
// glog.Infof("offset [%d]", offset)
|
// glog.Infof("offset [%d]", offset)
|
||||||
|
|
||||||
ide_stub := util.Go.GetExecutableInGOBIN("ide_stub")
|
ideStub := util.Go.GetExecutableInGOBIN("ide_stub")
|
||||||
argv := []string{"type", "-cursor", filename + ":" + strconv.Itoa(offset), "-info", "."}
|
argv := []string{"type", "-cursor", filename + ":" + strconv.Itoa(offset), "-info", "."}
|
||||||
cmd := exec.Command(ide_stub, argv...)
|
cmd := exec.Command(ideStub, argv...)
|
||||||
cmd.Dir = curDir
|
cmd.Dir = curDir
|
||||||
|
|
||||||
setCmdEnv(cmd, username)
|
setCmdEnv(cmd, username)
|
||||||
|
@ -300,9 +300,9 @@ func FindDeclarationHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
// glog.Infof("offset [%d]", offset)
|
// glog.Infof("offset [%d]", offset)
|
||||||
|
|
||||||
ide_stub := util.Go.GetExecutableInGOBIN("ide_stub")
|
ideStub := util.Go.GetExecutableInGOBIN("ide_stub")
|
||||||
argv := []string{"type", "-cursor", filename + ":" + strconv.Itoa(offset), "-def", "."}
|
argv := []string{"type", "-cursor", filename + ":" + strconv.Itoa(offset), "-def", "."}
|
||||||
cmd := exec.Command(ide_stub, argv...)
|
cmd := exec.Command(ideStub, argv...)
|
||||||
cmd.Dir = curDir
|
cmd.Dir = curDir
|
||||||
|
|
||||||
setCmdEnv(cmd, username)
|
setCmdEnv(cmd, username)
|
||||||
|
@ -384,9 +384,9 @@ func FindUsagesHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
offset := getCursorOffset(code, line, ch)
|
offset := getCursorOffset(code, line, ch)
|
||||||
// glog.Infof("offset [%d]", offset)
|
// glog.Infof("offset [%d]", offset)
|
||||||
|
|
||||||
ide_stub := util.Go.GetExecutableInGOBIN("ide_stub")
|
idestub := util.Go.GetExecutableInGOBIN("ide_stub")
|
||||||
argv := []string{"type", "-cursor", filename + ":" + strconv.Itoa(offset), "-use", "."}
|
argv := []string{"type", "-cursor", filename + ":" + strconv.Itoa(offset), "-use", "."}
|
||||||
cmd := exec.Command(ide_stub, argv...)
|
cmd := exec.Command(ideStub, argv...)
|
||||||
cmd.Dir = curDir
|
cmd.Dir = curDir
|
||||||
|
|
||||||
setCmdEnv(cmd, username)
|
setCmdEnv(cmd, username)
|
||||||
|
|
Loading…
Reference in New Issue