Language/go lang(23)
-
http dump
log.WithField("dump=", "start").Debug("auth start") dump, err := httputil.DumpResponse(resp, true) if err != nil { log.Fatal(err) } log.WithField("dump??", string(dump[:])).Debug("auth dump") // fmt.Printf("DUMP => %q", dump) 참고 : https://golang.org/pkg/net/http/httputil/
2018.08.30 -
golang 채널에 대해 알아보자!
golang 채널이란?1. 데이터를 주고 받는 통로. 2. make를 통해 미리 생성. 3. 채널 연산자 별도의 lock을 걸지 않고 데이터를 동기화 하는데 사용 한다. 채널 만들기1. ch := make(chan int) // 정수형 채널이 생성. 채널 송수신1. 채널로 데이터를 보낼 때 채널
2018.05.11 -
용어 - multiplexer
// Mux is a simple HTTP route multiplexer that parses a request path, // records any URL params, and executes an end handler. It implements // the http.Handler interface and is friendly with the standard library. // // Mux is designed to be fast, minimal and offer a powerful API for building // modular and composable HTTP services with a large set of handlers. It's // particularly useful for wri..
2018.03.16 -
golang code 구조 살펴보기
보호되어 있는 글입니다.
2018.03.15 -
golang + github Permanently added the RSA host key
Permanently added the RSA host key공개키 에러인데 ..github서버에 파일을 push하려고 보니 현재 인증된게 하나도 없는 상태이다. 공개키를 github에 등록을 해주어야한다. 아래처럼 우선 공개키가 있는지 확인해보자.공개키가 없다면..2016/08/29 - [OS/Linux&Unix] - SSH 유용정보! github에 id_rsa.pub 의 내용을 넣으면 된다. 잘 push 되었음을 알수가 있다. - 끝 -
2018.03.05 -
golang + github ignore setting
github에 push하는데 있어서 무시해야하는 파일들은 무시하도록 설정한다. 아래 링크 참고!2016/03/23 - [OpenSource/Spring Boot] - ace-t의 Spring Boot 따라잡기(기본 - SourceTree에 연결 및 Repository에 올리기) https://www.gitignore.io/에서 go와 intelij+imi를 선택한다. 복사 후 아래의 파일에 저장 시키면 된다. 다시 github을 열었을 때 imi파일들은 사라지고 아래의 커밋대상만 보이면 성공! - 끝 -
2018.03.05