목록LANG (55)
투케이2K

[개발 환경 설정] 개발 언어 : Go [소스 코드] package main import ( "fmt" "time" ) // ------------------------------------------------------------------------------- // [기본 서버 구동 함수] func main() { // --------------------------------------------------- // [기본 설명] // --------------------------------------------------- // "time" 패키지를 사용해 기본 현재날짜 및 utc 시간 등을 확인할 수 있습니다 // -------------------------------------..

[개발 환경 설정] 개발 언어 : Go [소스 코드] package main import ( "fmt" "time" ) // ------------------------------------------------------------------------------- // [기본 서버 구동 함수] func main() { // --------------------------------------------------- // [기본 설명] // --------------------------------------------------- // "time" 패키지를 사용해 시간 동작을 제어할 수 있습니다 // --------------------------------------------------..

[개발 환경 설정] 개발 언어 : Go [소스 코드] package main import ( "fmt" "time" ) // ------------------------------------------------------------------------------- // [기본 서버 구동 함수] func main() { // --------------------------------------------------- // [기본 설명] // --------------------------------------------------- // "time" 패키지를 사용해 시간 동작을 제어할 수 있습니다 // --------------------------------------------------..

[개발 환경 설정] 개발 언어 : Go [소스 코드] package main import ( "fmt" "time" ) // ------------------------------------------------------------------------------- // [기본 서버 구동 함수] func main() { // --------------------------------------------------- // [기본 설명] // --------------------------------------------------- // "time" 패키지를 사용해 시간 동작을 제어할 수 있습니다 // --------------------------------------------------- ..

[개발 환경 설정] 개발 언어 : Go [소스 코드] package main import ( "log" ) // ------------------------------------------------------------------------------- // [기본 서버 구동 함수] func main() { // --------------------------------------------------- // [기본 설명] // --------------------------------------------------- // "log" 패키지를 사용해 Go 에서 로그를 확인할 수 있습니다 // --------------------------------------------------- //..

[개발 환경 설정] 개발 언어 : Go [소스 코드] package main import ( "log" ) // ------------------------------------------------------------------------------- // [기본 서버 구동 함수] func main() { // --------------------------------------------------- // [기본 설명] // --------------------------------------------------- // "log" 패키지를 사용해 Go 에서 로그를 확인할 수 있습니다 // --------------------------------------------------- // ..

[개발 환경 설정] 개발 언어 : Go [참고 사이트] https://go.dev/ The Go Programming Language DevOps & Site Reliability With fast build times, lean syntax, an automatic formatter and doc generator, Go is built to support both DevOps and SRE. go.dev http://golang.site/go/article/22-Go-%EC%B1%84%EB%84%90#google_vignette 예제로 배우는 Go 프로그래밍 - Go 채널 1. Go 채널 Go 채널은 그 채널을 통하여 데이타를 주고 받는 통로라 볼 수 있는데, 채널은 make() 함수를..

[개발 환경 설정] 개발 언어 : Go [소스 코드] package main import ( "encoding/json" "fmt" "log" "net/http" ) // ------------------------------------------------------------------------------- // [서버 URL Path 경로에 따른 분기 처리] func urlPath(write http.ResponseWriter, request *http.Request) { fmt.Println("") fmt.Println("----------------------------------------------") fmt.Println("[urlPath] : [Start]") fmt.Printl..

[개발 환경 설정] 개발 언어 : Go [소스 코드] package main import ( "encoding/json" "fmt" "log" "net/http" ) // ------------------------------------------------------------------------------- // [서버 URL Path 경로에 따른 분기 처리] func urlPath(write http.ResponseWriter, request *http.Request) { fmt.Println("") fmt.Println("----------------------------------------------") fmt.Println("[urlPath] : [Start]") fmt.Printl..

[개발 환경 설정] 개발 언어 : Go [소스 코드] package main import ( "encoding/json" "fmt" "log" "net/http" ) // ------------------------------------------------------------------------------- // [서버 URL Path 경로에 따른 분기 처리] func urlPath(write http.ResponseWriter, request *http.Request) { fmt.Println("") fmt.Println("----------------------------------------------") fmt.Println("[urlPath] : [Start]") fmt.Prin..

[개발 환경 설정] 개발 언어 : Go [소스 코드] package main import ( "encoding/json" "fmt" "log" "net/http" ) // ------------------------------------------------------------------------------- // [서버 URL Path 경로에 따른 분기 처리] func urlPath(write http.ResponseWriter, request *http.Request) { fmt.Println("") fmt.Println("----------------------------------------------") fmt.Println("[urlPath] : [Start]") fmt.Printl..

[개발 환경 설정] 개발 언어 : Go [소스 코드] package main import ( "encoding/json" "fmt" "log" "net/http" ) // ------------------------------------------------------------------------------- // [서버 URL Path 경로에 따른 분기 처리] func urlPath(write http.ResponseWriter, request *http.Request) { fmt.Println("") fmt.Println("----------------------------------------------") fmt.Println("[urlPath] : [Start]") fmt.Printl..

[개발 환경 설정] 개발 언어 : Go [소스 코드] package main import ( "encoding/json" "fmt" "log" "net/http" ) // ------------------------------------------------------------------------------- // [서버 URL Path 경로에 따른 분기 처리] func urlPath(write http.ResponseWriter, request *http.Request) { fmt.Println("") fmt.Println("----------------------------------------------") fmt.Println("[urlPath] : [Start]") fmt.Prin..

[개발 환경 설정] 개발 언어 : Go [소스 코드] package main import ( "encoding/json" "fmt" "log" "net/http" ) // ------------------------------------------------------------------------------- // [서버 URL Path 경로에 따른 분기 처리] func urlPath(write http.ResponseWriter, request *http.Request) { fmt.Println("") fmt.Println("----------------------------------------------") fmt.Println("[urlPath] : [Start]") fmt.Printl..

[개발 환경 설정] 개발 언어 : Go [소스 코드] package main import ( "encoding/json" "fmt" "log" "net/http" ) // ------------------------------------------------------------------------------- // [서버 URL Path 경로에 따른 분기 처리] func urlPath(write http.ResponseWriter, request *http.Request) { fmt.Println("") fmt.Println("----------------------------------------------") fmt.Println("[urlPath] : [Start]") fmt.Prin..

[개발 환경 설정] 개발 언어 : Go [소스 코드] package main import ( "encoding/json" "fmt" "log" "net/http" ) // ------------------------------------------------------------------------------- // [서버 URL Path 경로에 따른 분기 처리] func urlPath(write http.ResponseWriter, request *http.Request) { fmt.Println("") fmt.Println("----------------------------------------------") fmt.Println("[urlPath] : [Start]") fmt.Printl..

[개발 환경 설정] 개발 언어 : Go [사전) 프로젝트 모듈 추가 방법] [소스 코드] package main import ( "fmt" "github.com/google/uuid" ) func main() { // --------------------------------------------------- // [기본 설명] // --------------------------------------------------- // "github.com/google/uuid" 패키지를 사용해 랜덤 UUID 값을 생성 할 수 있습니다 // --------------------------------------------------- // NewRandom() : 랜덤 UUID 문자열을 생성할 수..

[개발 환경 설정] 개발 언어 : Go [사전) 프로젝트 파일 생성 방법] [소스 코드] package main import ( "bufio" "encoding/csv" "fmt" "os" ) func main() { // --------------------------------------------------- // [기본 설명] // --------------------------------------------------- // "encoding/csv" 패키지를 사용해 CSV 형식 데이터 포맷 인코딩 및 디코딩을 수행할 수 있습니다 // --------------------------------------------------- // Go 에서 CSV 을 사용하기 위해서는 표준패키지 ..

[개발 환경 설정] 개발 언어 : Go [사전) 프로젝트 파일 생성 방법] [소스 코드] package main import ( "bufio" "encoding/csv" "fmt" "os" ) func main() { // --------------------------------------------------- // [기본 설명] // --------------------------------------------------- // "encoding/csv" 패키지를 사용해 CSV 형식 데이터 포맷 인코딩 및 디코딩을 수행할 수 있습니다 // --------------------------------------------------- // Go 에서 CSV 을 사용하기 위해서는 표준패키..

[개발 환경 설정] 개발 언어 : Go [소스 코드] package main import ( "fmt" ) func main() { // [초기 변수 선언] jsonStr := "{\"name\":\"twok\",\"age\":30}" // [string to byte 변환 실시] bytes := []byte(jsonStr) // [byte to string 변환 실시] convert := string(bytes) // [로그 출력] fmt.Println("") fmt.Println("----------------------------------------------") fmt.Println("[로그 출력 수행]") fmt.Println("--------------------------------..