MCPcopy Create free account
hub / github.com/B33pBeeps/redthread / AddBoard

Method AddBoard

internal/app/notes.go:329–340  ·  view source on GitHub ↗

AddBoard appends a fresh board with a unique grain seed and makes it active. Returns the new board.

(name string)

Source from the content-addressed store, hash-verified

327// AddBoard appends a fresh board with a unique grain seed and makes it
328// active. Returns the new board.
329func (w *Workspace) AddBoard(name string) *Board {
330 if name == "" {
331 name = "board " + intToStr(len(w.Boards)+1)
332 }
333 b := &Board{
334 Name: name,
335 GrainSeed: time.Now().UnixNano(),
336 }
337 w.Boards = append(w.Boards, b)
338 w.ActiveIdx = len(w.Boards) - 1
339 return b
340}
341
342// DeleteBoard removes the board at index i. Refuses to delete the last
343// remaining board.

Callers 1

handleBoardKeyMethod · 0.80

Calls 1

intToStrFunction · 0.85

Tested by

no test coverage detected