Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bitfield/ftl-code
/ functions
Functions
131 in github.com/bitfield/ftl-code
⨍
Functions
131
◇
Types & classes
32
↓ 7 callers
Method
GetBook
(ID int)
19.5/bookstore.go:23
↓ 5 callers
Method
Len
Len returns the length of the string.
19.3/mytypes.go:7
↓ 4 callers
Method
GetAllBooks
()
19.4/bookstore.go:13
↓ 3 callers
Method
Double
()
21.3/mytypes.go:5
↓ 2 callers
Method
NetPriceCents
()
18.2/bookstore.go:13
↓ 2 callers
Method
SetCategory
(category Category)
23.2/bookstore.go:29
↓ 2 callers
Method
SetCategory
(category string)
22.2/bookstore.go:16
↓ 2 callers
Method
SetPriceCents
(price int)
22.1/bookstore.go:15
↓ 2 callers
Function
closeEnough
(a, b, tolerance float64)
8.1/calculator_test.go:134
↓ 1 callers
Method
Category
()
23.2/bookstore.go:37
↓ 1 callers
Method
Category
()
22.2/bookstore.go:24
↓ 1 callers
Method
GetAllBooks
()
19.5/bookstore.go:15
↓ 1 callers
Method
Hello
Hello returns the string "Hello, Gophers!"
20.1/mytypes.go:9
↓ 1 callers
Method
Number
()
23.1/creditcard.go:16
↓ 1 callers
Method
ToUpper
()
20.3/mytypes.go:10
↓ 1 callers
Method
Twice
Twice multiplies its receiver by 2 and returns the result.
19.2/mytypes.go:8
Function
Add
Add takes two numbers and returns the result of adding them together.
8.1/calculator.go:13
Function
Add
Add takes two numbers and returns the result of adding them together.
4.1/calculator.go:7
Function
Add
Add takes two numbers and returns the result of adding them together.
3.1/calculator.go:7
Function
Add
Add takes two numbers and returns the result of adding them together.
3.2/calculator.go:7
Function
Add
Add takes two numbers and returns the result of adding them together.
8.2/calculator.go:13
Function
Add
Add takes two numbers and returns the result of adding them together.
5.1/calculator.go:7
Function
Add
Add takes two numbers and returns the result of adding them together.
1.1/calculator.go:7
Function
Add
Add takes two numbers and returns the result of adding them together.
6.1/calculator.go:9
Function
AddMany
(inputs ...float64)
8.3/calculator.go:9
Function
Buy
Buy takes a Book, decrements its number of copies, and returns the modified book.
12.1/bookstore.go:12
Function
Buy
Buy takes a Book, decrements its number of copies, and returns the modified book.
13.1/bookstore.go:14
Function
Divide
Divide takes two numbers and returns the result of dividing the first by the second, or an error if the second value is zero.
8.1/calculator.go:33
Function
Divide
Divide takes two numbers and returns the result of dividing the first by the second, or an error if the second value is zero.
8.2/calculator.go:33
Function
Divide
Divide takes two numbers and returns the result of dividing the first by the second, or an error if the second value is zero.
6.1/calculator.go:29
Function
DivideMany
(inputs ...float64)
8.3/calculator.go:42
Function
Double
(input int)
21.1/mytypes.go:3
Function
Double
(input *int)
21.2/mytypes.go:3
Function
GetAllBooks
(catalog map[int]Book)
17.3/bookstore.go:11
Function
GetAllBooks
(catalog []Book)
15.1/bookstore.go:10
Function
GetAllBooks
(catalog map[int]Book)
17.2/bookstore.go:11
Function
GetBook
(catalog map[int]Book, ID int)
17.1/bookstore.go:13
Function
GetBook
(catalog []Book, ID int)
15.3/bookstore.go:11
Function
GetBook
(catalog []Book, ID int)
15.2/bookstore.go:11
Function
GetBook
(catalog map[int]Book, ID int)
16.1/bookstore.go:11
Function
Multiply
Multiply takes two numbers a and b, and returns their product.
8.1/calculator.go:25
Function
Multiply
Multiply takes two numbers a and b, and returns their product.
4.1/calculator.go:19
Function
Multiply
Multiply takes two numbers a and b, and returns their product.
8.2/calculator.go:25
Function
Multiply
Multiply takes two numbers a and b, and returns their product.
5.1/calculator.go:19
Function
Multiply
Multiply takes two numbers a and b, and returns their product.
6.1/calculator.go:21
Function
MultiplyMany
(inputs ...float64)
8.3/calculator.go:20
Function
NetPriceCents
(b Book)
18.1/bookstore.go:13
Function
New
(number string)
23.1/creditcard.go:9
Function
Sqrt
Sqrt returns the square root of its input, or an error for negative inputs.
8.1/calculator.go:42
Function
Sqrt
Sqrt returns the square root of its input, or an error for negative inputs.
8.2/calculator.go:42
Function
Subtract
Subtract takes two numbers a and b, and returns the result of subtracting b from a.
8.1/calculator.go:19
Function
Subtract
Subtract takes two numbers a and b, and returns the result of subtracting b from a.
4.1/calculator.go:13
Function
Subtract
Subtract takes two numbers a and b, and returns the result of subtracting b from a.
3.1/calculator.go:13
Function
Subtract
Subtract takes two numbers a and b, and returns the result of subtracting b from a.
3.2/calculator.go:13
Function
Subtract
Subtract takes two numbers a and b, and returns the result of subtracting b from a.
8.2/calculator.go:19
Function
Subtract
Subtract takes two numbers a and b, and returns the result of subtracting b from a.
5.1/calculator.go:13
Function
Subtract
Subtract takes two numbers a and b, and returns the result of subtracting b from a.
6.1/calculator.go:15
Function
SubtractMany
(inputs ...float64)
8.3/calculator.go:31
Function
TestAdd
(t *testing.T)
8.1/calculator_test.go:10
Function
TestAdd
(t *testing.T)
4.1/calculator_test.go:8
Function
TestAdd
(t *testing.T)
3.1/calculator_test.go:8
Function
TestAdd
(t *testing.T)
3.2/calculator_test.go:8
Function
TestAdd
(t *testing.T)
5.1/calculator_test.go:8
Function
TestAdd
(t *testing.T)
1.1/calculator_test.go:8
Function
TestAdd
(t *testing.T)
6.1/calculator_test.go:8
Function
TestAddMany
(t *testing.T)
8.3/calculator_test.go:8
Function
TestBook
(t *testing.T)
12.1/bookstore_test.go:8
Function
TestBook
(t *testing.T)
10.1/bookstore_test.go:8
Function
TestBook
(t *testing.T)
13.1/bookstore_test.go:8
Function
TestBuy
(t *testing.T)
12.1/bookstore_test.go:17
Function
TestBuy
(t *testing.T)
13.1/bookstore_test.go:17
Function
TestBuyErrorsIfNoCopiesLeft
(t *testing.T)
13.1/bookstore_test.go:35
Function
TestDivide
(t *testing.T)
8.1/calculator_test.go:70
Function
TestDivide
(t *testing.T)
6.1/calculator_test.go:68
Function
TestDivideInvalid
(t *testing.T)
8.1/calculator_test.go:94
Function
TestDivideInvalid
(t *testing.T)
6.1/calculator_test.go:91
Function
TestDivideMany
(t *testing.T)
8.3/calculator_test.go:71
Function
TestDivideManyInvalid
(t *testing.T)
8.3/calculator_test.go:96
Function
TestDouble
(t *testing.T)
21.1/mytypes_test.go:8
Function
TestDouble
(t *testing.T)
21.3/mytypes_test.go:8
Function
TestDouble
(t *testing.T)
21.2/mytypes_test.go:8
Function
TestGetAllBooks
(t *testing.T)
17.3/bookstore_test.go:11
Function
TestGetAllBooks
(t *testing.T)
15.1/bookstore_test.go:10
Function
TestGetAllBooks
(t *testing.T)
17.2/bookstore_test.go:10
Function
TestGetAllBooks
(t *testing.T)
19.4/bookstore_test.go:11
Function
TestGetAllBooks
(t *testing.T)
19.5/bookstore_test.go:11
Function
TestGetBook
(t *testing.T)
17.1/bookstore_test.go:10
Function
TestGetBook
(t *testing.T)
15.3/bookstore_test.go:10
Function
TestGetBook
(t *testing.T)
15.2/bookstore_test.go:10
Function
TestGetBook
(t *testing.T)
16.1/bookstore_test.go:10
Function
TestGetBook
(t *testing.T)
19.5/bookstore_test.go:30
Function
TestGetBookBadIDReturnsError
(t *testing.T)
17.1/bookstore_test.go:26
Function
TestGetBookBadIDReturnsError
(t *testing.T)
19.5/bookstore_test.go:46
Function
TestMultiply
(t *testing.T)
8.1/calculator_test.go:50
Function
TestMultiply
(t *testing.T)
4.1/calculator_test.go:26
Function
TestMultiply
(t *testing.T)
5.1/calculator_test.go:48
Function
TestMultiply
(t *testing.T)
6.1/calculator_test.go:48
Function
TestMultiplyMany
(t *testing.T)
8.3/calculator_test.go:50
Function
TestMyBuilder
(t *testing.T)
20.2/mytypes_test.go:8
Function
TestMyBuilderEmbedded
(t *testing.T)
20.4/mytypes_test.go:8
next →
1–100 of 131, ranked by callers