Commit graph

10 commits

Author SHA1 Message Date
JetSetIlly b41c6d0301 removed unnecessary whitespace (golangci-lint -E whitespace --fix)
update Makefile lint target
2020-10-16 10:29:09 +01:00
JetSetIlly 7fc48dcd65 renamed errors package to 'curated'
to differentiate with the now existing errors package in the standard
library.
2020-09-28 22:16:59 +01:00
JetSetIlly 2d5cae17f5 reworking of errors package
removed all messages from errors package. the strings are now hard coded
in place. the original reason for extracting the error strings like that
was (a) for redundancy and (b) for localisation possibilities. However,
in reality there is not much redundancy and since the project started
the scope of localisation is much larger (particularly due to the
addition of a GUI)

this is the first step. the next step is to remove the errors package
altogether. recent additions to Go mean that the functionality of the
errors package is no longer required. moreover, the original idea for
the errors package functions turns out not to have been as useful as
first appeared (the Error() functionality which makes sure no repeating
sub-strings occur is probably better achieved with static tooling).

one idea that comes from this which is quite interesting is the idea of
a curated error. that is, any error that has been "wrapped" as some
'generic' type. the IsAny() function in the errors package effectively
serves this purpose. we use that in one place in the input loop of the
debugger. not strictly necessary but nice to have so it would ideal
if we could remove the errors package but keep that idea.
2020-09-28 22:16:59 +01:00
JetSetIlly 298a5d343f updated copyright notice in all files
the note about historical versions also being covered wasn't strictly
needed and was ugly. the LICENCE being in the root file from the very
first commit is sufficient.
2020-07-26 20:18:56 +01:00
JetSetIlly 39fd8381dd remove Poke() from cartMapper interface. replaced with an argument to
Write()

all cartridge types are now poke-able

all cartridge types are no patch-able

reworked error types/messages. replaced some errors with panics
2020-06-11 20:08:10 +01:00
Robin Eklind 24cb28843f gopher2600: use fully qualified import path as module path
Fixes #4.
2020-03-21 23:39:56 +01:00
steve 4534da0db6 reworked paths package
the location of the configuration directory now depends on how the
binary is built. release versions of the binary will look for the
gopher2600 directory in the user's os configuration directory.
non-release versions will look for the .gopher2600 directory in the CWD.

paths.ResourcePath() will create the paths that don't exist

paths.ResourcePath() now clearly differentiates paths and files

added build target to the Makefile; disabled release target for now
2020-01-07 19:14:51 +00:00
steve 16b15fad95 o added licence headers to all files 2020-01-05 18:58:43 +00:00
steve 0f5a258482 o patch
- implemented patching

o setup
    - added patch entry type

o gopher2600
    - added patch flag to RUN mode
2020-01-05 18:58:42 +00:00
steve d7cdfcfe61 o errors
- removed ErrorID, using the error message as the ID
    - works just as well and simplifies maintenance
    - the messages should be moved to the relevant packages OR to a
      locale package. not sure which yet.
2020-01-05 18:58:42 +00:00