MCPcopy Create free account

hub / github.com/arahansa/golkorea / functions

Functions243 in github.com/arahansa/golkorea

↓ 9 callersFunctioncheck
파일을 읽는 것은 에러를 위한 검사를 먼저 필요로 한다. 이 helper 는 우리의 에러체크를 간소화하게 해줄 것이다.
gobyexample/56_파일읽기.go:22
↓ 9 callersFunctionf
(from string)
gobyexample/22_Go루틴.go:14
↓ 8 callersMethodRead
(b []byte)
gotour/54_인터페이스의암시적충족.go:10
↓ 7 callersFunctionappend
*덧붙임(Append) 원글 링크 : https://code.google.com/p/golang-korea/wiki/EffectiveGo 이제 내장함수인 append 함수에 대해 설명하도록 하겠습니다. append 함수의 특징은 위에 나온 기존의 append 함
effectivego/07_데이터/08_덧붙임append.go:10
↓ 6 callersMethodError
()
gotour/55_에러.go:14
↓ 4 callersMethodWrite
(b []byte)
gotour/54_인터페이스의암시적충족.go:14
↓ 4 callersFunctionnextInt
* 그리고 문서에서 말하는 것 처럼, 이 함수는 쓰여진 byte의 수와 n != len(b)인 경우 non-nil 에러를 리턴할 것 입니다. 이것은 일반적인 형태입니다; 더 많은 예제를 확인하고 싶으면 error handling section을 참고하십시오. 비
effectivego/06_함수/01_다중리턴값.go:24
↓ 4 callersFunctionprintSlice
(s string, x []int)
gotour/32_슬라이스만들기.go:17
↓ 3 callersFunctioncheck
(e error)
gobyexample/57_파일쓰기.go:18
↓ 3 callersFunctionsum
임의의 숫자 nums 들을 int 로 받는 함수
gobyexample/14_가변인자함수.go:16
↓ 3 callersFunctiontrace
* 지연된 함수들은 LIFO의 순서로 실행되어 집니다. 그러므로 이 코드는 함수가 종료되었을 때 4 3 2 1 0의 순서로 프린트되어질 것입니다. 좀 더 괜찮은 예로 프로그램을 통해 함수 실행을 추적해보는 쉬운 방법이 있습니다. 우리는 다음과 같이 단순히 경로를
effectivego/06_함수/03_Defer.go:56
↓ 2 callersMethodAbs
()
gotour/53_인터페이스.go:10
↓ 2 callersFunctionIndex
타겟문자열t 의 인덱스를 리턴하거나, 매칭되는게 없다면 -1을 리턴한다.
gobyexample/43_콜렉션펑션.go:25
↓ 2 callersFunctionSqrt
(f float64)
gotour/56_연습_에러.go:8
↓ 2 callersFunctionadder
()
gotour/43_함수클로저.go:6
↓ 2 callersMethodarea
()
gobyexample/20_인터페이스.go:18
↓ 2 callersFunctionf2
(arg int)
gobyexample/21_에러.go:48
↓ 2 callersFunctionintSeq
이 intSeq함수는 intSeq안에 익명으로 정의한 다른 함수를 리턴한다. 리턴된 함수는 변수 i 위에서 클로져를 생성하기 위해 닫혀진다? (원문 참고) The returned function closes over the variable i to form a cl
gobyexample/15_클로저.go:18
↓ 2 callersFunctionmeasure
만약 변수가 인터페이스 타입을 가지고 있다면, 우리는 그 인터페이스 안의 메소드를 호출할 수 있다. 여기에, 이러한 장점을 이용하여 어떤 gemetry 가 오더라도 포괄적으로 사용하는 measure function이 있다.
gobyexample/20_인터페이스.go:49
↓ 2 callersFunctionneedFloat
(x float64)
gotour/15_숫자형상수.go:12
↓ 2 callersMethodperim
()
gobyexample/20_인터페이스.go:19
↓ 2 callersFunctionpow
(x, n, lim float64)
gotour/22_IF와ELSE.go:9
↓ 2 callersFunctionpow
(x, n, lim float64)
gotour/21_IF와짧은명령문.go:10
↓ 2 callersFunctionsay
(s string)
gotour/63_고루틴.go:9
↓ 2 callersFunctionsqrt
(x float64)
gotour/20_조건문if.go:9
↓ 2 callersFunctionsum
(a []int, c chan int)
gotour/64_채널.go:6
↓ 2 callersFunctionun
(s string)
effectivego/06_함수/03_Defer.go:74
↓ 2 callersFunctionvals
이 함수에서 (int, int) 는 두개의 int형을 리턴한다는 것을 의미합니다.
gobyexample/13_다중리턴값.go:16
↓ 1 callersMethodAbs
()
gotour/52_포인터리시버를가지는메소드.go:18
↓ 1 callersMethodAbs
()
gotour/50_메소드.go:13
↓ 1 callersFunctionAll
만약 슬라이스의 모든 문자열이 f술어를 만족하면 참을 리턴한다.
gobyexample/43_콜렉션펑션.go:51
↓ 1 callersFunctionAny
만약 슬라이스 안의 문자열중의 하나가 f(역주: 단어뜻은 술어? 인데 여기선 f func를 말하는듯)를 만족하면 true를 리턴한다.
gobyexample/43_콜렉션펑션.go:41
↓ 1 callersFunctionCbrt
(x complex128)
gotour/48_심화연습_복소수세제곱근.go:6
↓ 1 callersFunctionCrawl
Crawl uses fetcher to recursively crawl pages starting with url, to a maximum of depth.
gotour/71_웹크롤러.go:16
↓ 1 callersMethodFetch
Fetch returns the body of URL and a slice of URLs found on that page.
gotour/71_웹크롤러.go:11
↓ 1 callersFunctionFilter
f를 만족시키는 슬라이스에서 모든 문자열을 가지고 있는 새로운 슬라이스를 리턴한다. 원문 참조 Returns a new slice containing all strings in the slice that satisfy the predicate `f`.
gobyexample/43_콜렉션펑션.go:64
↓ 1 callersFunctionInclude
만약 타겟문자열 t가 슬라이스에 있다면 true를 리턴한다.
gobyexample/43_콜렉션펑션.go:35
↓ 1 callersFunctionMap
원래 슬라이스에있는 문자열마다 func f를 적용시킨 결과를 가지고 있는 새로운 슬라이스를 리턴한다.
gobyexample/43_콜렉션펑션.go:75
↓ 1 callersMethodScale
(f float64)
gotour/52_포인터리시버를가지는메소드.go:13
↓ 1 callersFunctionSqrt
(x float64)
gotour/23_연습_루프와함수.go:8
↓ 1 callersMethodString
* String과 같은 메소드를 추가하는 기능은 일반적인 타입의 한 부분일지라도, 출력에 대해 그런 값들이 자동으로 형식화되도록 하는 것을 가능하게 합니다. */
effectivego/08_초기화.go:38
↓ 1 callersFunctionSum
* 원글 링크 : https://code.google.com/p/golang-korea/wiki/EffectiveGo 배열(Arrays) 배열은 메모리의 자세한 레이아웃을 설계할 때 유용하며, 때로는, 메모리 할당하는 것을 피할 수 있습니다. 하지만 주로 배열은
effectivego/07_데이터/04_배열.go:19
↓ 1 callersFunctiona
Use them like this:
effectivego/06_함수/03_Defer.go:60
↓ 1 callersFunctionadd
(x, y int)
gotour/08_함수2.go:6
↓ 1 callersFunctionadd
(x int, y int)
gotour/07_함수.go:6
↓ 1 callersMethodarea
이 `area` 메소드는 `*rect`의 리시버타입을 가지고 있다. (포인터 형식이란 얘기: 역주)
gobyexample/19_메소드.go:20
↓ 1 callersFunctionb
()
effectivego/06_함수/03_Defer.go:83
↓ 1 callersFunctioncloseFile
(f *os.File)
gobyexample/42_디퍼.go:44
↓ 1 callersFunctioncreateFile
(p string)
gobyexample/42_디퍼.go:29
↓ 1 callersFunctionf1
관습적으로, 에러는 마지막으로 리턴된 값이고. 내장된 인터페이스 타입 'error'를 가짐.
gobyexample/21_에러.go:26
↓ 1 callersFunctionfact
이 fact function은 func(0)d이 될때까지 자기 자신을 호출한다.
gobyexample/16_재귀.go:14
↓ 1 callersFunctionfibonacci
fibonacci is a function that returns a function that returns an int.
gotour/44_연습_피보나치.go:8
↓ 1 callersFunctionfibonacci
(c, quit chan int)
gotour/67_셀렉트.go:6
↓ 1 callersFunctionfibonacci
(n int, c chan int)
gotour/66_Range와Close.go:8
↓ 1 callersFunctionhandleRequest
들어오는 요청을 다룬다.
packages/net/01_TCP서버.go:41
↓ 1 callersFunctionneedInt
(x int)
gotour/15_숫자형상수.go:11
↓ 1 callersMethodperim
메소드는 포인터나 값 전달 타입으로 생성할 수 있다. 여기에 값전달 타입이 있다. (역주: 포인터 안 붙임)
gobyexample/19_메소드.go:26
↓ 1 callersFunctionping
이 핑 함수는 오직 값을 보내는 것만 받는다, 이 채널로 받기를 시도하려고 한다면 이것은 compile 에러를 낼 것이다.
gobyexample/26_채널방향.go:17
↓ 1 callersFunctionplus
여기 두개의 int를 받아서 합계를 int로 돌려주는 예제가 있다.
gobyexample/12_함수.go:13
↓ 1 callersFunctionpong
이 퐁 함수는 오직 (pings)수신을 위한 채널과 ('pongs')전송을 위한 채널만을 받아들인다.
gobyexample/26_채널방향.go:22
↓ 1 callersFunctionreadLines
readLines 은 파일을 메모리로 읽어들여, 파일들 라인의 슬라이스를 리턴한다. 참고 http://bit.ly/golangreadwrite
packages/os/01_텍스트파일읽기.go:22
↓ 1 callersFunctionrun
()
gotour/55_에러.go:18
↓ 1 callersFunctionsplit
(sum int)
gotour/10_이름이정해진결과.go:6
↓ 1 callersFunctionswap
(x, y string)
gotour/09_여러개의결과.go:6
↓ 1 callersFunctionuntrace
(s string)
effectivego/06_함수/03_Defer.go:57
↓ 1 callersFunctionworker
여기 이 함수는 Go루틴에서 실행될 함수인데, 다른 고루틴에게 이 함수의 작업이 완료되었단 것을 알리기 위해 done 채널이 사용될 것이다.
gobyexample/25_채널동기화.go:17
↓ 1 callersFunctionworker
여기 worker 가 있는데 우리는 동시성 인스턴스 몇가지를 실행시킬 것이다. 이러한 worker들은 jobs채널로부터 work를 받아서 그에 상응하는 results를 보낼 것이다. 우리는 처리하는데 시간이 걸리는(expensive)한 job이란 시뮬레이션을 하기 위해
gobyexample/34_워커풀.go:18
↓ 1 callersFunctionwriteFile
(f *os.File)
gobyexample/42_디퍼.go:38
↓ 1 callersFunctionzeroptr
그에 반해서 `zeroptr` 은 `*int` 파라미터를 가진다. 이것은 Int형 포인터를 가진다는 것을 의미하며, 이 함수 몸체에서 *iptr은 포인터의 참조를 찾아가서 실제 메모리 주소로 접근하여 값을 할당합니다. (생략번역함)
gobyexample/17_포인터.go:27
↓ 1 callersFunctionzeroval
우리는 당신에게 포인터가 값에 대해서 어떻게 작동하는지 2개의 function과 함께 보여줄 것이다. 하나의 func는 zeroval 이고 두번째 변수는 zeroptr 이다. zeroval 은 int형의 파라미터를 가지며, 값형태로 아규먼트가 전달된다. zeroval은
gobyexample/17_포인터.go:20
MethodAbs
()
gotour/53_인터페이스.go:28
MethodAbs
()
gotour/53_인터페이스.go:39
MethodAbs
()
gotour/51_메소드2.go:11
FunctionAppend
* slice의 길이는 배열의 크기 제한이 허용하는 한도 내에서 변화될 것 입니다. ; slice를 지정하십시오. 내장함수인 cap을 사용해 slice의 최대 용량을 알 수 있습니다. 여기 slice에 data를 추가하는 예가 있습니다. 만약 data가 slice의
effectivego/07_데이터/05_슬라이스.go:42
MethodAppend
(data []byte)
effectivego/09_메소드.go:19
FunctionCompare
Compare 함수는 두 byte의 배열들을 비교하여 하나의 integer값을 리턴해준다. 결과값은 만약 a == b라면 0, a < b라면 -1, a > b라면 +1을 리턴할 것이다.
effectivego/05_제어구조.go:135
FunctionContents
*Defer 원글 링크 : https://code.google.com/p/golang-korea/wiki/EffectiveGo Go 언어에서 defer 문은 함수가 지연된 리턴값을 실행하기 전에 즉시 실행될 수 있도록 하나의 function call을 예약합니다.(t
effectivego/06_함수/03_Defer.go:10
MethodError
()
gobyexample/21_에러.go:44
MethodFetch
(url string)
gotour/71_웹크롤러.go:47
MethodLen
우리는 sort.Interface- Len, Less, Swap 을 구현했다. - 우리의 타입에서 우리는 sort 패키지의 일반적인 Sort 함수를 사용할 수 있을 것이다. Len과 Swap은 일반적으로 비슷하고 Less는 실제 커스텀 정렬 로직을 가지고 있다. (L
gobyexample/40_Function정렬.go:26
MethodLess
(i, j int)
gobyexample/40_Function정렬.go:32
FunctionNewFile
* 원글 링크 : https://code.google.com/p/golang-korea/wiki/EffectiveGo 때때로, zero 값으로는 충분하지 않기 때문에 여기있는 os package로 부터 파생된 예처럼 초기화 생성자가 필요할 때가 있습니다. */
effectivego/07_데이터/02_생성자와복합문장.go:8
FunctionPic
(dx, dy int)
gotour/36_연습_슬라이스.go:6
MethodRead
* 원글 링크 : https://code.google.com/p/golang-korea/wiki/EffectiveGo Slices slice는 연속적인 자료에 대해 더 일반화하고, 강력하며, 편리한 인터페이스를 제공하기 위해 배열을 둘러쌉니다. 변환 행렬 같은 명
effectivego/07_데이터/05_슬라이스.go:17
FunctionReadFull
* 원글 링크 : https://code.google.com/p/golang-korea/wiki/EffectiveGo 명명된 파라미터 결과값(Named result parameters) Go 함수에서는 리턴값 또는 parameter 결과값들에 대해 명명하는 것이 가능하
effectivego/06_함수/02_명명된파라미터값.go:21
FunctionSame
Same determines whether the trees t1 and t2 contain the same values.
gotour/70_연습_동등한이진트리.go:12
MethodServeHTTP
( w http.ResponseWriter, r *http.Request)
gotour/57_웹서버.go:11
MethodSwap
(i, j int)
gobyexample/40_Function정렬.go:29
FunctionWalk
Walk walks the tree t sending all values from the tree to the channel ch.
gotour/70_연습_동등한이진트리.go:8
FunctionWordCount
(s string)
gotour/41_연습_맵.go:8
MethodWrite
사실 우리는 이것보다 더 잘할 수 있습니다. 만약 우리가 우리의 함수를 수정한다면 아래 예제처럼 그것은 표준적인 메소드처럼 보일 것 입니다.
effectivego/09_메소드.go:33
MethodWrite
* 원글 링크 : https://code.google.com/p/golang-korea/wiki/EffectiveGo 다중 리턴 값(Multiple return values) Go언어에서 특이한 점 중에 하나는 함수와 메소드가 여러개의 값을 리턴할 수 있다는 것입니다.
effectivego/06_함수/01_다중리턴값.go:14
Methodarea
Go에서 인터페이스를 구현하기 위해, 우리는 단지 인터페이스를 모두 구현하면 된다. 여기 square에 geometry 인터페이스를 구현하는 예제가 있다.
gobyexample/20_인터페이스.go:32
Methodarea
circle에서 구현하는 것이다.
gobyexample/20_인터페이스.go:40
Functioninit
* 초기화 함수(The init function) 마침내, 각 소스파일은 어떤 명령문이던 간에 필요하다면 셋업하기 위해 자신만의 init() 함수를 정의할 수 있습니다. 유일한 제한은 비록, 초기화하는 동안 go 루틴이 시작될 수 있다고 해도, 초기화가 끝날때까지는 실
effectivego/08_초기화.go:83
Functionmain
()
packages/os/01_텍스트파일읽기.go:10
Functionmain
()
packages/os/exec/01_Command예제.go:9
Functionmain
리플렉션을 이용한 게터세터를 이용할 때, 겟할 때는 reflect.ValueOf(n) 셋할 때는 Value(&변수명).Elem()
packages/reflect/01_겟셋값해보기.go:16
Functionmain
()
packages/strconv/00_오버뷰.go:11
Functionmain
()
packages/net/02_godoc예제.go:9
next →1–100 of 243, ranked by callers