Age | Commit message (Collapse) | Author |
|
Get rid of all the old commented Fields code. It's no longer used and is
no longer relevant.
Furthermore, since the only thing left in this file is the `Project`
struct, rename the file to 'project.go'.
|
|
Time spent on a project can be variable from day to day. The time
shouldn't be stored on the project, and should no longer be passed in
config.toml. Instead it should be a part of `TimeEntry`, which it now
is.
|
|
Otherwise the TOML decoder didn't know how to parse it.
|
|
This corresponds to a "project" entry in the new config2.toml file. (See
13c84cd9973458750305c72a919cf921d9b22b04).
Instead of decoding generic `interface{}`s as projects from the TOML,
make them a real type.
The reason why we're using `int`s where we used to use strings is that
the new TOML format will have users write IDs directly in the config
file, instead of having the program automatically search for those IDs
and use them as we had previously designed. Maybe we'll bring that
functionality back at some point, but for now it's too bothersome to
implement and I don't consider it worth the trouble.
|
|
Half get rid of a lot of code. I don't like and don't want to use our
old field types. Get rid of them and the code in 'http.go' that depends
on them.
Also get rid of the time entry submission code in 'main.go' as that's
going to be redone.
|
|
Because `strings.Itoa` is so much easier to call than
`strconv.ParseUint`, and I needed to parse ints into strings to build
the URL params in `buildSubmissionParams`
(17f4ecc63615e3f3bef21a80f15e7c7b0e0cffa1).
|
|
Not relevant. See 89f766854443a6f7ae20c330547083fd0e075ba9.
|
|
We want to be able to get Client, Project, etc. objects given their
name. These functions will look through the fields or objects containing
a list of the thing looked for and return if if its name matches the
search string.
Originally had the idea to generalise the body of the function, but had
trouble making the types generic. Still on the table for later if we
want to deduplicate the code. For now I'm leaving in the repetition
because it works and I don't care with this project.
|
|
Embedding this struct prevented us from correctly unmarshalling data
into them. This is because they need to be created like:
Client{IDName{ID: , Name: ,}}
The fields can't be added in directly.
Save ourselves the headache and just manually repeat the fields. So that
importing works right.
|
|
We'll be needing to refer to these fields as named types, so create
types for them and reference them in the config object.
|