'전체 글'에 해당되는 글 93건

LITE IDE setup

Go 2015. 1. 28. 12:58

https://github.com/visualfc/liteide/blob/master/liteidex/deploy/welcome/en/install.md

* MAC OS X 사용


1. ./update_pkg.sh

./update_pkg.sh 하는순간

../liteide-master/liteidex/src/golang.org/x/tools/astutil (from $GOPATH)

이런 에러를 경험한다.

일단 $GOPATH를 ~~~/liteide-master/liteidex 로 잡아준뒤

go get golang.org/x/tools/go/ast/astutil

로 패키지 설치해줌

그런뒤 실행해보면 똑같은 에러를 경험할 것이다. 자세히 보면

../liteide-master/liteidex/src/golang.org/x/tools/go/ast/astutil

설치는 여기 되어있는데 이상한데서 찾고있음

소스코드가 업데이트 중이라는데 아직 반영안됬나봄 짱나서 그냥 심링크 걸어줌

ln -s /Users/ytkang/liteide-master/liteidex/src/golang.org/x/tools/go/ast/astutil /Users/ytkang/liteide-master/liteidex/src/golang.org/x/tools/astutil


그리고 실행하면 이런 에러를 맞본다

liteidex/src/golang.org/x/tools/astutil expects import "golang.org/x/tools/go/ast/astutil"

코드 다 찾아가서 import "golang.org/x/tools/go/ast/astutil" 로 바꿔줌 (파일 2개밖에 안됨)

이제 ./update_pkg.sh 통과.


2. ./build_osx.sh

이거 할려면 QT SDK를 깔아야되는데 망할 다운로드 페이지가 열리지 않는다. QT Creator를 깔았는데 폴더 구조가 맞지 않음 ==;;

그래서 아직 진행중.. 데밋! IDE까는게 왜케 힘들어!


'Go' 카테고리의 다른 글

Goroutine context switching 시점  (0) 2018.04.20
How to run go app in heroku by your own project (with github)  (0) 2017.02.24
cannot download, $GOPATH not set  (0) 2015.01.28
블로그 이미지

시간을 거스르는자

,

http://golang.org/doc/code.html

이걸 따라하고나면 GOPATH는 잡혀있을 것이다.

근데 자꾸 없다고 난리리. 문제는 sudo로 실행해서 그런것!

permission 문제는 아래 명령어로 해결해준다.

sudo chown -R "$USER:" "$GOPATH"


References

1. http://stackoverflow.com/questions/24778565/go-go-get-gopath-error-when-gopath-is-set

2. http://stackoverflow.com/questions/21463261/package-download-fails-gopath-not-set-why

'Go' 카테고리의 다른 글

Goroutine context switching 시점  (0) 2018.04.20
How to run go app in heroku by your own project (with github)  (0) 2017.02.24
LITE IDE setup  (0) 2015.01.28
블로그 이미지

시간을 거스르는자

,

import pytz

import datetime

import calendar


s = '2012/01/10 23:00'

def get_timezone_offset_ms(timezone_name):

    try:

        tz = pytz.timezone(timezone_name)

    except Exception as e:

        return 0

    timezone_offset = datetime.datetime.now(tz).strftime('%z')

    offset_sign = timezone_offset[0:1]

    offset_hour = int(offset_sign+timezone_offset[1:3])

    offset_min = int(offset_sign+timezone_offset[3:])

    offset_ms = offset_hour*60*60*1000 + offset_min*60*1000

    return offset_ms


def get_pst_timestamp_from_time_string(time_string, time_format):

    pst_timezone_name = "America/Los_Angeles"

    tz_offset_ms = get_timezone_offset_ms(pst_timezone_name)

    t = datetime.datetime.strptime(time_string, time_format)

    return long(calendar.timegm(t.timetuple())*1000) - tz_offset_ms


get_pst_timestamp_from_time_string(s, '%Y/%m/%d %H:%M')

'python' 카테고리의 다른 글

gunicorn vs uwsgi  (0) 2017.01.20
flask async response  (0) 2017.01.04
functools.wraps에 대해  (0) 2015.04.15
Apple Push Notification Service(APNs) python modules  (0) 2015.04.07
Shallow copy VS Deep copy  (0) 2014.08.27
블로그 이미지

시간을 거스르는자

,