Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] tidy up media manager, add calling func to errors, build-script improvements #1835

Merged

Conversation

NyaaaWhatsUpDoc
Copy link
Member

Description

  • de-interfaces media.Manager
  • removes now mostly unused postData callback function, instead uses a wrapped read closer when needed
  • add New and Newf functions to gtserror that return an error prefixed with calling function name
  • updates much code in dereferencing to use these new error types
  • further simplifies the NewFromResponse() error function string building (and uses new above-mentioned errors)
  • updates scripts/build.sh to support passing in Go build configuration values via env, and logs the build command

Checklist

  • I/we have read the GoToSocial contribution guidelines.
  • I/we have discussed the proposed changes already, either in an issue on the repository, or in the Matrix chat.
  • I/we have performed a self-review of added code.
  • I/we have written code that is legible and maintainable by others.
  • I/we have commented the added code, particularly in hard-to-understand areas.
  • I/we have made any necessary changes to documentation.
  • I/we have added tests that cover new code.
  • I/we have run tests and they pass locally with the changes.
  • I/we have run go fmt ./... and golangci-lint run.

Signed-off-by: kim <grufwub@gmail.com>
Signed-off-by: kim <grufwub@gmail.com>
Signed-off-by: kim <grufwub@gmail.com>
@tsmethurst
Copy link
Contributor

Love this 😍

@tsmethurst tsmethurst merged commit 5faeb4d into superseriousbusiness:main May 28, 2023
2 checks passed
tsmethurst pushed a commit that referenced this pull request Jun 14, 2023
…pt improvements (#1835)

* media manager tidy-up: de-interface and remove unused PostDataFunc

Signed-off-by: kim <grufwub@gmail.com>

* remove last traces of media.Manager being an interface

Signed-off-by: kim <grufwub@gmail.com>

* update error to provide caller, allow tuneable via build tags

Signed-off-by: kim <grufwub@gmail.com>

* remove kim-specific build script changes

Signed-off-by: kim <grufwub@gmail.com>

* fix merge conflicts

Signed-off-by: kim <grufwub@gmail.com>

* update build-script to support externally setting build variables

Signed-off-by: kim <grufwub@gmail.com>

---------

Signed-off-by: kim <grufwub@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants